Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions api/clients/v2/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -226,8 +226,8 @@ func (rc *ValidatorPayloadRetrieverConfig) checkAndSetDefaults() error {
func GetDefaultPayloadDisperserConfig() *PayloadDisperserConfig {
return &PayloadDisperserConfig{
PayloadClientConfig: *GetDefaultPayloadClientConfig(),
DisperseBlobTimeout: 5 * time.Second,
BlobCertifiedTimeout: 10 * time.Second,
DisperseBlobTimeout: 2 * time.Minute,
BlobCertifiedTimeout: 2 * time.Minute,
BlobStatusPollInterval: 1 * time.Second,
Quorums: []core.QuorumID{0, 1},
}
Expand Down
14 changes: 12 additions & 2 deletions common/testutils/random/test_random.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ type TestRandom struct {

// NewTestRandom creates a new instance of TestRandom
// This method may either be seeded, or not seeded. If no seed is provided, then current unix nano time is used.
//
// The testing.T object is optional, but if it is nil then this utility will panic if an internal error occurs.
func NewTestRandom(t *testing.T, fixedSeed ...int64) *TestRandom {
var seed int64
if len(fixedSeed) == 0 {
Expand Down Expand Up @@ -144,7 +146,7 @@ func (r *TestRandom) IOReader() io.Reader {
// NOT CRYPTOGRAPHICALLY SECURE!!! FOR TESTING PURPOSES ONLY. DO NOT USE THESE KEYS FOR SECURITY PURPOSES.
func (r *TestRandom) ECDSA() (*ecdsa.PublicKey, *ecdsa.PrivateKey) {
key, err := ecdsa.GenerateKey(crypto.S256(), crand.Reader)
require.NoError(r.t, err)
r.requireNoError(err)
return &key.PublicKey, key
}

Expand All @@ -158,8 +160,16 @@ func (r *TestRandom) BLS() *core.KeyPair {

//Generate cryptographically strong pseudo-random between 0 - max
n, err := crand.Int(r.IOReader(), maxValue)
require.NoError(r.t, err)
r.requireNoError(err)

sk := new(core.PrivateKey).SetBigInt(n)
return core.MakeKeyPair(sk)
}

func (r *TestRandom) requireNoError(err error) {
if r.t != nil {
require.NoError(r.t, err)
} else if err != nil {
panic(err)
}
}
10 changes: 8 additions & 2 deletions test/v2/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
clean:
rm -rf bin 2>/dev/null || true

build: clean
go build -o bin/load load/main/load_main.go

test:
cd correctness && go test

load:
cd load && go test
generate-load: build
./bin/load $(ARGS)
Loading
Loading