-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* implementation completed, missing tests * WIP * WIP * WIP * sync refactor * decouple sync processors from EVM * Add CLI for aggOracle * WIP * wip * WIP * start reorg detector * fix docker * pass test with docker * add TODO * go mod tidy * Implement base addLeaf * pass test vectors * fix UT * Add PR review suggestions from Stefan-Ethernal * fix UTs * Add PR review suggestions from Stefan-Ethernal * fix datacommittee_test deploying proxy contract * fix UTs * WIP * WIP * abstract tree * Fix UTs * Add PR review suggestions from joanestebanr * Fix evmdownloader problems * refactor tree add and rollback to be atomic * simplify l1infotree * implementation done, test WIP * pass E2E test * remove outdated coment * make test shorter * Add coments * WIP * added E2E test * fix duplicated key case * Feature/lastgersync (#33) * wip * wip * implementation done * separated setup logic from aggoracle e2e * pass e2e * Fix sync UTs * Feature/claim sponsor (#35) * implementation done, missing finish e2e test * pass E2E * Feature/rpc (#40) * wip * wip * implementation done * separated setup logic from aggoracle e2e * pass e2e * Fix sync UTs * implementation done, missing finish e2e test * pass E2E * WIP * instantiate rpc on the cmd * add default config * WIP * wip * pass e2e test * close db txs * fix conflicts * add l1Info as part of the claim response * increase time.sleep to pass UT on GHA * apply requests from ToniRamirezM * fix block finality config * apply PR requests by Stefan-Ethernal * apply PR requests by goran-ethernal * Fixing warnings and go mod tidy * fix UTs --------- Co-authored-by: Stefan Negovanović <[email protected]> Co-authored-by: joanestebanr <[email protected]>
- Loading branch information
1 parent
a31cf47
commit 5294c24
Showing
50 changed files
with
4,446 additions
and
420 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package bridgesync | ||
|
||
import ( | ||
"github.com/0xPolygon/cdk/config/types" | ||
"github.com/ethereum/go-ethereum/common" | ||
) | ||
|
||
type Config struct { | ||
// DBPath path of the DB | ||
DBPath string `mapstructure:"DBPath"` | ||
// BlockFinality indicates the status of the blocks that will be queried in order to sync | ||
BlockFinality string `jsonschema:"enum=LatestBlock, enum=SafeBlock, enum=PendingBlock, enum=FinalizedBlock, enum=EarliestBlock" mapstructure:"BlockFinality"` | ||
// InitialBlockNum is the first block that will be queried when starting the synchronization from scratch. | ||
// It should be a number equal or bellow the creation of the bridge contract | ||
InitialBlockNum uint64 `mapstructure:"InitialBlockNum"` | ||
// BridgeAddr is the address of the bridge smart contract | ||
BridgeAddr common.Address `mapstructure:"BridgeAddr"` | ||
// SyncBlockChunkSize is the amount of blocks that will be queried to the client on each request | ||
SyncBlockChunkSize uint64 `mapstructure:"SyncBlockChunkSize"` | ||
// RetryAfterErrorPeriod is the time that will be waited when an unexpected error happens before retry | ||
RetryAfterErrorPeriod types.Duration `mapstructure:"RetryAfterErrorPeriod"` | ||
// MaxRetryAttemptsAfterError is the maximum number of consecutive attempts that will happen before panicing. | ||
// Any number smaller than zero will be considered as unlimited retries | ||
MaxRetryAttemptsAfterError int `mapstructure:"MaxRetryAttemptsAfterError"` | ||
// WaitForNewBlocksPeriod time that will be waited when the synchronizer has reached the latest block | ||
WaitForNewBlocksPeriod types.Duration `mapstructure:"WaitForNewBlocksPeriod"` | ||
} |
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
Oops, something went wrong.