Skip to content

Commit

Permalink
t# This is a combination of 2 commits.
Browse files Browse the repository at this point in the history
change mock eth l1 image add genesis
  • Loading branch information
giskook committed May 10, 2024
1 parent 1c51e3d commit 3fc8820
Show file tree
Hide file tree
Showing 20 changed files with 124 additions and 166 deletions.
2 changes: 1 addition & 1 deletion ci/e2e-group-dac-1/cli_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ func TestSetDataAvailabilityProtocol(t *testing.T) {
clientL1, err := ethclient.Dial(operations.DefaultL1NetworkURL)
require.NoError(t, err)

auth, err := operations.GetAuth("0xde3ca643a52f5543e84ba984c4419ff40dbabd0e483c31c1d09fee8168d68e38", operations.DefaultL1ChainID)
auth, err := operations.GetAuth("0x815405dddb0e2a99b12af775fd2929e526704e1d1aea6a0b4e74dc33e2f7fcd2", operations.DefaultL1ChainID)
require.NoError(t, err)

// New DAC Setup
Expand Down
4 changes: 2 additions & 2 deletions docs/config-file/node-config-doc.html

Large diffs are not rendered by default.

9 changes: 4 additions & 5 deletions docs/config-file/node-config-doc.md
Original file line number Diff line number Diff line change
Expand Up @@ -3199,8 +3199,7 @@ in the processPendingL2Blocks go func
SequentialProcessL2Block=false
```

#### <a name="Sequencer_Finalizer_Metrics"></a>10.7.14. `[Sequencer.Finalizer.Metrics]`
#### <a name="Sequencer_Finalizer_FullBatchSleepDuration"></a>10.7.13. `Sequencer.Finalizer.FullBatchSleepDuration`
#### <a name="Sequencer_Finalizer_FullBatchSleepDuration"></a>10.7.14. `Sequencer.Finalizer.FullBatchSleepDuration`

**Title:** Duration

Expand All @@ -3227,7 +3226,7 @@ FullBatchSleepDuration is the time the finalizer sleeps between each full batch
FullBatchSleepDuration="0s"
```

#### <a name="Sequencer_Finalizer_Metrics"></a>10.7.14. `[Sequencer.Finalizer.Metrics]`
#### <a name="Sequencer_Finalizer_Metrics"></a>10.7.15. `[Sequencer.Finalizer.Metrics]`

**Type:** : `object`
**Description:** Metrics is the config for the sequencer metrics
Expand All @@ -3237,7 +3236,7 @@ FullBatchSleepDuration="0s"
| - [Interval](#Sequencer_Finalizer_Metrics_Interval ) | No | string | No | - | Duration |
| - [EnableLog](#Sequencer_Finalizer_Metrics_EnableLog ) | No | boolean | No | - | EnableLog is a flag to enable/disable metrics logs |

##### <a name="Sequencer_Finalizer_Metrics_Interval"></a>10.7.14.1. `Sequencer.Finalizer.Metrics.Interval`
##### <a name="Sequencer_Finalizer_Metrics_Interval"></a>10.7.15.1. `Sequencer.Finalizer.Metrics.Interval`

**Title:** Duration

Expand All @@ -3263,7 +3262,7 @@ FullBatchSleepDuration="0s"
Interval="1h0m0s"
```

##### <a name="Sequencer_Finalizer_Metrics_EnableLog"></a>10.7.14.2. `Sequencer.Finalizer.Metrics.EnableLog`
##### <a name="Sequencer_Finalizer_Metrics_EnableLog"></a>10.7.15.2. `Sequencer.Finalizer.Metrics.EnableLog`

**Type:** : `boolean`

Expand Down
5 changes: 0 additions & 5 deletions state/mocks/mock_storage_xlayer.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,6 @@ func TestL1SequenceBatchesTrustedBatchSequencedThatAlreadyExistsHappyPath(t *tes
l1InfoRoot := common.HexToHash(hashExamplesValues[0])
l1Block := newL1Block(mocks, batch, l1InfoRoot)
expectationsPreExecution(t, mocks, ctx, batch, nil)

mocks.Synchronizer.EXPECT().IsTrustedSequencer().Return(false)
executionResponse := newProcessBatchResponseV2(batch)
expectationsForExecution(t, mocks, ctx, l1Block.SequencedBatches[1][0], l1Block.ReceivedAt, executionResponse)
mocks.State.EXPECT().UpdateBatchTimestamp(ctx, batch.BatchNumber, l1Block.ReceivedAt, mocks.DbTx).Return(nil)
Expand All @@ -121,7 +119,6 @@ func TestL1SequenceBatchesPermissionlessBatchSequencedThatAlreadyExistsHappyPath
l1Block := newL1Block(mocks, batch, l1InfoRoot)
expectationsPreExecution(t, mocks, ctx, batch, nil)
executionResponse := newProcessBatchResponseV2(batch)
mocks.Synchronizer.EXPECT().IsTrustedSequencer().Return(false)
expectationsForExecution(t, mocks, ctx, l1Block.SequencedBatches[1][0], l1Block.ReceivedAt, executionResponse)
mocks.State.EXPECT().UpdateBatchTimestamp(ctx, batch.BatchNumber, l1Block.ReceivedAt, mocks.DbTx).Return(nil)
mocks.State.EXPECT().AddAccumulatedInputHash(ctx, executionResponse.NewBatchNum, common.BytesToHash(executionResponse.NewAccInputHash), mocks.DbTx).Return(nil)
Expand Down
28 changes: 0 additions & 28 deletions synchronizer/actions/etrog/processor_l1_sequence_batches_xlayer.go

This file was deleted.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion synchronizer/synchronizer.go
Original file line number Diff line number Diff line change
Expand Up @@ -1003,7 +1003,7 @@ func (s *ClientSynchronizer) newCheckReorg(latestStoredBlock *state.Block, synce
log.Infof("[checkReorg function] reorgedBlockNumber: %d reorgedBlockHash already synced: %s", reorgedBlock.BlockNumber, reorgedBlock.BlockHash.String())

// Compare hashes
if (block.BlockHash != reorgedBlock.BlockHash || block.ParentHash != reorgedBlock.ParentHash) && reorgedBlock.BlockNumber > s.genesis.RollupBlockNumber{
if (block.BlockHash != reorgedBlock.BlockHash || block.ParentHash != reorgedBlock.ParentHash) && reorgedBlock.BlockNumber > s.genesis.RollupBlockNumber {
log.Infof("checkReorg: Bad block %d hashOk %t parentHashOk %t", reorgedBlock.BlockNumber, block.BlockHash == reorgedBlock.BlockHash, block.ParentHash == reorgedBlock.ParentHash)
log.Debug("[checkReorg function] => latestBlockNumber: ", reorgedBlock.BlockNumber)
log.Debug("[checkReorg function] => latestBlockHash: ", reorgedBlock.BlockHash)
Expand Down
10 changes: 5 additions & 5 deletions synchronizer/synchronizer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -923,7 +923,7 @@ func expectedCallsForsyncTrustedState(t *testing.T, m *mocks, sync *ClientSynchr

func TestReorg(t *testing.T) {
genesis := state.Genesis{
BlockNumber: uint64(0),
RollupBlockNumber: uint64(0),
}
cfg := Config{
SyncInterval: cfgTypes.Duration{Duration: 1 * time.Second},
Expand Down Expand Up @@ -1243,7 +1243,7 @@ func TestReorg(t *testing.T) {

func TestLatestSyncedBlockEmpty(t *testing.T) {
genesis := state.Genesis{
BlockNumber: uint64(0),
RollupBlockNumber: uint64(0),
}
cfg := Config{
SyncInterval: cfgTypes.Duration{Duration: 1 * time.Second},
Expand Down Expand Up @@ -1457,7 +1457,7 @@ func TestLatestSyncedBlockEmpty(t *testing.T) {

func TestRegularReorg(t *testing.T) {
genesis := state.Genesis{
BlockNumber: uint64(0),
RollupBlockNumber: uint64(0),
}
cfg := Config{
SyncInterval: cfgTypes.Duration{Duration: 1 * time.Second},
Expand Down Expand Up @@ -1739,7 +1739,7 @@ func TestRegularReorg(t *testing.T) {

func TestLatestSyncedBlockEmptyWithExtraReorg(t *testing.T) {
genesis := state.Genesis{
BlockNumber: uint64(0),
RollupBlockNumber: uint64(0),
}
cfg := Config{
SyncInterval: cfgTypes.Duration{Duration: 1 * time.Second},
Expand Down Expand Up @@ -2015,7 +2015,7 @@ func TestLatestSyncedBlockEmptyWithExtraReorg(t *testing.T) {

func TestCallFromEmptyBlockAndReorg(t *testing.T) {
genesis := state.Genesis{
BlockNumber: uint64(0),
RollupBlockNumber: uint64(0),
}
cfg := Config{
SyncInterval: cfgTypes.Duration{Duration: 1 * time.Second},
Expand Down
4 changes: 2 additions & 2 deletions test/config/test.da.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ PrivateKey = {Path = "/pk/test-member.keystore", Password = "testonly"}
[L1]
WsURL = "ws://xlayer-mock-l1-network:8546"
RpcURL = "http://xlayer-mock-l1-network:8545"
PolygonValidiumAddress = "0x975725832B4909Aab87D3604A0b501569dbBE7A9"
DataCommitteeAddress = "0x2f08F654B896208dD968aFdAEf733edC5FF62c03"
PolygonValidiumAddress = "0xeb173087729c88a47568AF87b17C653039377BA6"
DataCommitteeAddress = "0x3bFa19E4588962D1834B2e4007F150f4447Aa9fe"
Timeout = "3m"
RetryPeriod = "5s"
BlockBatchSize = 32
Expand Down
Loading

0 comments on commit 3fc8820

Please sign in to comment.