-
Notifications
You must be signed in to change notification settings - Fork 713
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feature/cherry pick 3370 3374 synchronizer, fix bugs, ReprocessFullBa…
…tchOnClose and AcceptEmptyClosedBatches (#3384) * synchronizer accepts empty closed batches from trusted depending on config (#3370) * accept empty closed batches depending on config * if trusted synchronization dont create L2 sync classes * sync reprocess full batch on close, check GER, and fix minor bugs (#3374) * sync reprocess full batch on close * reduce the of live of batch cache from 1hour to 5min * fix reprocess, check virtualBatch before reseting state * #3376 - check GlobalExitRoot before working on a batch * update same data as updateWIPBatch do in the cache of batches * set Synchronizer.L2Synchronization.ReprocessFullBatchOnClose to false * update documentation
- Loading branch information
1 parent
cd4c30c
commit fe1dacc
Showing
21 changed files
with
706 additions
and
213 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
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,25 @@ | ||
package client | ||
|
||
import ( | ||
"context" | ||
"fmt" | ||
"math/big" | ||
"testing" | ||
|
||
"github.com/0xPolygonHermez/zkevm-node/log" | ||
"github.com/stretchr/testify/require" | ||
) | ||
|
||
func TestZkevmGetBatch(t *testing.T) { | ||
t.Skip("This test is exploratory") | ||
// Create a new client | ||
client := NewClient("https://zkevm-rpc.com/") | ||
lastTrustedStateBatchNumberSeen, err := client.BatchNumber(context.Background()) | ||
require.NoError(t, err) | ||
log.Info("lastTrustedStateBatchNumberSeen: ", lastTrustedStateBatchNumberSeen) | ||
batch, err := client.BatchByNumber(context.Background(), big.NewInt(int64(lastTrustedStateBatchNumberSeen))) | ||
require.NoError(t, err) | ||
|
||
// Print the batch | ||
fmt.Println(batch) | ||
} |
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
Oops, something went wrong.