Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update/v0.7.3 #152

Open
wants to merge 135 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
135 commits
Select commit Hold shift + click to select a range
0171536
check unsupported precompiles (#3264)
ToniRamirezM Feb 14, 2024
eb3ae9b
fix RPC closebatch executor error (#3272)
ToniRamirezM Feb 14, 2024
2d76f12
fix executor error closebatch (#3276)
joanestebanr Feb 14, 2024
20fa91f
add oog2 checks for all the oog cheks (#3277)
tclemos Feb 14, 2024
f968d8b
fix oog2 in internal gas estimation (#3280)
ToniRamirezM Feb 16, 2024
ca5a2c2
execution mode (#3285)
ToniRamirezM Feb 16, 2024
0a58f28
update prover image (#3286)
ToniRamirezM Feb 16, 2024
857be17
fix log when error on batch sanity check (#3287)
agnusmor Feb 16, 2024
5a1782f
update prover image to v4.0.13 (#3289)
agnusmor Feb 16, 2024
a7c9c71
update prover image (#3290)
ToniRamirezM Feb 17, 2024
3b25971
fix deltaTimestamp when debug tx (#3291)
tclemos Feb 17, 2024
bfe0166
fix checkStateInconsistency when starting sequencer (#3294)
agnusmor Feb 17, 2024
8cb1842
disable delete addrQueue if empty as a workaround (#3295)
agnusmor Feb 18, 2024
03a9291
add aggregator.BatchProofL1BlockConfirmations config parameter (#3302…
agnusmor Feb 20, 2024
e13c7ad
Feature remove executor errors (#3317)
ToniRamirezM Feb 20, 2024
5a5a642
support to elderberry fork (#3301)
joanestebanr Feb 20, 2024
fabe7ee
update prover image (#3322)
ToniRamirezM Feb 21, 2024
f0093b0
Get last l2 block in a batch by batch number (#3335)
ToniRamirezM Feb 21, 2024
c091cfb
add selector for trusted sync to prevent from executing from an old t…
joanestebanr Feb 21, 2024
a86d444
synchronizer adopt GetLastL2BlockByBatchNumber to check elderberry ts…
joanestebanr Feb 21, 2024
5c2fcff
reserved zk counters (#3343)
ToniRamirezM Feb 22, 2024
a039a0a
Add reserved zk counters to pool transactions (#3346)
ToniRamirezM Feb 22, 2024
d218fe2
Merge v0.5.13 into v0.6.0 (#3350)
tclemos Feb 22, 2024
b3a1b04
Update reserved counters with used in pool db during migration (#3352)
ToniRamirezM Feb 22, 2024
1bd33f5
fix initial sequenced batch event (#3347)
joanestebanr Feb 22, 2024
19c6694
Add executor reserved ZK counters (#3348)
agnusmor Feb 23, 2024
6aacee4
fix return on node OOC. Fix logs (#3359)
agnusmor Feb 23, 2024
54b7fcd
to decode ETROG processBatches use ETROG contract (#3360)
joanestebanr Feb 23, 2024
f08d413
Synchronized inform field state.batch.closing_reason from DB
joanestebanr Feb 26, 2024
92f191d
remove unnecessary eventlog call when processing unsigned txs (#3365)
tclemos Feb 26, 2024
3ab6d44
Fix batch 0 timestamp (#3364)
tclemos Feb 27, 2024
2b70cce
ignore forkid events from another rollup (#3383)
joanestebanr Feb 27, 2024
cd4c30c
Add l2block/interval metrics. Use timeoutCond when waiting for worker…
agnusmor Feb 27, 2024
fe1dacc
Feature/cherry pick 3370 3374 synchronizer, fix bugs, ReprocessFullBa…
joanestebanr Feb 27, 2024
4769da0
fix metrics cleanUp (#3385)
agnusmor Feb 27, 2024
f7f1809
fix check poseidonHashes exhausted (#3393)
agnusmor Feb 28, 2024
e0cd81e
remove execution mode (#3395)
ToniRamirezM Feb 28, 2024
4bd2089
fix metrics estimatedTxsPerSec (#3396)
agnusmor Feb 28, 2024
858edac
Fix metrics estimatedTxsPerSec division (#3398)
agnusmor Feb 29, 2024
f4f44b5
Get IM State root from receipt for data stream. (#3400)
ToniRamirezM Feb 29, 2024
f4dd705
Add gas per second estimation in metrics (#3401)
agnusmor Feb 29, 2024
2d93d42
Feature/cherry pick 3375 sync add check l2block hash (#3406)
joanestebanr Mar 1, 2024
fe9b257
update prover image to v5.0.3 (#3407)
agnusmor Mar 1, 2024
1365a55
keep empty RPC.SequencerNodeURI config parameter to get node URI from…
agnusmor Mar 7, 2024
2261ccc
add log0 debug trace e2e tests (#3422)
tclemos Mar 8, 2024
21491a8
Elderberry blockhash adjustments (#3424)
tclemos Mar 8, 2024
76cf00f
update prover to v5.0.6 (#3437)
ToniRamirezM Mar 8, 2024
b184e2b
use empty byte array instead of all zeros for receipt poststate (#3449)
tclemos Mar 11, 2024
393d47f
L1 Synchronization process check some L2Blocks from TrustedNode (#3445)
joanestebanr Mar 12, 2024
5361315
l1sync: if local batch is WIP need to be reprocess (#3443)
joanestebanr Mar 12, 2024
8ffd1dc
Synchronizer accept forkids that are the same as in database (#3452)
joanestebanr Mar 13, 2024
b65af69
remove unnecessary eventlog call when estimating tx gas (#3457)
tclemos Mar 15, 2024
6c76bf4
fix debug trace for injected tx (#3469) (#3473)
tclemos Mar 21, 2024
968568f
Add sanity-check on checkL1InfoTreeUpdate to check state L1 blockhash…
agnusmor Mar 25, 2024
bfaa130
support forkid 9 (#3496)
joanestebanr Mar 25, 2024
df539db
fix aggregator l1 info tree (#3490) (#3491) (#3484) (#3495)
ToniRamirezM Mar 25, 2024
790e78a
fix debug trace to compute egp percentage based on tx execution value…
tclemos Mar 26, 2024
ee3630e
fix tx index calculation on receipt (#3488) (#3500)
agnusmor Mar 26, 2024
e0d7266
sort logs by tx hash and then by log index (#3476)
tclemos Apr 2, 2024
31aecea
#3514 Fix l1 info root after reorg (#3515)
ARR552 Apr 4, 2024
26ec1b5
Feature/3518 use generic eth client for l2 (#3519)
joanestebanr Apr 4, 2024
c04b2c2
fix deltaTimeStamp and TimestampLimit for eth_call (#3529)
tclemos Apr 4, 2024
208a4ee
Stop syncing l1inforoot when invalid l1inforoot is detected (#3542)
agnusmor Apr 8, 2024
6ca0464
Feature/#3544 sync block protection (#3545)
ARR552 Apr 8, 2024
fed89ca
add column checked on state.block (#3543)
joanestebanr Apr 8, 2024
64dcff0
safe mode by default (#3547)
ARR552 Apr 8, 2024
1f15508
check GER and index of synced L1InfoRoot matches with sc values (#3551)
agnusmor Apr 11, 2024
0476a8b
apply txIndex fix to StoreTransactions; add migration to fix wrong tx…
tclemos Apr 12, 2024
32a7750
Feature/#3549 reorgs improvement (#3553)
ARR552 Apr 15, 2024
b1e6884
Fix adding tx that matches with tx that is being processed (#3559)
agnusmor Apr 15, 2024
9f7361d
synchronizer: check l1blocks (#3546)
joanestebanr Apr 16, 2024
f543774
Fix + remove empty blocks (#3564)
ARR552 Apr 17, 2024
5da5dbd
Fix/#3565 reorg (#3566)
ARR552 Apr 17, 2024
76793bb
fix L1InfoRoot when an error happens during the process of the L1 inf…
ARR552 Apr 22, 2024
e10b4a9
added logs to analyze blocking issue when storing L2 block
agnusmor Apr 22, 2024
2b972bc
add debug logs for datastreamer
agnusmor Apr 22, 2024
7a0b72d
fix #3581 synchronizer panic synchronizing from trusted node (#3582)
joanestebanr Apr 23, 2024
ec6691a
synchronized: #3583 stop sync from l2 after no closed batch (#3584)
joanestebanr Apr 23, 2024
8af746a
Update datastream lib to the latest version with additional debug info
dpunish3r Apr 24, 2024
b7a2484
update dslib client interface
dpunish3r Apr 24, 2024
05a4826
Merge pull request #3592 from 0xPolygonHermez/feature/extralogdslib
dpunish3r Apr 24, 2024
939da90
fix log (#3595)
ARR552 Apr 25, 2024
34e4854
fix #3598 update GER when closing batch (#3599)
joanestebanr Apr 29, 2024
5a76fb5
Change data stream format (#3597)
ToniRamirezM Apr 29, 2024
e261069
Revert "Change data stream format (#3597)" (#3603)
ToniRamirezM Apr 29, 2024
8d5cf96
Sequencer L2 block parallel processing improvements (#3604)
agnusmor Apr 30, 2024
3ce6ff8
Update DS Format (#3608)
ToniRamirezM Apr 30, 2024
3aac36b
proto batch end (#3612)
ToniRamirezM May 2, 2024
02ba1fc
fix genesis DS (#3615)
ToniRamirezM May 3, 2024
de387c7
Fix DSSendL2Block batch number (#3617)
ToniRamirezM May 3, 2024
f7b11f6
latest proto (#3620)
ToniRamirezM May 6, 2024
3ee3b6e
Fix DSSendBatchEnd (#3621)
agnusmor May 6, 2024
ff71691
add TxFeeCap config (#3611)
tclemos May 9, 2024
60d6c74
Add delay when getting storedFlushId from the executor/hashdb (#3625)
agnusmor May 22, 2024
fb2c4e4
cherry-pick: fix #3613 timestamp needs to be greater or equal (#3614)…
joanestebanr May 22, 2024
de0329d
Fix use of L2coinbase configured in sequencesender.L2Coinbase paramet…
agnusmor May 22, 2024
0ab583a
Feature/3640 synchronizer choose to sync from l2 (#3641)
joanestebanr May 23, 2024
6023dca
change synchronization config params 'Enable' to 'Enabled' (#3656)
joanestebanr May 27, 2024
0233b40
Cherry-pick #3650: Do fatal when datastream channel is full (workarou…
agnusmor May 27, 2024
d9a1a10
add optimistic gas computation while estimating gas (#3653)
tclemos May 28, 2024
cea67d1
Use Eth block hash for l2 blocks in data stream (#3661)
ToniRamirezM May 30, 2024
d9a240f
empty imStateRoot (#3663)
ToniRamirezM May 30, 2024
92add9a
Cherry-pick #3659,#3662: Remove sync with virtual state (synchronizer…
agnusmor May 31, 2024
8361140
remove db tx from RPC (#3648) (#3683)
tclemos Jun 5, 2024
68fb048
remove synchronizer dependency from eth tx manager to confirm monitor…
tclemos Jun 5, 2024
d555d65
Cherry-pick #3669: Add WriteTimeout config parameter to StreamServer …
agnusmor Jun 5, 2024
bdeddb3
change imstateroot handling in DS (#3698)
ToniRamirezM Jun 6, 2024
f008730
use dbTx in SequentialBatchSanityCheck (#3722)
ToniRamirezM Jul 9, 2024
9664818
support forkid 10 and forkid11 (#3731)
joanestebanr Jul 16, 2024
7aa74dc
kill inactive datastream clients (#3727)
agnusmor Jul 16, 2024
19beaa9
Add mined l1blocknumber to MonitoredTxResult. Undo forkid10 and forki…
agnusmor Jul 18, 2024
8a1e192
Wait the state to be synced when starting (#3735)
agnusmor Jul 18, 2024
1adc67d
Fix update datastream file (#3741)
agnusmor Jul 24, 2024
f594715
fix tracer previous step memory pointers (#3740)
tclemos Jul 24, 2024
d20b6b2
Refactor datastream logs (#3743)
agnusmor Jul 30, 2024
adf526c
Fix tx OOC (node level) when first empty L2 block in batch (#3744)
agnusmor Aug 2, 2024
b9e0f64
Fix release github action (#3745) (#3747)
agnusmor Aug 2, 2024
520c9e3
fix invalid "updateGER" entry when updating datastream file on startu…
agnusmor Aug 5, 2024
8735f06
fix tx order in zkevm_getBatchByNumber endpoint (#3749)
agnusmor Aug 5, 2024
45a7413
add l2blockend to DS (#3751)
ToniRamirezM Aug 6, 2024
a774dc9
Fix timestamp when querying zkevm_getBatchByNumer and the batch is on…
agnusmor Aug 7, 2024
d3bd076
fix conflicts
arnaubennassar Aug 20, 2024
1d0d9a0
fix errors
arnaubennassar Aug 20, 2024
1e8d1ab
fix UTs
arnaubennassar Aug 20, 2024
2b87dd8
update docs
arnaubennassar Aug 20, 2024
e666ed1
update docs
arnaubennassar Aug 20, 2024
4b29f5d
polish diff and upgrade DAC DB to use docker compose instead of docke…
arnaubennassar Aug 20, 2024
29c3dcc
update docs
arnaubennassar Aug 20, 2024
a38a60f
update docs
arnaubennassar Aug 20, 2024
b3c0041
fix test genesis file
arnaubennassar Aug 20, 2024
02d2d32
added pre rollup sync logic
arnaubennassar Aug 24, 2024
a3c5e38
fix initial condition for fork ID intervals
arnaubennassar Aug 24, 2024
4e0a3f3
Fix CI
arnaubennassar Aug 24, 2024
51f0bb4
fix e2e
arnaubennassar Aug 26, 2024
6cd5cd7
wip
arnaubennassar Aug 28, 2024
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,4 @@ coverage.out
db/db-packr.go
db/packrd/
packrd/
nohup.out
2 changes: 2 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# .goreleaser.yaml
version: 2

builds:
- main: ./cmd/
goos:
Expand Down
58 changes: 21 additions & 37 deletions aggregator/aggregator.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,12 @@ func (a *Aggregator) Start(ctx context.Context) error {
return fmt.Errorf("failed to initialize proofs cache %w", err)
}

for !a.isSynced(ctx, nil) {
log.Info("Waiting for synchronizer to sync...")
time.Sleep(a.cfg.RetryTime.Duration)
continue
}

address := fmt.Sprintf("%s:%d", a.cfg.Host, a.cfg.Port)
lis, err := net.Listen("tcp", address)
if err != nil {
Expand Down Expand Up @@ -227,11 +233,6 @@ func (a *Aggregator) Channel(stream prover.AggregatorService_ChannelServer) erro
_, err = a.tryBuildFinalProof(ctx, prover, nil)
if err != nil {
log.Errorf("Error checking proofs to verify: %v", err)

if errors.Is(err, context.Canceled) {
// the context was canceled, just continue, the loop will stop in the <-ctx.Done() case
continue
}
}

proofGenerated, err := a.tryAggregateProofs(ctx, prover)
Expand Down Expand Up @@ -495,9 +496,10 @@ func (a *Aggregator) tryBuildFinalProof(ctx context.Context, prover proverInterf
}
log.Debug("Send final proof time reached")

if err = a.waitForSynchronizerToSyncUp(ctx, nil); err != nil {
log.Warn("waiting for the synchronizer to sync up was canceled", err)
return false, err
for !a.isSynced(ctx, nil) {
log.Info("Waiting for synchronizer to sync...")
time.Sleep(a.cfg.RetryTime.Duration)
continue
}

var lastVerifiedBatchNum uint64
Expand Down Expand Up @@ -1073,41 +1075,41 @@ func (a *Aggregator) resetVerifyProofTime() {

// isSynced checks if the state is synchronized with L1. If a batch number is
// provided, it makes sure that the state is synced with that batch.
func (a *Aggregator) isSynced(ctx context.Context, batchNum *uint64) (bool, error) {
func (a *Aggregator) isSynced(ctx context.Context, batchNum *uint64) bool {
// get latest verified batch as seen by the synchronizer
lastVerifiedBatch, err := a.State.GetLastVerifiedBatch(ctx, nil)
if err == state.ErrNotFound {
return false, nil
return false
}
if err != nil {
log.Warnf("Failed to get last consolidated batch: %v", err)
return false, err
return false
}

if lastVerifiedBatch == nil {
return false, nil
return false
}

if batchNum != nil && lastVerifiedBatch.BatchNumber < *batchNum {
log.Infof("Waiting for the state to be synced, lastVerifiedBatchNum: %d, waiting for batch: %d", lastVerifiedBatch.BatchNumber, batchNum)
return false, nil
return false
}

// latest verified batch in L1
lastVerifiedEthBatchNum, err := a.Ethman.GetLatestVerifiedBatchNum()
if err != nil {
log.Warnf("Failed to get last eth batch, err: %v", err)
return false, err
return false
}

// check if L2 is synced with L1
if lastVerifiedBatch.BatchNumber < lastVerifiedEthBatchNum {
log.Infof("Waiting for the state to be synced, lastVerifiedBatchNum: %d, lastVerifiedEthBatchNum: %d, waiting for batch",
lastVerifiedBatch.BatchNumber, lastVerifiedEthBatchNum)
return false, nil
return false
}

return true, nil
return true
}

func (a *Aggregator) buildInputProver(ctx context.Context, batchToVerify *state.Batch) (*prover.InputProver, error) {
Expand Down Expand Up @@ -1301,9 +1303,9 @@ func (a *Aggregator) handleMonitoredTxResult(result ethtxmanager.MonitoredTxResu

// wait for the synchronizer to catch up the verified batches
log.Debug("A final proof has been sent, waiting for the network to be synced")
if err := a.waitForSynchronizerToSyncUp(a.ctx, &proofBatchNumberFinal); err != nil {
log.Warn("waiting for the synchronizer to sync up was canceled", err)
return
for !a.isSynced(a.ctx, &proofBatchNumberFinal) {
log.Info("Waiting for synchronizer to sync...")
time.Sleep(a.cfg.RetryTime.Duration)
}

// network is synced with the final proof, we can safely delete all recursive
Expand All @@ -1314,24 +1316,6 @@ func (a *Aggregator) handleMonitoredTxResult(result ethtxmanager.MonitoredTxResu
}
}

func (a *Aggregator) waitForSynchronizerToSyncUp(ctx context.Context, batchNum *uint64) error {
for {
log.Info("waiting for the synchronizer to sync...")
synced, err := a.isSynced(ctx, batchNum)
if err != nil && errors.Is(err, context.Canceled) {
// if context is canceled, stop the loop, since it will never
// be able to execute properly and break in this case, and we will be stuck in it forever
return err
}

if synced {
return nil
}

time.Sleep(a.cfg.RetryTime.Duration)
}
}

func buildMonitoredTxID(batchNumber, batchNumberFinal uint64) string {
return fmt.Sprintf(monitoredIDFormat, batchNumber, batchNumberFinal)
}
Expand Down
73 changes: 1 addition & 72 deletions aggregator/aggregator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1450,79 +1450,8 @@ func TestIsSynced(t *testing.T) {
tc.setup(m, &a)
}

synced, _ := a.isSynced(a.ctx, tc.batchNum)
synced := a.isSynced(a.ctx, tc.batchNum)
assert.Equal(tc.synced, synced)
})
}
}

func TestWaitForSynchronizerToSyncUp(t *testing.T) {
t.Parallel()

cfg := Config{}
batchNum := uint64(42)
testCases := []struct {
name string
setup func(mox, *Aggregator)
batchNum *uint64
synced bool
}{
{
name: "state context canceled",
synced: false,
batchNum: &batchNum,
setup: func(m mox, a *Aggregator) {
m.stateMock.On("GetLastVerifiedBatch", mock.Anything, nil).Return(nil, context.Canceled).Once()
},
},
{
name: "ok after multiple iterations",
synced: true,
batchNum: &batchNum,
setup: func(m mox, a *Aggregator) {
latestVerifiedBatch := state.VerifiedBatch{BatchNumber: batchNum}
m.stateMock.On("GetLastVerifiedBatch", mock.Anything, nil).Return(nil, nil).Once()
m.stateMock.On("GetLastVerifiedBatch", mock.Anything, nil).Return(&latestVerifiedBatch, nil).Once()
m.etherman.On("GetLatestVerifiedBatchNum").Return(batchNum, nil).Once()
},
},
{
name: "ok with batch number",
synced: true,
batchNum: &batchNum,
setup: func(m mox, a *Aggregator) {
latestVerifiedBatch := state.VerifiedBatch{BatchNumber: batchNum}
m.stateMock.On("GetLastVerifiedBatch", mock.Anything, nil).Return(&latestVerifiedBatch, nil).Once()
m.etherman.On("GetLatestVerifiedBatchNum").Return(batchNum, nil).Once()
},
},
}
for _, tc := range testCases {
t.Run(tc.name, func(t *testing.T) {
stateMock := mocks.NewStateMock(t)
ethTxManager := mocks.NewEthTxManager(t)
etherman := mocks.NewEtherman(t)
proverMock := mocks.NewProverMock(t)
a, err := New(cfg, stateMock, ethTxManager, etherman, nil, nil)
require.NoError(t, err)
aggregatorCtx := context.WithValue(context.Background(), "owner", "aggregator") //nolint:staticcheck
a.ctx, a.exit = context.WithCancel(aggregatorCtx)
m := mox{
stateMock: stateMock,
ethTxManager: ethTxManager,
etherman: etherman,
proverMock: proverMock,
}
if tc.setup != nil {
tc.setup(m, &a)
}

err = a.waitForSynchronizerToSyncUp(a.ctx, tc.batchNum)
if tc.synced {
assert.NoError(t, err)
} else {
assert.Error(t, err)
}
})
}
}
25 changes: 4 additions & 21 deletions cmd/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -753,7 +753,8 @@ func forkIDIntervals(ctx context.Context, st *state.State, etherman *etherman.Cl
if err != nil && !errors.Is(err, state.ErrStateNotSynchronized) {
return []state.ForkIDInterval{}, fmt.Errorf("error checking lastL1BlockSynced. Error: %v", err)
}
if lastBlock != nil {
// If lastBlock is below genesisBlock means state.ErrStateNotSynchronized (haven't started yet the sync process, is doing pregenesis sync)
if lastBlock != nil && lastBlock.BlockNumber >= genesisBlockNumber {
log.Info("Getting forkIDs intervals. Please wait...")
// Read Fork ID FROM POE SC
forkIntervals, err := etherman.GetForks(ctx, genesisBlockNumber, lastBlock.BlockNumber)
Expand Down Expand Up @@ -793,32 +794,14 @@ func forkIDIntervals(ctx context.Context, st *state.State, etherman *etherman.Cl
}
forkIDIntervals = forkIntervals
} else {
log.Debug("Getting all forkIDs")

// Get last L1 block number
bn, err := etherman.GetLatestBlockNumber(ctx)
if err != nil {
return []state.ForkIDInterval{}, fmt.Errorf("error getting latest block number. Error: %v", err)
}

// Get all forkIDs since genesis
forkIntervals, err := etherman.GetForks(ctx, genesisBlockNumber, bn)
log.Debug("Getting initial forkID")
forkIntervals, err := etherman.GetForks(ctx, genesisBlockNumber, genesisBlockNumber)
if err != nil {
return []state.ForkIDInterval{}, fmt.Errorf("error getting forks. Please check the configuration. Error: %v", err)
} else if len(forkIntervals) == 0 {
return []state.ForkIDInterval{}, fmt.Errorf("error: no forkID received. It should receive at least one, please check the configuration...")
}
forkIDIntervals = forkIntervals

log.Debugf("Retrieved %d forkIDs", len(forkIDIntervals))

log.Debug("Adding forkIDs to db and memory")
for _, forkID := range forkIDIntervals {
err = st.AddForkIDInterval(ctx, forkID, nil)
if err != nil {
log.Fatal("error adding forkID to db. Error: ", err)
}
}
}
}
return forkIDIntervals, nil
Expand Down
8 changes: 8 additions & 0 deletions config/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,14 @@ func Test_Defaults(t *testing.T) {
path: "Sequencer.StreamServer.WriteTimeout",
expectedValue: types.NewDuration(5 * time.Second),
},
{
path: "Sequencer.StreamServer.InactivityTimeout",
expectedValue: types.NewDuration(120 * time.Second),
},
{
path: "Sequencer.StreamServer.InactivityCheckInterval",
expectedValue: types.NewDuration(5 * time.Second),
},
{
path: "Sequencer.StreamServer.Enabled",
expectedValue: false,
Expand Down
2 changes: 2 additions & 0 deletions config/default.go
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,8 @@ StateConsistencyCheckInterval = "5s"
Filename = ""
Version = 0
WriteTimeout = "5s"
InactivityTimeout = "120s"
InactivityCheckInterval = "5s"
Enabled = false

[SequenceSender]
Expand Down
Loading
Loading