forked from 0xPolygonHermez/zkevm-node
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Sync L1InfoRoot since upgrade to LxLy rollup manager (0xPolygonHermez…
…#3397) * Find etrog update and if it's before genesis block synchronizer previous L1InfoRoot
- Loading branch information
1 parent
6225e52
commit badc2cb
Showing
19 changed files
with
1,268 additions
and
164 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
synchronizer/common/syncinterfaces/block_range_processor.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package syncinterfaces | ||
|
||
import ( | ||
"context" | ||
|
||
"github.com/0xPolygonHermez/zkevm-node/etherman" | ||
"github.com/ethereum/go-ethereum/common" | ||
"github.com/jackc/pgx/v4" | ||
) | ||
|
||
type ProcessBlockRangeL1BlocksMode bool | ||
|
||
const ( | ||
StoreL1Blocks ProcessBlockRangeL1BlocksMode = true | ||
NoStoreL1Blocks ProcessBlockRangeL1BlocksMode = false | ||
) | ||
|
||
type BlockRangeProcessor interface { | ||
ProcessBlockRange(ctx context.Context, blocks []etherman.Block, order map[common.Hash][]etherman.Order) error | ||
ProcessBlockRangeSingleDbTx(ctx context.Context, blocks []etherman.Block, order map[common.Hash][]etherman.Order, storeBlocks ProcessBlockRangeL1BlocksMode, dbTx pgx.Tx) error | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
synchronizer/common/syncinterfaces/l1_event_processor_manager.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package syncinterfaces | ||
|
||
import ( | ||
"context" | ||
|
||
"github.com/0xPolygonHermez/zkevm-node/etherman" | ||
"github.com/0xPolygonHermez/zkevm-node/synchronizer/actions" | ||
"github.com/jackc/pgx/v4" | ||
) | ||
|
||
type L1EventProcessorManager interface { | ||
Process(ctx context.Context, forkId actions.ForkIdType, order etherman.Order, block *etherman.Block, dbTx pgx.Tx) error | ||
Get(forkId actions.ForkIdType, event etherman.EventOrder) actions.L1EventProcessor | ||
} |
142 changes: 142 additions & 0 deletions
142
synchronizer/common/syncinterfaces/mocks/block_range_processor.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.