From 9cb953ab4ca4778fdae812428aebf3ac73af99d6 Mon Sep 17 00:00:00 2001 From: Joan Esteban <129153821+joanestebanr@users.noreply.github.com> Date: Mon, 24 Feb 2025 10:22:19 +0100 Subject: [PATCH] fix: bug block not been processed yet (#302) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix: bug block not been processed yet * fix: undo change * fix: lint * fix: missing file * fix: use no real verifier * fix: e2e * fix: e2e * fix: e2e * fix: e2e * fix: e2e pin the Kurtosis version and try to provide agglayer_prover private key * fix: update agglayer image version in fork11 and fork9 configurations * fix: update cdk_erigon_node_image version in fork12 configurations * fix: add deployment stages for L2 contracts and update prover images in fork configurations * fix: set gas_token_address to empty string --------- Co-authored-by: Stefan Negovanović --- .github/workflows/test-e2e-multi_pp.yml | 2 +- .github/workflows/test-e2e.yml | 3 +- .golangci.yml | 4 - sync/evmdownloader.go | 12 +- sync/evmdownloader_test.go | 120 ++++--- sync/evmdriver_test.go | 6 +- sync/mock_downloader_test.go | 239 +------------- sync/mock_evm_downloader_test.go | 299 ++++++++++++++++++ test/Makefile | 3 +- test/combinations/fork11-rollup.yml | 12 +- test/combinations/fork12-cdk-validium.yml | 12 +- ...12-pessimistic-multi-attach-second-cdk.yml | 6 +- .../combinations/fork12-pessimistic-multi.yml | 12 +- test/combinations/fork12-pessimistic.yml | 13 +- test/combinations/fork12-rollup.yml | 13 +- test/combinations/fork9-cdk-validium.yml | 12 +- 16 files changed, 453 insertions(+), 315 deletions(-) create mode 100644 sync/mock_evm_downloader_test.go diff --git a/.github/workflows/test-e2e-multi_pp.yml b/.github/workflows/test-e2e-multi_pp.yml index f1e35e9c2..1cdeb0fb0 100644 --- a/.github/workflows/test-e2e-multi_pp.yml +++ b/.github/workflows/test-e2e-multi_pp.yml @@ -38,7 +38,7 @@ jobs: with: repository: 0xPolygon/kurtosis-cdk path: kurtosis-cdk - ref: v0.2.26 + ref: v0.2.31 - name: Install Kurtosis CDK tools uses: ./kurtosis-cdk/.github/actions/setup-kurtosis-cdk diff --git a/.github/workflows/test-e2e.yml b/.github/workflows/test-e2e.yml index a31f7d4f5..cfd8d0a66 100644 --- a/.github/workflows/test-e2e.yml +++ b/.github/workflows/test-e2e.yml @@ -52,7 +52,7 @@ jobs: with: repository: 0xPolygon/kurtosis-cdk path: kurtosis-cdk - ref: v0.2.25 + ref: v0.2.31 - name: Install Kurtosis CDK tools uses: ./kurtosis-cdk/.github/actions/setup-kurtosis-cdk @@ -88,6 +88,7 @@ jobs: KURTOSIS_FOLDER: ${{ github.workspace }}/kurtosis-cdk BATS_LIB_PATH: /usr/lib/ agglayer_prover_sp1_key: ${{ secrets.SP1_PRIVATE_KEY }} + - name: Dump enclave logs if: failure() diff --git a/.golangci.yml b/.golangci.yml index 00f172357..21a536651 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -3,10 +3,6 @@ run: timeout: 3m tests: true - skip-dirs-use-default: true - -service: - golangci-lint-version: 1.61.0 linters: disable-all: true diff --git a/sync/evmdownloader.go b/sync/evmdownloader.go index f293b3b7c..ecaf0fb51 100644 --- a/sync/evmdownloader.go +++ b/sync/evmdownloader.go @@ -153,14 +153,18 @@ func (d *EVMDownloader) Download(ctx context.Context, fromBlock uint64, download blocks := d.GetEventsByBlockRange(ctx, fromBlock, requestToBlock) d.log.Debugf("result events from blocks [%d to %d] -> len(blocks)=%d", fromBlock, requestToBlock, len(blocks)) - if toBlock <= lastFinalizedBlockNumber { + if requestToBlock <= lastFinalizedBlockNumber { + d.log.Debugf("range in safe zone: requestToBlock:%d <= finalized: %d", + requestToBlock, lastFinalizedBlockNumber) d.reportBlocks(downloadedCh, blocks, lastFinalizedBlockNumber) - if blocks.Len() == 0 || blocks[blocks.Len()-1].Num < toBlock { - d.reportEmptyBlock(ctx, downloadedCh, toBlock, lastFinalizedBlockNumber) + if blocks.Len() == 0 || blocks[blocks.Len()-1].Num < requestToBlock { + d.reportEmptyBlock(ctx, downloadedCh, requestToBlock, lastFinalizedBlockNumber) } - fromBlock = toBlock + 1 + fromBlock = requestToBlock + 1 toBlock = fromBlock + d.syncBlockChunkSize } else { + d.log.Debugf("range in not in safe zone: requestToBlock:%d <= finalized: %d", + requestToBlock, lastFinalizedBlockNumber) if blocks.Len() == 0 { if lastFinalizedBlockNumber >= fromBlock { emptyBlock := lastFinalizedBlockNumber diff --git a/sync/evmdownloader_test.go b/sync/evmdownloader_test.go index fed8a8e16..8300768d0 100644 --- a/sync/evmdownloader_test.go +++ b/sync/evmdownloader_test.go @@ -312,24 +312,7 @@ func TestGetLogs(t *testing.T) { } func TestDownloadBeforeFinalized(t *testing.T) { - mockEthDownloader := NewEVMDownloaderMock(t) - - ctx := context.Background() - ctx1, cancel := context.WithCancel(ctx) - defer cancel() - - downloader, _ := NewTestDownloader(t, time.Millisecond) - downloader.EVMDownloaderInterface = mockEthDownloader - - steps := []struct { - finalizedBlock uint64 - fromBlock, toBlock uint64 - eventsReponse EVMBlocks - waitForNewBlocks bool - waitForNewBlocksRequest uint64 - waitForNewBlockReply uint64 - getBlockHeader *EVMBlockHeader - }{ + steps := []evmTestStep{ {finalizedBlock: 33, fromBlock: 1, toBlock: 11, waitForNewBlocks: true, waitForNewBlocksRequest: 0, waitForNewBlockReply: 35, getBlockHeader: &EVMBlockHeader{Num: 11}}, {finalizedBlock: 33, fromBlock: 12, toBlock: 22, eventsReponse: EVMBlocks{createEVMBlock(t, 14, true)}, getBlockHeader: &EVMBlockHeader{Num: 22}}, // It returns the last block of range, so it don't need to create a empty one @@ -349,41 +332,18 @@ func TestDownloadBeforeFinalized(t *testing.T) { {finalizedBlock: 61, fromBlock: 61, toBlock: 61, waitForNewBlocks: true, waitForNewBlocksRequest: 60, waitForNewBlockReply: 61, getBlockHeader: &EVMBlockHeader{Num: 61}}, {finalizedBlock: 61, fromBlock: 62, toBlock: 62, waitForNewBlocks: true, waitForNewBlocksRequest: 61, waitForNewBlockReply: 62}, } - for i := 0; i < len(steps); i++ { - log.Info("iteration: ", i, "------------------------------------------------") - downloadCh := make(chan EVMBlock, 100) - downloader, _ := NewTestDownloader(t, time.Millisecond) - downloader.EVMDownloaderInterface = mockEthDownloader - downloader.setStopDownloaderOnIterationN(i + 1) - expectedBlocks := EVMBlocks{} - for _, step := range steps[:i+1] { - mockEthDownloader.On("GetLastFinalizedBlock", mock.Anything).Return(&types.Header{Number: big.NewInt(int64(step.finalizedBlock))}, nil).Once() - if step.waitForNewBlocks { - mockEthDownloader.On("WaitForNewBlocks", mock.Anything, step.waitForNewBlocksRequest).Return(step.waitForNewBlockReply).Once() - } - mockEthDownloader.On("GetEventsByBlockRange", mock.Anything, step.fromBlock, step.toBlock). - Return(step.eventsReponse, false).Once() - for _, eventBlock := range step.eventsReponse { - expectedBlocks = append(expectedBlocks, eventBlock) - } - if step.getBlockHeader != nil { - log.Infof("iteration:%d : GetBlockHeader(%d) ", i, step.getBlockHeader.Num) - mockEthDownloader.On("GetBlockHeader", mock.Anything, step.getBlockHeader.Num).Return(*step.getBlockHeader, false).Once() - expectedBlocks = append(expectedBlocks, &EVMBlock{ - EVMBlockHeader: *step.getBlockHeader, - IsFinalizedBlock: step.getBlockHeader.Num <= step.finalizedBlock, - }) - } - } - downloader.Download(ctx1, 1, downloadCh) - mockEthDownloader.AssertExpectations(t) - for _, expectedBlock := range expectedBlocks { - log.Debugf("waiting block %d ", expectedBlock.Num) - actualBlock := <-downloadCh - log.Debugf("block %d received!", actualBlock.Num) - require.Equal(t, *expectedBlock, actualBlock) - } + runSteps(t, 1, steps) +} + +func TestCaseAskLastBlockIfFinalitySameAsTargetBlock(t *testing.T) { + steps := []evmTestStep{ + {finalizedBlock: 105, fromBlock: 99, toBlock: 105, waitForNewBlocks: true, waitForNewBlocksRequest: 0, waitForNewBlockReply: 105, getBlockHeader: &EVMBlockHeader{Num: 105}}, + {finalizedBlock: 110, fromBlock: 106, toBlock: 110, waitForNewBlocks: true, waitForNewBlocksRequest: 105, waitForNewBlockReply: 110, getBlockHeader: &EVMBlockHeader{Num: 110}}, + // Here is the bug: + // - the range 111-115 returns block: 106. So the code must emit the block 106 and also the block 115 as empty (last block) + {finalizedBlock: 115, fromBlock: 111, toBlock: 115, waitForNewBlocks: true, waitForNewBlocksRequest: 110, waitForNewBlockReply: 115, eventsReponse: EVMBlocks{createEVMBlock(t, 106, false)}, getBlockHeader: &EVMBlockHeader{Num: 115}}, } + runSteps(t, 99, steps) } func buildAppender() LogAppenderMap { @@ -424,3 +384,59 @@ func createEVMBlock(t *testing.T, num uint64, isSafeBlock bool) *EVMBlock { }, } } + +type evmTestStep struct { + finalizedBlock uint64 + fromBlock, toBlock uint64 + eventsReponse EVMBlocks + waitForNewBlocks bool + waitForNewBlocksRequest uint64 + waitForNewBlockReply uint64 + getBlockHeader *EVMBlockHeader +} + +func runSteps(t *testing.T, fromBlock uint64, steps []evmTestStep) { + t.Helper() + mockEthDownloader := NewEVMDownloaderMock(t) + + ctx := context.Background() + ctx1, cancel := context.WithCancel(ctx) + defer cancel() + + downloader, _ := NewTestDownloader(t, time.Millisecond) + downloader.EVMDownloaderInterface = mockEthDownloader + + for i := 0; i < len(steps); i++ { + log.Info("iteration: ", i, "------------------------------------------------") + downloadCh := make(chan EVMBlock, 100) + downloader, _ := NewTestDownloader(t, time.Millisecond) + downloader.EVMDownloaderInterface = mockEthDownloader + downloader.setStopDownloaderOnIterationN(i + 1) + expectedBlocks := EVMBlocks{} + for _, step := range steps[:i+1] { + mockEthDownloader.On("GetLastFinalizedBlock", mock.Anything).Return(&types.Header{Number: big.NewInt(int64(step.finalizedBlock))}, nil).Once() + if step.waitForNewBlocks { + mockEthDownloader.On("WaitForNewBlocks", mock.Anything, step.waitForNewBlocksRequest).Return(step.waitForNewBlockReply).Once() + } + mockEthDownloader.On("GetEventsByBlockRange", mock.Anything, step.fromBlock, step.toBlock). + Return(step.eventsReponse, false).Once() + expectedBlocks = append(expectedBlocks, step.eventsReponse...) + if step.getBlockHeader != nil { + log.Infof("iteration:%d : GetBlockHeader(%d) ", i, step.getBlockHeader.Num) + mockEthDownloader.On("GetBlockHeader", mock.Anything, step.getBlockHeader.Num).Return(*step.getBlockHeader, false).Once() + expectedBlocks = append(expectedBlocks, &EVMBlock{ + EVMBlockHeader: *step.getBlockHeader, + IsFinalizedBlock: step.getBlockHeader.Num <= step.finalizedBlock, + }) + } + } + downloader.Download(ctx1, fromBlock, downloadCh) + mockEthDownloader.AssertExpectations(t) + for _, expectedBlock := range expectedBlocks { + log.Debugf("waiting block %d ", expectedBlock.Num) + actualBlock := <-downloadCh + log.Debugf("block %d received!", actualBlock.Num) + require.Equal(t, *expectedBlock, actualBlock) + } + } +} diff --git a/sync/evmdriver_test.go b/sync/evmdriver_test.go index 9edbf0b2b..3c3d60ffe 100644 --- a/sync/evmdriver_test.go +++ b/sync/evmdriver_test.go @@ -25,7 +25,7 @@ func TestSync(t *testing.T) { } rdm := NewReorgDetectorMock(t) pm := NewProcessorMock(t) - dm := NewEVMDownloaderMock(t) + dm := NewDownloaderMock(t) firstReorgedBlock := make(chan uint64) reorgProcessed := make(chan bool) rdm.On("Subscribe", reorgDetectorID).Return(&reorgdetector.Subscription{ @@ -126,7 +126,7 @@ func TestHandleNewBlock(t *testing.T) { } rdm := NewReorgDetectorMock(t) pm := NewProcessorMock(t) - dm := NewEVMDownloaderMock(t) + dm := NewDownloaderMock(t) rdm.On("Subscribe", reorgDetectorID).Return(&reorgdetector.Subscription{}, nil) driver, err := NewEVMDriver(rdm, pm, dm, reorgDetectorID, 10, rh) require.NoError(t, err) @@ -206,7 +206,7 @@ func TestHandleReorg(t *testing.T) { } rdm := NewReorgDetectorMock(t) pm := NewProcessorMock(t) - dm := NewEVMDownloaderMock(t) + dm := NewDownloaderMock(t) reorgProcessed := make(chan bool) rdm.On("Subscribe", reorgDetectorID).Return(&reorgdetector.Subscription{ ReorgProcessed: reorgProcessed, diff --git a/sync/mock_downloader_test.go b/sync/mock_downloader_test.go index 43fed1ede..ad6b0d542 100644 --- a/sync/mock_downloader_test.go +++ b/sync/mock_downloader_test.go @@ -5,30 +5,29 @@ package sync import ( context "context" - types "github.com/ethereum/go-ethereum/core/types" mock "github.com/stretchr/testify/mock" ) -// EVMDownloaderMock is an autogenerated mock type for the evmDownloaderFull type -type EVMDownloaderMock struct { +// DownloaderMock is an autogenerated mock type for the downloader type +type DownloaderMock struct { mock.Mock } -type EVMDownloaderMock_Expecter struct { +type DownloaderMock_Expecter struct { mock *mock.Mock } -func (_m *EVMDownloaderMock) EXPECT() *EVMDownloaderMock_Expecter { - return &EVMDownloaderMock_Expecter{mock: &_m.Mock} +func (_m *DownloaderMock) EXPECT() *DownloaderMock_Expecter { + return &DownloaderMock_Expecter{mock: &_m.Mock} } // Download provides a mock function with given fields: ctx, fromBlock, downloadedCh -func (_m *EVMDownloaderMock) Download(ctx context.Context, fromBlock uint64, downloadedCh chan EVMBlock) { +func (_m *DownloaderMock) Download(ctx context.Context, fromBlock uint64, downloadedCh chan EVMBlock) { _m.Called(ctx, fromBlock, downloadedCh) } -// EVMDownloaderMock_Download_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Download' -type EVMDownloaderMock_Download_Call struct { +// DownloaderMock_Download_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Download' +type DownloaderMock_Download_Call struct { *mock.Call } @@ -36,238 +35,34 @@ type EVMDownloaderMock_Download_Call struct { // - ctx context.Context // - fromBlock uint64 // - downloadedCh chan EVMBlock -func (_e *EVMDownloaderMock_Expecter) Download(ctx interface{}, fromBlock interface{}, downloadedCh interface{}) *EVMDownloaderMock_Download_Call { - return &EVMDownloaderMock_Download_Call{Call: _e.mock.On("Download", ctx, fromBlock, downloadedCh)} +func (_e *DownloaderMock_Expecter) Download(ctx interface{}, fromBlock interface{}, downloadedCh interface{}) *DownloaderMock_Download_Call { + return &DownloaderMock_Download_Call{Call: _e.mock.On("Download", ctx, fromBlock, downloadedCh)} } -func (_c *EVMDownloaderMock_Download_Call) Run(run func(ctx context.Context, fromBlock uint64, downloadedCh chan EVMBlock)) *EVMDownloaderMock_Download_Call { +func (_c *DownloaderMock_Download_Call) Run(run func(ctx context.Context, fromBlock uint64, downloadedCh chan EVMBlock)) *DownloaderMock_Download_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(uint64), args[2].(chan EVMBlock)) }) return _c } -func (_c *EVMDownloaderMock_Download_Call) Return() *EVMDownloaderMock_Download_Call { +func (_c *DownloaderMock_Download_Call) Return() *DownloaderMock_Download_Call { _c.Call.Return() return _c } -func (_c *EVMDownloaderMock_Download_Call) RunAndReturn(run func(context.Context, uint64, chan EVMBlock)) *EVMDownloaderMock_Download_Call { +func (_c *DownloaderMock_Download_Call) RunAndReturn(run func(context.Context, uint64, chan EVMBlock)) *DownloaderMock_Download_Call { _c.Run(run) return _c } -// GetBlockHeader provides a mock function with given fields: ctx, blockNum -func (_m *EVMDownloaderMock) GetBlockHeader(ctx context.Context, blockNum uint64) (EVMBlockHeader, bool) { - ret := _m.Called(ctx, blockNum) - - if len(ret) == 0 { - panic("no return value specified for GetBlockHeader") - } - - var r0 EVMBlockHeader - var r1 bool - if rf, ok := ret.Get(0).(func(context.Context, uint64) (EVMBlockHeader, bool)); ok { - return rf(ctx, blockNum) - } - if rf, ok := ret.Get(0).(func(context.Context, uint64) EVMBlockHeader); ok { - r0 = rf(ctx, blockNum) - } else { - r0 = ret.Get(0).(EVMBlockHeader) - } - - if rf, ok := ret.Get(1).(func(context.Context, uint64) bool); ok { - r1 = rf(ctx, blockNum) - } else { - r1 = ret.Get(1).(bool) - } - - return r0, r1 -} - -// EVMDownloaderMock_GetBlockHeader_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetBlockHeader' -type EVMDownloaderMock_GetBlockHeader_Call struct { - *mock.Call -} - -// GetBlockHeader is a helper method to define mock.On call -// - ctx context.Context -// - blockNum uint64 -func (_e *EVMDownloaderMock_Expecter) GetBlockHeader(ctx interface{}, blockNum interface{}) *EVMDownloaderMock_GetBlockHeader_Call { - return &EVMDownloaderMock_GetBlockHeader_Call{Call: _e.mock.On("GetBlockHeader", ctx, blockNum)} -} - -func (_c *EVMDownloaderMock_GetBlockHeader_Call) Run(run func(ctx context.Context, blockNum uint64)) *EVMDownloaderMock_GetBlockHeader_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(uint64)) - }) - return _c -} - -func (_c *EVMDownloaderMock_GetBlockHeader_Call) Return(_a0 EVMBlockHeader, _a1 bool) *EVMDownloaderMock_GetBlockHeader_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *EVMDownloaderMock_GetBlockHeader_Call) RunAndReturn(run func(context.Context, uint64) (EVMBlockHeader, bool)) *EVMDownloaderMock_GetBlockHeader_Call { - _c.Call.Return(run) - return _c -} - -// GetEventsByBlockRange provides a mock function with given fields: ctx, fromBlock, toBlock -func (_m *EVMDownloaderMock) GetEventsByBlockRange(ctx context.Context, fromBlock uint64, toBlock uint64) EVMBlocks { - ret := _m.Called(ctx, fromBlock, toBlock) - - if len(ret) == 0 { - panic("no return value specified for GetEventsByBlockRange") - } - - var r0 EVMBlocks - if rf, ok := ret.Get(0).(func(context.Context, uint64, uint64) EVMBlocks); ok { - r0 = rf(ctx, fromBlock, toBlock) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(EVMBlocks) - } - } - - return r0 -} - -// GetLastFinalizedBlock provides a mock function with given fields: ctx -func (_m *EVMDownloaderMock) GetLastFinalizedBlock(ctx context.Context) (*types.Header, error) { - ret := _m.Called(ctx) - - if len(ret) == 0 { - panic("no return value specified for GetLastFinalizedBlock") - } - - var r0 *types.Header - var r1 error - if rf, ok := ret.Get(0).(func(context.Context) (*types.Header, error)); ok { - return rf(ctx) - } - if rf, ok := ret.Get(0).(func(context.Context) *types.Header); ok { - r0 = rf(ctx) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*types.Header) - } - } - - if rf, ok := ret.Get(1).(func(context.Context) error); ok { - r1 = rf(ctx) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// GetLogs provides a mock function with given fields: ctx, fromBlock, toBlock -func (_m *EVMDownloaderMock) GetLogs(ctx context.Context, fromBlock uint64, toBlock uint64) []types.Log { - ret := _m.Called(ctx, fromBlock, toBlock) - - if len(ret) == 0 { - panic("no return value specified for GetLogs") - } - - var r0 []types.Log - if rf, ok := ret.Get(0).(func(context.Context, uint64, uint64) []types.Log); ok { - r0 = rf(ctx, fromBlock, toBlock) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]types.Log) - } - } - - return r0 -} - -// EVMDownloaderMock_GetLogs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetLogs' -type EVMDownloaderMock_GetLogs_Call struct { - *mock.Call -} - -// GetLogs is a helper method to define mock.On call -// - ctx context.Context -// - fromBlock uint64 -// - toBlock uint64 -func (_e *EVMDownloaderMock_Expecter) GetLogs(ctx interface{}, fromBlock interface{}, toBlock interface{}) *EVMDownloaderMock_GetLogs_Call { - return &EVMDownloaderMock_GetLogs_Call{Call: _e.mock.On("GetLogs", ctx, fromBlock, toBlock)} -} - -func (_c *EVMDownloaderMock_GetLogs_Call) Run(run func(ctx context.Context, fromBlock uint64, toBlock uint64)) *EVMDownloaderMock_GetLogs_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(uint64), args[2].(uint64)) - }) - return _c -} - -func (_c *EVMDownloaderMock_GetLogs_Call) Return(_a0 []types.Log) *EVMDownloaderMock_GetLogs_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *EVMDownloaderMock_GetLogs_Call) RunAndReturn(run func(context.Context, uint64, uint64) []types.Log) *EVMDownloaderMock_GetLogs_Call { - _c.Call.Return(run) - return _c -} - -// WaitForNewBlocks provides a mock function with given fields: ctx, lastBlockSeen -func (_m *EVMDownloaderMock) WaitForNewBlocks(ctx context.Context, lastBlockSeen uint64) uint64 { - ret := _m.Called(ctx, lastBlockSeen) - - if len(ret) == 0 { - panic("no return value specified for WaitForNewBlocks") - } - - var r0 uint64 - if rf, ok := ret.Get(0).(func(context.Context, uint64) uint64); ok { - r0 = rf(ctx, lastBlockSeen) - } else { - r0 = ret.Get(0).(uint64) - } - - return r0 -} - -// EVMDownloaderMock_WaitForNewBlocks_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WaitForNewBlocks' -type EVMDownloaderMock_WaitForNewBlocks_Call struct { - *mock.Call -} - -// WaitForNewBlocks is a helper method to define mock.On call -// - ctx context.Context -// - lastBlockSeen uint64 -func (_e *EVMDownloaderMock_Expecter) WaitForNewBlocks(ctx interface{}, lastBlockSeen interface{}) *EVMDownloaderMock_WaitForNewBlocks_Call { - return &EVMDownloaderMock_WaitForNewBlocks_Call{Call: _e.mock.On("WaitForNewBlocks", ctx, lastBlockSeen)} -} - -func (_c *EVMDownloaderMock_WaitForNewBlocks_Call) Run(run func(ctx context.Context, lastBlockSeen uint64)) *EVMDownloaderMock_WaitForNewBlocks_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(uint64)) - }) - return _c -} - -func (_c *EVMDownloaderMock_WaitForNewBlocks_Call) Return(newLastBlock uint64) *EVMDownloaderMock_WaitForNewBlocks_Call { - _c.Call.Return(newLastBlock) - return _c -} - -func (_c *EVMDownloaderMock_WaitForNewBlocks_Call) RunAndReturn(run func(context.Context, uint64) uint64) *EVMDownloaderMock_WaitForNewBlocks_Call { - _c.Call.Return(run) - return _c -} - -// NewEVMDownloaderMock creates a new instance of EVMDownloaderMock. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// NewDownloaderMock creates a new instance of DownloaderMock. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. // The first argument is typically a *testing.T value. -func NewEVMDownloaderMock(t interface { +func NewDownloaderMock(t interface { mock.TestingT Cleanup(func()) -}) *EVMDownloaderMock { - mock := &EVMDownloaderMock{} +}) *DownloaderMock { + mock := &DownloaderMock{} mock.Mock.Test(t) t.Cleanup(func() { mock.AssertExpectations(t) }) diff --git a/sync/mock_evm_downloader_test.go b/sync/mock_evm_downloader_test.go new file mode 100644 index 000000000..8933ddfc1 --- /dev/null +++ b/sync/mock_evm_downloader_test.go @@ -0,0 +1,299 @@ +// Code generated by mockery. DO NOT EDIT. + +package sync + +import ( + context "context" + + types "github.com/ethereum/go-ethereum/core/types" + mock "github.com/stretchr/testify/mock" +) + +// EVMDownloaderMock is an autogenerated mock type for the EVMDownloaderInterface type +type EVMDownloaderMock struct { + mock.Mock +} + +type EVMDownloaderMock_Expecter struct { + mock *mock.Mock +} + +func (_m *EVMDownloaderMock) EXPECT() *EVMDownloaderMock_Expecter { + return &EVMDownloaderMock_Expecter{mock: &_m.Mock} +} + +// GetBlockHeader provides a mock function with given fields: ctx, blockNum +func (_m *EVMDownloaderMock) GetBlockHeader(ctx context.Context, blockNum uint64) (EVMBlockHeader, bool) { + ret := _m.Called(ctx, blockNum) + + if len(ret) == 0 { + panic("no return value specified for GetBlockHeader") + } + + var r0 EVMBlockHeader + var r1 bool + if rf, ok := ret.Get(0).(func(context.Context, uint64) (EVMBlockHeader, bool)); ok { + return rf(ctx, blockNum) + } + if rf, ok := ret.Get(0).(func(context.Context, uint64) EVMBlockHeader); ok { + r0 = rf(ctx, blockNum) + } else { + r0 = ret.Get(0).(EVMBlockHeader) + } + + if rf, ok := ret.Get(1).(func(context.Context, uint64) bool); ok { + r1 = rf(ctx, blockNum) + } else { + r1 = ret.Get(1).(bool) + } + + return r0, r1 +} + +// EVMDownloaderMock_GetBlockHeader_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetBlockHeader' +type EVMDownloaderMock_GetBlockHeader_Call struct { + *mock.Call +} + +// GetBlockHeader is a helper method to define mock.On call +// - ctx context.Context +// - blockNum uint64 +func (_e *EVMDownloaderMock_Expecter) GetBlockHeader(ctx interface{}, blockNum interface{}) *EVMDownloaderMock_GetBlockHeader_Call { + return &EVMDownloaderMock_GetBlockHeader_Call{Call: _e.mock.On("GetBlockHeader", ctx, blockNum)} +} + +func (_c *EVMDownloaderMock_GetBlockHeader_Call) Run(run func(ctx context.Context, blockNum uint64)) *EVMDownloaderMock_GetBlockHeader_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(uint64)) + }) + return _c +} + +func (_c *EVMDownloaderMock_GetBlockHeader_Call) Return(_a0 EVMBlockHeader, _a1 bool) *EVMDownloaderMock_GetBlockHeader_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *EVMDownloaderMock_GetBlockHeader_Call) RunAndReturn(run func(context.Context, uint64) (EVMBlockHeader, bool)) *EVMDownloaderMock_GetBlockHeader_Call { + _c.Call.Return(run) + return _c +} + +// GetEventsByBlockRange provides a mock function with given fields: ctx, fromBlock, toBlock +func (_m *EVMDownloaderMock) GetEventsByBlockRange(ctx context.Context, fromBlock uint64, toBlock uint64) EVMBlocks { + ret := _m.Called(ctx, fromBlock, toBlock) + + if len(ret) == 0 { + panic("no return value specified for GetEventsByBlockRange") + } + + var r0 EVMBlocks + if rf, ok := ret.Get(0).(func(context.Context, uint64, uint64) EVMBlocks); ok { + r0 = rf(ctx, fromBlock, toBlock) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(EVMBlocks) + } + } + + return r0 +} + +// EVMDownloaderMock_GetEventsByBlockRange_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetEventsByBlockRange' +type EVMDownloaderMock_GetEventsByBlockRange_Call struct { + *mock.Call +} + +// GetEventsByBlockRange is a helper method to define mock.On call +// - ctx context.Context +// - fromBlock uint64 +// - toBlock uint64 +func (_e *EVMDownloaderMock_Expecter) GetEventsByBlockRange(ctx interface{}, fromBlock interface{}, toBlock interface{}) *EVMDownloaderMock_GetEventsByBlockRange_Call { + return &EVMDownloaderMock_GetEventsByBlockRange_Call{Call: _e.mock.On("GetEventsByBlockRange", ctx, fromBlock, toBlock)} +} + +func (_c *EVMDownloaderMock_GetEventsByBlockRange_Call) Run(run func(ctx context.Context, fromBlock uint64, toBlock uint64)) *EVMDownloaderMock_GetEventsByBlockRange_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(uint64), args[2].(uint64)) + }) + return _c +} + +func (_c *EVMDownloaderMock_GetEventsByBlockRange_Call) Return(_a0 EVMBlocks) *EVMDownloaderMock_GetEventsByBlockRange_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *EVMDownloaderMock_GetEventsByBlockRange_Call) RunAndReturn(run func(context.Context, uint64, uint64) EVMBlocks) *EVMDownloaderMock_GetEventsByBlockRange_Call { + _c.Call.Return(run) + return _c +} + +// GetLastFinalizedBlock provides a mock function with given fields: ctx +func (_m *EVMDownloaderMock) GetLastFinalizedBlock(ctx context.Context) (*types.Header, error) { + ret := _m.Called(ctx) + + if len(ret) == 0 { + panic("no return value specified for GetLastFinalizedBlock") + } + + var r0 *types.Header + var r1 error + if rf, ok := ret.Get(0).(func(context.Context) (*types.Header, error)); ok { + return rf(ctx) + } + if rf, ok := ret.Get(0).(func(context.Context) *types.Header); ok { + r0 = rf(ctx) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*types.Header) + } + } + + if rf, ok := ret.Get(1).(func(context.Context) error); ok { + r1 = rf(ctx) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// EVMDownloaderMock_GetLastFinalizedBlock_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetLastFinalizedBlock' +type EVMDownloaderMock_GetLastFinalizedBlock_Call struct { + *mock.Call +} + +// GetLastFinalizedBlock is a helper method to define mock.On call +// - ctx context.Context +func (_e *EVMDownloaderMock_Expecter) GetLastFinalizedBlock(ctx interface{}) *EVMDownloaderMock_GetLastFinalizedBlock_Call { + return &EVMDownloaderMock_GetLastFinalizedBlock_Call{Call: _e.mock.On("GetLastFinalizedBlock", ctx)} +} + +func (_c *EVMDownloaderMock_GetLastFinalizedBlock_Call) Run(run func(ctx context.Context)) *EVMDownloaderMock_GetLastFinalizedBlock_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *EVMDownloaderMock_GetLastFinalizedBlock_Call) Return(_a0 *types.Header, _a1 error) *EVMDownloaderMock_GetLastFinalizedBlock_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *EVMDownloaderMock_GetLastFinalizedBlock_Call) RunAndReturn(run func(context.Context) (*types.Header, error)) *EVMDownloaderMock_GetLastFinalizedBlock_Call { + _c.Call.Return(run) + return _c +} + +// GetLogs provides a mock function with given fields: ctx, fromBlock, toBlock +func (_m *EVMDownloaderMock) GetLogs(ctx context.Context, fromBlock uint64, toBlock uint64) []types.Log { + ret := _m.Called(ctx, fromBlock, toBlock) + + if len(ret) == 0 { + panic("no return value specified for GetLogs") + } + + var r0 []types.Log + if rf, ok := ret.Get(0).(func(context.Context, uint64, uint64) []types.Log); ok { + r0 = rf(ctx, fromBlock, toBlock) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]types.Log) + } + } + + return r0 +} + +// EVMDownloaderMock_GetLogs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetLogs' +type EVMDownloaderMock_GetLogs_Call struct { + *mock.Call +} + +// GetLogs is a helper method to define mock.On call +// - ctx context.Context +// - fromBlock uint64 +// - toBlock uint64 +func (_e *EVMDownloaderMock_Expecter) GetLogs(ctx interface{}, fromBlock interface{}, toBlock interface{}) *EVMDownloaderMock_GetLogs_Call { + return &EVMDownloaderMock_GetLogs_Call{Call: _e.mock.On("GetLogs", ctx, fromBlock, toBlock)} +} + +func (_c *EVMDownloaderMock_GetLogs_Call) Run(run func(ctx context.Context, fromBlock uint64, toBlock uint64)) *EVMDownloaderMock_GetLogs_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(uint64), args[2].(uint64)) + }) + return _c +} + +func (_c *EVMDownloaderMock_GetLogs_Call) Return(_a0 []types.Log) *EVMDownloaderMock_GetLogs_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *EVMDownloaderMock_GetLogs_Call) RunAndReturn(run func(context.Context, uint64, uint64) []types.Log) *EVMDownloaderMock_GetLogs_Call { + _c.Call.Return(run) + return _c +} + +// WaitForNewBlocks provides a mock function with given fields: ctx, lastBlockSeen +func (_m *EVMDownloaderMock) WaitForNewBlocks(ctx context.Context, lastBlockSeen uint64) uint64 { + ret := _m.Called(ctx, lastBlockSeen) + + if len(ret) == 0 { + panic("no return value specified for WaitForNewBlocks") + } + + var r0 uint64 + if rf, ok := ret.Get(0).(func(context.Context, uint64) uint64); ok { + r0 = rf(ctx, lastBlockSeen) + } else { + r0 = ret.Get(0).(uint64) + } + + return r0 +} + +// EVMDownloaderMock_WaitForNewBlocks_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WaitForNewBlocks' +type EVMDownloaderMock_WaitForNewBlocks_Call struct { + *mock.Call +} + +// WaitForNewBlocks is a helper method to define mock.On call +// - ctx context.Context +// - lastBlockSeen uint64 +func (_e *EVMDownloaderMock_Expecter) WaitForNewBlocks(ctx interface{}, lastBlockSeen interface{}) *EVMDownloaderMock_WaitForNewBlocks_Call { + return &EVMDownloaderMock_WaitForNewBlocks_Call{Call: _e.mock.On("WaitForNewBlocks", ctx, lastBlockSeen)} +} + +func (_c *EVMDownloaderMock_WaitForNewBlocks_Call) Run(run func(ctx context.Context, lastBlockSeen uint64)) *EVMDownloaderMock_WaitForNewBlocks_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(uint64)) + }) + return _c +} + +func (_c *EVMDownloaderMock_WaitForNewBlocks_Call) Return(newLastBlock uint64) *EVMDownloaderMock_WaitForNewBlocks_Call { + _c.Call.Return(newLastBlock) + return _c +} + +func (_c *EVMDownloaderMock_WaitForNewBlocks_Call) RunAndReturn(run func(context.Context, uint64) uint64) *EVMDownloaderMock_WaitForNewBlocks_Call { + _c.Call.Return(run) + return _c +} + +// NewEVMDownloaderMock creates a new instance of EVMDownloaderMock. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewEVMDownloaderMock(t interface { + mock.TestingT + Cleanup(func()) +}) *EVMDownloaderMock { + mock := &EVMDownloaderMock{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/test/Makefile b/test/Makefile index 2e81a453a..7795836a3 100644 --- a/test/Makefile +++ b/test/Makefile @@ -46,7 +46,8 @@ generate-mocks-aggoracle: ## Generates mocks for aggoracle, using mockery tool .PHONY: generate-mocks-sync generate-mocks-sync: ## Generates mocks for sync, using mockery tool export "GOROOT=$$(go env GOROOT)" && $$(go env GOPATH)/bin/mockery --name=EthClienter --dir=../sync --output=../sync --outpkg=sync --inpackage --structname=L2Mock --filename=mock_l2_test.go ${COMMON_MOCKERY_PARAMS} - export "GOROOT=$$(go env GOROOT)" && $$(go env GOPATH)/bin/mockery --name=evmDownloaderFull --dir=../sync --output=../sync --outpkg=sync --inpackage --structname=EVMDownloaderMock --filename=mock_downloader_test.go ${COMMON_MOCKERY_PARAMS} + export "GOROOT=$$(go env GOROOT)" && $$(go env GOPATH)/bin/mockery --name=EVMDownloaderInterface --dir=../sync --output=../sync --outpkg=sync --inpackage --structname=EVMDownloaderMock --filename=mock_evm_downloader_test.go ${COMMON_MOCKERY_PARAMS} + export "GOROOT=$$(go env GOROOT)" && $$(go env GOPATH)/bin/mockery --name=downloader --dir=../sync --output=../sync --outpkg=sync --inpackage --structname=DownloaderMock --filename=mock_downloader_test.go ${COMMON_MOCKERY_PARAMS} export "GOROOT=$$(go env GOROOT)" && $$(go env GOPATH)/bin/mockery --name=processorInterface --dir=../sync --output=../sync --outpkg=sync --inpackage --structname=ProcessorMock --filename=mock_processor_test.go ${COMMON_MOCKERY_PARAMS} export "GOROOT=$$(go env GOROOT)" && $$(go env GOPATH)/bin/mockery --name=ReorgDetector --dir=../sync --output=../sync --outpkg=sync --inpackage --structname=ReorgDetectorMock --filename=mock_reorgdetector_test.go ${COMMON_MOCKERY_PARAMS} diff --git a/test/combinations/fork11-rollup.yml b/test/combinations/fork11-rollup.yml index 80491430f..ef28985f7 100644 --- a/test/combinations/fork11-rollup.yml +++ b/test/combinations/fork11-rollup.yml @@ -1,9 +1,15 @@ +deployment_stages: + deploy_l2_contracts: true + args: + agglayer_image: ghcr.io/agglayer/agglayer:0.2.0-rc.19 zkevm_contracts_image: leovct/zkevm-contracts:v7.0.0-rc.2-fork.11-patch.1 zkevm_prover_image: hermeznetwork/zkevm-prover:v7.0.2-fork.11 - cdk_erigon_node_image: hermeznetwork/cdk-erigon:v2.1.2 zkevm_node_image: hermeznetwork/zkevm-node:v0.7.0-fork11-RC1 - cdk_node_image: cdk + cdk_node_image: cdk:latest gas_token_enabled: true - data_availability_mode: rollup + gas_token_address: "" + consensus_contract_type: rollup sequencer_type: erigon + # This is just a workaround, since the Kurtosis is deploying the agglayer even in the FEP setup + agglayer_prover_sp1_key: {{.agglayer_prover_sp1_key}} diff --git a/test/combinations/fork12-cdk-validium.yml b/test/combinations/fork12-cdk-validium.yml index f4d914c67..b0437e74a 100644 --- a/test/combinations/fork12-cdk-validium.yml +++ b/test/combinations/fork12-cdk-validium.yml @@ -1,8 +1,14 @@ +deployment_stages: + deploy_l2_contracts: true + args: zkevm_contracts_image: leovct/zkevm-contracts:v8.0.0-rc.4-fork.12-patch.1 zkevm_prover_image: hermeznetwork/zkevm-prover:v8.0.0-RC12-fork.12 - cdk_erigon_node_image: hermeznetwork/cdk-erigon:v2.1.2 - cdk_node_image: cdk + cdk_erigon_node_image: hermeznetwork/cdk-erigon:v2.61.14-RC1-amd64 + cdk_node_image: cdk:latest gas_token_enabled: true - data_availability_mode: cdk-validium + gas_token_address: "" + consensus_contract_type: cdk-validium sequencer_type: erigon + # This is just a workaround, since the Kurtosis is deploying the agglayer even in the FEP setup + agglayer_prover_sp1_key: {{.agglayer_prover_sp1_key}} diff --git a/test/combinations/fork12-pessimistic-multi-attach-second-cdk.yml b/test/combinations/fork12-pessimistic-multi-attach-second-cdk.yml index 2b02f6023..28ab383b0 100644 --- a/test/combinations/fork12-pessimistic-multi-attach-second-cdk.yml +++ b/test/combinations/fork12-pessimistic-multi-attach-second-cdk.yml @@ -27,14 +27,14 @@ args: cdk_node_image: cdk:latest - cdk_erigon_node_image: hermeznetwork/cdk-erigon:v2.61.2 - zkevm_contracts_image: leovct/zkevm-contracts:v9.0.0-rc.3-pp-fork.12-patch.1 + cdk_erigon_node_image: hermeznetwork/cdk-erigon:v2.61.14-RC1-amd64 + zkevm_contracts_image: leovct/zkevm-contracts:v9.0.0-rc.5-pp-fork.12 additional_services: [] consensus_contract_type: pessimistic sequencer_type: erigon erigon_strict_mode: false gas_token_enabled: false - zkevm_use_real_verifier: true + zkevm_use_real_verifier: false enable_normalcy: true verifier_program_vkey: 0x00766aa16a6efe4ac05c0fe21d4b50f9631dbd1a2663a982da861427085ea2ea diff --git a/test/combinations/fork12-pessimistic-multi.yml b/test/combinations/fork12-pessimistic-multi.yml index 0b917569b..b46283048 100644 --- a/test/combinations/fork12-pessimistic-multi.yml +++ b/test/combinations/fork12-pessimistic-multi.yml @@ -1,17 +1,17 @@ args: cdk_node_image: cdk:latest - agglayer_image: ghcr.io/agglayer/agglayer:0.2.0-rc.20 - cdk_erigon_node_image: hermeznetwork/cdk-erigon:v2.61.2 - zkevm_contracts_image: leovct/zkevm-contracts:v9.0.0-rc.3-pp-fork.12-patch.1 - zkevm_bridge_proxy_image: haproxy:3.1-bookworm - zkevm_bridge_service_image: hermeznetwork/zkevm-bridge-service:v0.6.0-RC5 + agglayer_image: ghcr.io/agglayer/agglayer:main + cdk_erigon_node_image: hermeznetwork/cdk-erigon:v2.61.9-RC1 + zkevm_contracts_image: leovct/zkevm-contracts:v9.0.0-rc.5-pp-fork.12 additional_services: [] consensus_contract_type: pessimistic sequencer_type: erigon erigon_strict_mode: false gas_token_enabled: false - zkevm_use_real_verifier: true + zkevm_use_real_verifier: false enable_normalcy: true verifier_program_vkey: 0x00766aa16a6efe4ac05c0fe21d4b50f9631dbd1a2663a982da861427085ea2ea agglayer_prover_sp1_key: {{.agglayer_prover_sp1_key}} + + diff --git a/test/combinations/fork12-pessimistic.yml b/test/combinations/fork12-pessimistic.yml index 8e68a4b96..bb653fe6c 100644 --- a/test/combinations/fork12-pessimistic.yml +++ b/test/combinations/fork12-pessimistic.yml @@ -1,15 +1,18 @@ args: - agglayer_image: ghcr.io/agglayer/agglayer:0.2.0-rc.20 - cdk_erigon_node_image: hermeznetwork/cdk-erigon:v2.61.2 - cdk_node_image: cdk + agglayer_image: ghcr.io/agglayer/agglayer:main + cdk_erigon_node_image: hermeznetwork/cdk-erigon:v2.61.14-RC1-amd64 + zkevm_contracts_image: leovct/zkevm-contracts:v9.0.0-rc.5-pp-fork.12 + cdk_node_image: cdk:latest zkevm_bridge_proxy_image: haproxy:3.1-bookworm zkevm_bridge_service_image: hermeznetwork/zkevm-bridge-service:v0.6.0-RC5 zkevm_bridge_ui_image: leovct/zkevm-bridge-ui:multi-network - zkevm_contracts_image: leovct/zkevm-contracts:v9.0.0-rc.3-pp-fork.12-patch.1 additional_services: [] consensus_contract_type: pessimistic sequencer_type: erigon erigon_strict_mode: false gas_token_enabled: true - agglayer_prover_sp1_key: {{.agglayer_prover_sp1_key}} + gas_token_address: "" + zkevm_use_real_verifier: false enable_normalcy: true + verifier_program_vkey: 0x00766aa16a6efe4ac05c0fe21d4b50f9631dbd1a2663a982da861427085ea2ea + \ No newline at end of file diff --git a/test/combinations/fork12-rollup.yml b/test/combinations/fork12-rollup.yml index 32d3ef8e4..4d10ba139 100644 --- a/test/combinations/fork12-rollup.yml +++ b/test/combinations/fork12-rollup.yml @@ -1,8 +1,13 @@ +deployment_stages: + deploy_l2_contracts: true + args: zkevm_contracts_image: leovct/zkevm-contracts:v8.0.0-rc.4-fork.12-patch.1 - zkevm_prover_image: hermeznetwork/zkevm-prover:v8.0.0-RC12-fork.12 - cdk_erigon_node_image: hermeznetwork/cdk-erigon:v2.1.2 - cdk_node_image: cdk + zkevm_prover_image: hermeznetwork/zkevm-prover:v8.0.0-RC16-fork.12 + cdk_erigon_node_image: hermeznetwork/cdk-erigon:v2.61.14-RC1-amd64 + cdk_node_image: cdk:latest gas_token_enabled: true - data_availability_mode: rollup + gas_token_address: "" + consensus_contract_type: rollup sequencer_type: erigon + agglayer_prover_sp1_key: {{.agglayer_prover_sp1_key}} diff --git a/test/combinations/fork9-cdk-validium.yml b/test/combinations/fork9-cdk-validium.yml index 515819b62..788df9624 100644 --- a/test/combinations/fork9-cdk-validium.yml +++ b/test/combinations/fork9-cdk-validium.yml @@ -1,12 +1,18 @@ +deployment_stages: + deploy_l2_contracts: true + args: + agglayer_image: ghcr.io/agglayer/agglayer:0.2.0-rc.19 zkevm_contracts_image: leovct/zkevm-contracts:v6.0.0-rc.1-fork.9-patch.1 zkevm_prover_image: hermeznetwork/zkevm-prover:v6.0.6 - cdk_erigon_node_image: hermeznetwork/cdk-erigon:v2.1.2 zkevm_node_image: hermeznetwork/zkevm-node:v0.7.3-RC1 cdk_validium_node_image: 0xpolygon/cdk-validium-node:0.7.0-cdk - cdk_node_image: cdk + consensus_contract_type: cdk-validium + cdk_node_image: cdk:latest gas_token_enabled: true + gas_token_address: "" additional_services: - pless_zkevm_node - data_availability_mode: cdk-validium sequencer_type: erigon + # This is just a workaround, since the Kurtosis is deploying the agglayer even in the FEP setup + agglayer_prover_sp1_key: {{.agglayer_prover_sp1_key}}