Skip to content

Commit

Permalink
add more e2e tests
Browse files Browse the repository at this point in the history
  • Loading branch information
laisolizq committed Aug 8, 2024
1 parent 061c37a commit bc6c8f5
Show file tree
Hide file tree
Showing 7 changed files with 3,388 additions and 990 deletions.
2,070 changes: 1,567 additions & 503 deletions tools/build-genesis-recursive/aggregate-batches.json

Large diffs are not rendered by default.

8 changes: 5 additions & 3 deletions tools/build-genesis-recursive/build_genesis_recursive.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,13 @@ async function main() {

for (let i = 0; i < generateData.genesis.length; i++) {
const {
address, pvtKey,
address, pvtKey, bytecode
} = generateData.genesis[i];

const newWallet = new ethers.Wallet(pvtKey);
walletMap[address] = newWallet;
if(!bytecode) {
const newWallet = new ethers.Wallet(pvtKey);
walletMap[address] = newWallet;
}
}

// create a zkEVMDB and build a batch
Expand Down
148 changes: 139 additions & 9 deletions tools/build-genesis-recursive/input_executor_0.json
Original file line number Diff line number Diff line change
@@ -1,25 +1,155 @@
{
"oldStateRoot": "0x3ca39a7b5b419d1c50c89a8d15d1234f6cbc8baadb465efb609832bbc19f9026",
"newStateRoot": "0xb5cc512a2992d9793fa3b59b0b9d04bf975e693ceee5e426b77b9fa13c6b3ad9",
"oldStateRoot": "0x63eced2e4d210a5d1dabbe23b8e858b4899467bd38c0c25a2a0e7f8898823585",
"newStateRoot": "0x2cdae962b5627e2c03046e235ed3847d6c9914a32de2785c62bbc3b5ca4ba2a7",
"oldAccInputHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"newAccInputHash": "0xe90aebab9b50f404ab1b422b3577c9bd8c1261ea3483eb1a3c5283049c0ba3bf",
"newAccInputHash": "0x9c7ebd18e0f80e42b258d3129ae37afccf358e180bb467a5603472a286af8d65",
"newLocalExitRoot": "0x0000000000000000000000000000000000000000000000000000000000000000",
"oldNumBatch": 0,
"newNumBatch": 1,
"chainID": 1000,
"forkID": 8,
"forcedBlockHashL1": "0x0000000000000000000000000000000000000000000000000000000000000000",
"batchL2Data": "0x0b73e6af6f00000000ef80843b9aca00830186a0944d5cf5032b2a844602278b01199ed191a86c93ff8901314fb37062980000808203e88080f9ea8e90ae323e360a22bd0b1a972d15cb33df6ccbfbada4a0d49792d1164ea56029d84d5093a7186fb5bf2f1b7258d57e9c09ac89c4cb8eb44a3c961c4dd89b1bff",
"batchL2Data": "0x0b73e6af6f00000000ef80843b9aca00830186a0944d5cf5032b2a844602278b01199ed191a86c93ff8901314fb37062980000808203e88080f9ea8e90ae323e360a22bd0b1a972d15cb33df6ccbfbada4a0d49792d1164ea56029d84d5093a7186fb5bf2f1b7258d57e9c09ac89c4cb8eb44a3c961c4dd89b1bffea80843b9aca00830186a0941275fbb540c8efc58b812ba83b0d0b8b9917ae988084ca8b6b0c8203e88080308888d8ff809dcbdcb8293fc134de90bda708cda5914cf5f6d1dd1e0e9cc1ec676676381e1d1c2da479ff505418bda4e74b2162ee818b555b79b1676d0b3d271bffea01843b9aca00830186a0941275fbb540c8efc58b812ba83b0d0b8b9917ae98808418af72748203e880802759daa3ead94e47208aaec7d6fa1f8556fe711006eae0977459fa01b4a555800819179ff2a69a204a2c2a979dc349e48814474e244f87be7e6a2b6bcb0227131cff",
"l1InfoRoot": "0x090bcaf734c4f06c93954a827b45a6e8c67b8e0fd1e0a35a1c5982d6961828f9",
"timestampLimit": "1944498035",
"sequencerAddr": "0x617b3a3528F9cDd6630fd3301B9c8911F7Bf063D",
"batchHashData": "0xa718f3ce11ce83a0c67399031e11fcd292d10d291275539b50fcf2c8860f4ecc",
"contractsBytecode": {},
"batchHashData": "0xba69b8a5557de10c07555fd33159d36b1234e64d77c679066457bc14b41d43a0",
"contractsBytecode": {
"0x9937bba73b21ece01170785cfdc0edd04dd6d6490ae9c5a50be79994a38d9a92": "6080604052600436106100865760003560e01c80635f8a9073116100595780635f8a90731461010057806367f4e2211461012957806395506c1714610140578063ca8b6b0c1461017d578063fff0972f1461019457610086565b806304ba89731461008b57806318af7274146100a257806330cef659146100ac5780633389412b146100e9575b600080fd5b34801561009757600080fd5b506100a06101ab565b005b6100aa610218565b005b3480156100b857600080fd5b506100d360048036038101906100ce9190610696565b610291565b6040516100e09190610a05565b60405180910390f35b3480156100f557600080fd5b506100fe6102e9565b005b34801561010c57600080fd5b5061012760048036038101906101229190610750565b61034e565b005b34801561013557600080fd5b5061013e61039d565b005b34801561014c57600080fd5b50610167600480360381019061016291906106e9565b61044a565b6040516101749190610a05565b60405180910390f35b34801561018957600080fd5b506101926104a5565b005b3480156101a057600080fd5b506101a961050a565b005b60006001905060006002905060006001905060006002905060006101d18585858561044a565b9050806000600281106101e7576101e6610b1c565b5b60200201516002819055508060016002811061020657610205610b1c565b5b60200201516003819055505050505050565b600261123460405160200161022d91906109ea565b60405160208183030381529060405260405161024991906109d3565b602060405180830381855afa158015610266573d6000803e3d6000fd5b5050506040513d601f19601f820116820180604052508101906102899190610669565b600081905550565b61029961061d565b6102a161061d565b60008585856040516020016102b8939291906108d8565b6040516020818303038152906040529050604082606060208401600060075af1806009555081925050509392505050565b6000600190506000600290506000600290506000610308848484610291565b90508060006002811061031e5761031d610b1c565b5b60200201516004819055508060016002811061033d5761033c610b1c565b5b602002015160058190555050505050565b600086868686868660405160200161036b96959493929190610963565b604051602081830303815290604052905060405160208160c060208501600060085af180600a55505050505050505050565b60008060007f198e9393920d483a7260bfb731fb5d25f1aa493335a9e71297e485b7aef312c2905060007f1800deef121f1e76426a00665e5c4479674322d4f75edadd46debd5cd992f6ed905060007f090689d0585ff075ec9e99ad690c3395bc4b313370b38ef355acdadcd122975b905060007f12c85ea5db8c6deb4aab71808dcb408fe3d1e7690c43d37b4ce6cc0166fa7daa905061044286868686868661034e565b505050505050565b61045261061d565b61045a61061d565b6000868686866040516020016104739493929190610915565b6040516020818303038152906040529050604082608060208401600060065af180600855508192505050949350505050565b606060405160408152602080820152602060408201526001606082015260006080820152600160a0820152600960c082015260208160e083600060055af180600081146104fe5782519350836006556001600755610504565b60026003555b50505050565b60007f456e9aea5e197a1f1af7a3e85a3212fa4049a3ba34c2289b4c860fc0b0c64ef360001b90506000601c905060007f9242685bf161793cc25603c231bc2f568eb630ea16aa137d2664ac803882560860001b905060007f4f8ae3bd7535248d0bd448298cc2e2071e56992d0774dc340c368ae950852ada60001b9050600184848484604051600081526020016040526040516105ab9493929190610a20565b6020604051602081039080840390855afa1580156105cd573d6000803e3d6000fd5b50505060206040510351600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050505050565b6040518060400160405280600290602082028036833780820191505090505090565b60008135905061064e81610b5d565b92915050565b60008151905061066381610b5d565b92915050565b60006020828403121561067f5761067e610b4b565b5b600061068d84828501610654565b91505092915050565b6000806000606084860312156106af576106ae610b4b565b5b60006106bd8682870161063f565b93505060206106ce8682870161063f565b92505060406106df8682870161063f565b9150509250925092565b6000806000806080858703121561070357610702610b4b565b5b60006107118782880161063f565b94505060206107228782880161063f565b93505060406107338782880161063f565b92505060606107448782880161063f565b91505092959194509250565b60008060008060008060c0878903121561076d5761076c610b4b565b5b600061077b89828a0161063f565b965050602061078c89828a0161063f565b955050604061079d89828a0161063f565b94505060606107ae89828a0161063f565b93505060806107bf89828a0161063f565b92505060a06107d089828a0161063f565b9150509295509295509295565b60006107e9838361084c565b60208301905092915050565b6107fe81610a6f565b6108088184610a92565b925061081382610a65565b8060005b8381101561084457815161082b87826107dd565b965061083683610a85565b925050600181019050610817565b505050505050565b61085581610aa8565b82525050565b61086481610aa8565b82525050565b61087b61087682610aa8565b610b00565b82525050565b600061088c82610a7a565b6108968185610a9d565b93506108a6818560208601610acd565b80840191505092915050565b6108c36108be82610ab2565b610b0a565b82525050565b6108d281610ac0565b82525050565b60006108e4828661086a565b6020820191506108f4828561086a565b602082019150610904828461086a565b602082019150819050949350505050565b6000610921828761086a565b602082019150610931828661086a565b602082019150610941828561086a565b602082019150610951828461086a565b60208201915081905095945050505050565b600061096f828961086a565b60208201915061097f828861086a565b60208201915061098f828761086a565b60208201915061099f828661086a565b6020820191506109af828561086a565b6020820191506109bf828461086a565b602082019150819050979650505050505050565b60006109df8284610881565b915081905092915050565b60006109f682846108b2565b60028201915081905092915050565b6000604082019050610a1a60008301846107f5565b92915050565b6000608082019050610a35600083018761085b565b610a4260208301866108c9565b610a4f604083018561085b565b610a5c606083018461085b565b95945050505050565b6000819050919050565b600060029050919050565b600081519050919050565b6000602082019050919050565b600081905092915050565b600081905092915050565b6000819050919050565b600061ffff82169050919050565b600060ff82169050919050565b60005b83811015610aeb578082015181840152602081019050610ad0565b83811115610afa576000848401525b50505050565b6000819050919050565b6000610b1582610b50565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600080fd5b60008160f01b9050919050565b610b6681610aa8565b8114610b7157600080fd5b5056fea2646970667358221220250a806d66b89c74db852b366665233aab3330fda42dd62a528ff8987700689b64736f6c63430008070033"
},
"l1InfoTree": {},
"db": {
"0x3ca39a7b5b419d1c50c89a8d15d1234f6cbc8baadb465efb609832bbc19f9026": [
"cddc57c0d0fdd4ed",
"d24df1950f2d8f15",
"0x63eced2e4d210a5d1dabbe23b8e858b4899467bd38c0c25a2a0e7f8898823585": [
"86fef04de4aa6f41",
"fecba138d8ee13e4",
"39478ebccc5e9567",
"34f76d3f37cb3ef0",
"6d20d0d55a0b699a",
"7d98f98b764033de",
"5f8f94efa20904eb",
"8529e054570237c0",
"0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000"
],
"0x34f76d3f37cb3ef039478ebccc5e9567fecba138d8ee13e486fef04de4aa6f41": [
"0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000",
"9466581bf334ecb7",
"4dbb93c92a3da5d5",
"c32d020855933111",
"d372ec87f0762879",
"0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000"
],
"0xd372ec87f0762879c32d0208559331114dbb93c92a3da5d59466581bf334ecb7": [
"1baeee07cadec004",
"99f5931a96dacdaa",
"fc3570bcf0bf7c9e",
"ca0f755a7f970e76",
"74284a2a4b21485d",
"dc558a8c9f0815c7",
"fe6eae3c0aed122b",
"ec6faa12159df77f",
"0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000"
],
"0xca0f755a7f970e76fc3570bcf0bf7c9e99f5931a96dacdaa1baeee07cadec004": [
"25928440032faa48",
"7603eeedd4b5445e",
"553f6707e9e92083",
"c86ee7583a0df9c1",
"d074b8cee5dcf415",
"2346a1b4c0f390e8",
"47969c1f5a6a25b1",
"da62fdf84a21108e",
"0000000000000001",
"0000000000000000",
"0000000000000000",
"0000000000000000"
],
"0xda62fdf84a21108e47969c1f5a6a25b12346a1b4c0f390e8d074b8cee5dcf415": [
"0000000000000001",
"0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000"
],
"0xec6faa12159df77ffe6eae3c0aed122bdc558a8c9f0815c774284a2a4b21485d": [
"14945417c9b957d1",
"1af1a1e389f5d2bf",
"33fbf3cd8d9bb1e0",
"13060509db26d4ff",
"8b77aef97ce200c9",
"a7bfec94f5222e6c",
"f759fd3dd8b50655",
"b16c1577202fb091",
"0000000000000001",
"0000000000000000",
"0000000000000000",
"0000000000000000"
],
"0xb16c1577202fb091f759fd3dd8b50655a7bfec94f5222e6c8b77aef97ce200c9": [
"0000000000000baa",
"0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000"
],
"0x8529e054570237c05f8f94efa20904eb7d98f98b764033de6d20d0d55a0b699a": [
"074685db4419caf9",
"ddcb40111c6ff1ce",
"62498a77d4185441",
"d61182676c0ce058",
"3e63658ee0db910d",
"0b3e34316e81aa10",
"e0dc203d93f4e3e5",
"e10053d0ebc64602",
"0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000"
],
"0xd61182676c0ce05862498a77d4185441ddcb40111c6ff1ce074685db4419caf9": [
"6441a048ef8aad39",
"0dfe002ac222af8c",
"de0240176aafd15d",
"5121e42be58d73ee",
"99ca345dbc3d048e",
"d9e5600e7c6c0af7",
"85b5f7137f981c1e",
"486ddfe47986cec1",
"0000000000000001",
"0000000000000000",
"0000000000000000",
"0000000000000000"
],
"0x486ddfe47986cec185b5f7137f981c1ed9e5600e7c6c0af799ca345dbc3d048e": [
"00000000a38d9a92",
"000000000be79994",
"000000000ae9c5a5",
"000000004dd6d649",
"00000000fdc0edd0",
"000000001170785c",
"000000003b21ece0",
"000000009937bba7"
],
"0xe10053d0ebc64602e0dc203d93f4e3e50b3e34316e81aa103e63658ee0db910d": [
"66ee2be0687eea76",
"6926f8ca8796c78a",
"4c2f3e938869b82d",
"649e63bfe1247ba4",
"b69b044f5e694795",
Expand Down
Loading

0 comments on commit bc6c8f5

Please sign in to comment.