Compare commits

...

1 Commits

Author SHA1 Message Date
colinlyguo
b621cffd58 fix 2024-01-31 08:39:00 +08:00
4 changed files with 15 additions and 3 deletions

View File

@@ -17,7 +17,8 @@
"DAIGatewayAddr": "0x67260A8B73C5B77B55c1805218A42A7A6F98F515",
"ScrollChainAddr": "0xa13BAF47339d63B743e7Da8741db5456DAc1E556",
"GatewayRouterAddr": "0xF8B1378579659D8F7EE5f3C929c2f3E332E41Fd6",
"MessageQueueAddr": "0x0d7E906BD9cAFa154b048cFa766Cc1E54E39AF9B"
"MessageQueueAddr": "0x0d7E906BD9cAFa154b048cFa766Cc1E54E39AF9B",
"bypassReorgDetection": false
},
"L2": {
"confirmation": 0,

View File

@@ -28,6 +28,7 @@ type FetcherConfig struct {
ScrollChainAddr string `json:"ScrollChainAddr"`
GatewayRouterAddr string `json:"GatewayRouterAddr"`
MessageQueueAddr string `json:"MessageQueueAddr"`
BypassReorgDetection bool `json:"bypassReorgDetection"`
}
// RedisConfig redis config

View File

@@ -93,7 +93,13 @@ func NewL1FetcherLogic(cfg *config.FetcherConfig, db *gorm.DB, client *ethclient
gatewayList = append(gatewayList, common.HexToAddress(cfg.LIDOGatewayAddr))
}
log.Info("L1 Fetcher configured with the following address list", "addresses", addressList, "gateways", gatewayList)
// The walkaround is used when SDK mismatches the upstream.
if cfg.BypassReorgDetection {
log.Warn("bypass reorg detction in L1, setting confirmation as L1ReorgSafeDepth (64)")
cfg.Confirmation = L1ReorgSafeDepth
}
log.Info("NewL2FetcherLogic", "bypassReorgDetection", cfg.BypassReorgDetection, "confirmation", cfg.Confirmation, "addresses", addressList, "gateways", gatewayList)
f := &L1FetcherLogic{
db: db,

View File

@@ -88,7 +88,11 @@ func NewL2FetcherLogic(cfg *config.FetcherConfig, db *gorm.DB, client *ethclient
gatewayList = append(gatewayList, common.HexToAddress(cfg.USDCGatewayAddr))
}
log.Info("L2 Fetcher configured with the following address list", "addresses", addressList, "gateways", gatewayList)
if cfg.BypassReorgDetection {
log.Crit("Never bypass reorg detection in L2")
}
log.Info("NewL2FetcherLogic", "bypassReorgDetection", cfg.BypassReorgDetection, "confirmation", cfg.Confirmation, "addresses", addressList, "gateways", gatewayList)
f := &L2FetcherLogic{
db: db,