Skip to content

Commit

Permalink
fix(zkevm_api): pre forkid12 ger (#929)
Browse files Browse the repository at this point in the history
  • Loading branch information
revitteth authored and Igor Mandrigin committed Aug 7, 2024
1 parent a0bea3d commit 509d8ae
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 12 deletions.
9 changes: 2 additions & 7 deletions cmd/rpcdaemon/commands/zkevm_api.go
Original file line number Diff line number Diff line change
Expand Up @@ -668,15 +668,10 @@ func (api *ZkEvmAPIImpl) GetBatchByNumber(ctx context.Context, batchNumber rpc.B
return nil, err
}

itu, err := hermezDb.GetL1InfoTreeUpdateByGer(prevBatchGer)
if err != nil {
return nil, err
}

if itu == nil || batch.MainnetExitRoot == itu.MainnetExitRoot {
if batchGer == prevBatchGer {
batch.GlobalExitRoot = common.Hash{}
batch.MainnetExitRoot = common.Hash{}
batch.RollupExitRoot = common.Hash{}
batch.GlobalExitRoot = common.Hash{}
}
}

Expand Down
8 changes: 3 additions & 5 deletions zk/debug_tools/rpc-batch-compare/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ func getBatchByNumber(url string, number *big.Int) (map[string]interface{}, erro
requestBody, _ := json.Marshal(map[string]interface{}{
"jsonrpc": "2.0",
"method": "zkevm_getBatchByNumber",
"params": []interface{}{number.String(), true},
"params": []interface{}{number.String(), false},
"id": 1,
})

Expand Down Expand Up @@ -105,12 +105,10 @@ func compareBatches(erigonURL, legacyURL string, batchNumber *big.Int) (string,
// ignore list
il := []string{
"timestamp",
"verifyBatchTxHash",
"sendSequencesTxHash",
"accInputHash",
"globalExitRoot",
"mainnetExitRoot",
"transactions",
"rollupExitRoot",
"mainnetExitRoot",
}
for _, i := range il {
delete(batch1, i)
Expand Down

0 comments on commit 509d8ae

Please sign in to comment.