Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update fork-12 #181

Merged
merged 2 commits into from
Aug 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"test:selfdestruct": "npx mocha ./test/processor.test.js --selfdestruct",
"eslint": "npx eslint src/** test/*.test.js && npx eslint tools",
"eslint:fix": "npx eslint src/** test/*.test.js --fix && npx eslint tools --fix",
"test:update": "./tools/update-tests/update-tests.sh",
"test:update": "cd test && npx hardhat compile && cd .. && ./tools/update-tests/update-tests.sh",
"test:database": "npx mocha ./test/database.test.js",
"build:inputs": "npx mocha ./test/processor.test.js --update --geninputs && npx mocha ./test/processor.test.js --etrog --update --geninputs"
},
Expand Down
2 changes: 1 addition & 1 deletion test/contract-utils.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ describe('contractUtils', function () {
const expectedBatchHashData = '0x5e7875ab198c4d93379c92990a5d0111af59a0e62b2c4a0e3898e5bd24a18e58';
// TODO: input taken from pil-stark
const expectedStarkHashExecutor = '0xcfae2cfa3b8f3f12abce1bccd90e9b203dfdbe56c0c412114f2d3e67c9a897db';
const expectedSnarkInputHash = '14744991293971375789164639158836701110243288198095088376701471320299286035170';
const expectedSnarkInputHash = '19704504443275424030853930423657339055467823429269903357094355701515609372092';

before(async () => {
testVector = JSON.parse(fs.readFileSync(path.join(pathTestVectors, 'inputs-executor/input_executor.json')));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"id": 0,
"description": "Get timestamp",
"chainID": 1000,
"forkID": 9,
"forkID": 12,
"sequencerAddress": "0x617b3a3528F9cDd6630fd3301B9c8911F7Bf063D",
"sequencerPvtKey": "0x28b2b0318721be8c8339199172cd7cc8f5e273800a35616ec893083a4b32c02e",
"genesis": [
Expand Down Expand Up @@ -536,7 +536,7 @@
"id": 1,
"description": "Verify skip flags",
"chainID": 1000,
"forkID": 9,
"forkID": 12,
"sequencerAddress": "0x617b3a3528F9cDd6630fd3301B9c8911F7Bf063D",
"sequencerPvtKey": "0x28b2b0318721be8c8339199172cd7cc8f5e273800a35616ec893083a4b32c02e",
"genesis": [
Expand Down Expand Up @@ -828,7 +828,7 @@
"id": 2,
"description": "Previous batch partition in just one batch",
"chainID": 1000,
"forkID": 9,
"forkID": 12,
"sequencerAddress": "0x617b3a3528F9cDd6630fd3301B9c8911F7Bf063D",
"sequencerPvtKey": "0x28b2b0318721be8c8339199172cd7cc8f5e273800a35616ec893083a4b32c02e",
"genesis": [
Expand Down
2 changes: 1 addition & 1 deletion test/helpers/test-vectors/block-info/block-info.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"id": 0,
"description": "Get timestamp",
"chainID": 1000,
"forkID": 9,
"forkID": 12,
"sequencerAddress": "0x617b3a3528F9cDd6630fd3301B9c8911F7Bf063D",
"sequencerPvtKey": "0x28b2b0318721be8c8339199172cd7cc8f5e273800a35616ec893083a4b32c02e",
"genesis": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "Test end to end",
"bridgeDeployed": true,
"chainID": 1000,
"forkID": 9,
"forkID": 12,
"sequencerAddress": "0x617b3a3528F9cDd6630fd3301B9c8911F7Bf063D",
"sequencerPvtKey": "0x28b2b0318721be8c8339199172cd7cc8f5e273800a35616ec893083a4b32c02e",
"genesis": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"oldNumBatch": 0,
"newNumBatch": 1,
"chainID": 1000,
"forkID": 9,
"forkID": 12,
"forcedBlockHashL1": "0x0000000000000000000000000000000000000000000000000000000000000000",
"batchL2Data": "0x0b73e6af6e00000001ee80843b9aca00830186a0944d5cf5032b2a844602278b01199ed191a86c93ff88016345785d8a0000808203e880801cee7e01dc62f69a12c3510c6d64de04ee6346d84b6a017f3e786c7d87f963e75d8cc91fa983cd6d9cf55fff80d73bd26cd333b0f098acc1e58edb1fd484ad731bff0b0000000100000002",
"l1InfoRoot": "0x462ed3d694d640f04f637e5e3893e8d12f407a53f50201401fd992bb5ab0faf0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"id": 0,
"description": "2 accounts and 1 valid transaction.",
"chainID": 1000,
"forkID": 9,
"forkID": 12,
"sequencerAddress": "0x617b3a3528F9cDd6630fd3301B9c8911F7Bf063D",
"timestampLimit": 1944498031,
"forcedBlockHashL1": "0x0000000000000000000000000000000000000000000000000000000000000000",
Expand Down Expand Up @@ -181,7 +181,7 @@
"id": 1,
"description": "Forced batch: 2 accounts and 1 valid transaction",
"chainID": 1000,
"forkID": 9,
"forkID": 12,
"sequencerAddress": "0x617b3a3528F9cDd6630fd3301B9c8911F7Bf063D",
"timestampLimit": 1944498031,
"forcedBlockHashL1": "0xd4e56740f876aef8c010b86a40d5f56745a118d0906a34e69aec8c0db1cb8fa3",
Expand Down Expand Up @@ -265,7 +265,7 @@
"id": 2,
"description": "Forced batch: starts with changeL2Block --> invalid batch",
"chainID": 1000,
"forkID": 9,
"forkID": 12,
"sequencerAddress": "0x617b3a3528F9cDd6630fd3301B9c8911F7Bf063D",
"timestampLimit": 1944498031,
"forcedBlockHashL1": "0xd4e56740f876aef8c010b86a40d5f56745a118d0906a34e69aec8c0db1cb8fa3",
Expand Down Expand Up @@ -416,7 +416,7 @@
"id": 3,
"description": "invalid l1 info tree index",
"chainID": 1000,
"forkID": 9,
"forkID": 12,
"sequencerAddress": "0x617b3a3528F9cDd6630fd3301B9c8911F7Bf063D",
"timestampLimit": 1944498031,
"forcedBlockHashL1": "0x0000000000000000000000000000000000000000000000000000000000000000",
Expand Down
30 changes: 15 additions & 15 deletions test/helpers/test-vectors/processor/state-transition.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"id": 0,
"description": "2 accounts and 1 valid transaction.",
"chainID": 1000,
"forkID": 9,
"forkID": 12,
"sequencerAddress": "0x617b3a3528F9cDd6630fd3301B9c8911F7Bf063D",
"timestampLimit": 1944498031,
"genesis": [
Expand Down Expand Up @@ -89,7 +89,7 @@
"id": 1,
"description": "5 accounts. 2 valid tx, 3 invalid tx (same amount as balance, invalid nonce, invalid chain id 1)",
"chainID": 1000,
"forkID": 9,
"forkID": 12,
"sequencerAddress": "0x617b3a3528F9cDd6630fd3301B9c8911F7Bf063D",
"genesis": [
{
Expand Down Expand Up @@ -266,7 +266,7 @@
"id": 2,
"description": "2 accounts and 1 invalid tx (tx with more value than balance). Old root equals new root.",
"chainID": 1000,
"forkID": 9,
"forkID": 12,
"sequencerAddress": "0x617b3a3528F9cDd6630fd3301B9c8911F7Bf063D",
"genesis": [
{
Expand Down Expand Up @@ -348,7 +348,7 @@
"id": 3,
"description": "2 accounts and 4 invalid transactions. Two of the transactions have invalid from and to address so no rawTx is provided for them, can be ignored.Tx with same amount than balance and tx with invalid chain id (different chain id than sequencer). Old root equals new root",
"chainID": 1000,
"forkID": 9,
"forkID": 12,
"sequencerAddress": "0x617b3a3528F9cDd6630fd3301B9c8911F7Bf063D",
"genesis": [
{
Expand Down Expand Up @@ -465,7 +465,7 @@
"id": 4,
"description": "2 accounts and 1 invalid transaction. Wrong encode of the tx (invalid signature). Old root equals new root",
"chainID": 1000,
"forkID": 9,
"forkID": 12,
"sequencerAddress": "0x617b3a3528F9cDd6630fd3301B9c8911F7Bf063D",
"genesis": [
{
Expand Down Expand Up @@ -536,7 +536,7 @@
"id": 5,
"description": "2 accounts and 1 valid transaction, from and to are the same",
"chainID": 1000,
"forkID": 9,
"forkID": 12,
"sequencerAddress": "0x4d5Cf5032B2a844602278b01199ED191A86c93ff",
"genesis": [
{
Expand Down Expand Up @@ -622,7 +622,7 @@
"id": 6,
"description": "2 accounts. 1 valid tx, 3 invalid tx (same amount as balance, invalid nonce, invalid chain id",
"chainID": 1000,
"forkID": 9,
"forkID": 12,
"sequencerAddress": "0x4d5Cf5032B2a844602278b01199ED191A86c93ff",
"genesis": [
{
Expand Down Expand Up @@ -747,7 +747,7 @@
"id": 7,
"description": "2 accounts and 1 valid transaction, from, to and sequencer are the same",
"chainID": 1000,
"forkID": 9,
"forkID": 12,
"sequencerAddress": "0x617b3a3528F9cDd6630fd3301B9c8911F7Bf063D",
"genesis": [
{
Expand Down Expand Up @@ -833,7 +833,7 @@
"id": 8,
"description": "2 accounts and 2 valid transaction, sequencer is able to do the transaction because the fees are payed at the end of every tx",
"chainID": 1000,
"forkID": 9,
"forkID": 12,
"sequencerAddress": "0x617b3a3528F9cDd6630fd3301B9c8911F7Bf063D",
"genesis": [
{
Expand Down Expand Up @@ -932,7 +932,7 @@
"id": 9,
"description": "2 accounts and 4 valid transaction, 4 transactions from the same account",
"chainID": 1000,
"forkID": 9,
"forkID": 12,
"sequencerAddress": "0x4d5Cf5032B2a844602278b01199ED191A86c93ff",
"genesis": [
{
Expand Down Expand Up @@ -1057,7 +1057,7 @@
"id": 10,
"description": "2 accounts + 1 contract + and 2 valid transaction.",
"chainID": 1000,
"forkID": 9,
"forkID": 12,
"sequencerAddress": "0x617b3a3528F9cDd6630fd3301B9c8911F7Bf063D",
"sequencerPvtKey": "0x28b2b0318721be8c8339199172cd7cc8f5e273800a35616ec893083a4b32c02e",
"genesis": [
Expand Down Expand Up @@ -1184,7 +1184,7 @@
"id": 11,
"description": "2 accounts + 2 contract + and 1 tx to contract + contract call ",
"chainID": 1000,
"forkID": 9,
"forkID": 12,
"sequencerAddress": "0x617b3a3528F9cDd6630fd3301B9c8911F7Bf063D",
"sequencerPvtKey": "0x28b2b0318721be8c8339199172cd7cc8f5e273800a35616ec893083a4b32c02e",
"genesis": [
Expand Down Expand Up @@ -1306,7 +1306,7 @@
"id": 12,
"description": "2 accounts + 2 contract with constructor + and 1 tx to contract + 1 contract call",
"chainID": 1000,
"forkID": 9,
"forkID": 12,
"sequencerAddress": "0x617b3a3528F9cDd6630fd3301B9c8911F7Bf063D",
"sequencerPvtKey": "0x28b2b0318721be8c8339199172cd7cc8f5e273800a35616ec893083a4b32c02e",
"genesis": [
Expand Down Expand Up @@ -1439,7 +1439,7 @@
"id": 13,
"description": "2 accounts + and 1 tx to contract deploy + 1 call to deplyed contract",
"chainID": 1000,
"forkID": 9,
"forkID": 12,
"sequencerAddress": "0x617b3a3528F9cDd6630fd3301B9c8911F7Bf063D",
"sequencerPvtKey": "0x28b2b0318721be8c8339199172cd7cc8f5e273800a35616ec893083a4b32c02e",
"genesis": [
Expand Down Expand Up @@ -1572,7 +1572,7 @@
"id": 14,
"description": "2 accounts and 3 valid transactions",
"chainID": 1000,
"forkID": 9,
"forkID": 12,
"sequencerAddress": "0x617b3a3528F9cDd6630fd3301B9c8911F7Bf063D",
"timestampLimit": 1944498031,
"genesis": [
Expand Down
2 changes: 1 addition & 1 deletion test/helpers/test-vectors/selfdestruct/selfdestruct.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"id": 0,
"description": "Selfdestruct",
"chainID": 1000,
"forkID": 9,
"forkID": 12,
"sequencerAddress": "0x617b3a3528F9cDd6630fd3301B9c8911F7Bf063D",
"sequencerPvtKey": "0x28b2b0318721be8c8339199172cd7cc8f5e273800a35616ec893083a4b32c02e",
"genesis": [
Expand Down
4 changes: 2 additions & 2 deletions test/helpers/test-vectors/zkevm-db/recursive.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"id": 0,
"description": "2 accounts and 1 valid transaction.",
"chainID": 1000,
"forkID": 9,
"forkID": 12,
"sequencerAddress": "0x617b3a3528F9cDd6630fd3301B9c8911F7Bf063D",
"l1InfoRoot": "0x090bcaf734c4f06c93954a827b45a6e8c67b8e0fd1e0a35a1c5982d6961828f9",
"oldAccInputHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
Expand Down Expand Up @@ -214,6 +214,6 @@
"finalLocalExitRoot": "0x0000000000000000000000000000000000000000000000000000000000000000",
"finalAccInputHash": "0xe2d4571827432a99c09609d8f95dc8b207bfd6010b08e22462cf717597f788ff",
"finalNumBatch": 2,
"inputSnark": "0x0d0c2dbe320dac28e92bc27bff78a5dc2a6e77a97ddbb3d6e6818a49c4fb3f64"
"inputSnark": "0x1d2f2dc2f3a9b2a6957bcd5c5bc7c18c5410ed74a3b0621dab79f61697346246"
}
]
2 changes: 1 addition & 1 deletion test/helpers/test-vectors/zkevm-db/state-transition.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"id": 0,
"description": "2 accounts and 1 valid transaction.",
"chainID": 1000,
"forkID": 9,
"forkID": 12,
"sequencerAddress": "0x617b3a3528F9cDd6630fd3301B9c8911F7Bf063D",
"genesis": [
{
Expand Down
2 changes: 1 addition & 1 deletion test/zkevm-db.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ describe('ZkEVMDB', function () {
const genesis = [];
const db = new MemDB(F);
const chainID = 1000;
const forkID = 9;
const forkID = 12;

// create a zkEVMDB and build a batch
const zkEVMDB = await ZkEVMDB.newZkEVM(
Expand Down
Loading