Skip to content

Commit

Permalink
Merge pull request #264 from 0xPolygonHermez/feature/add-random-tests…
Browse files Browse the repository at this point in the history
…-p256verify

add scripts to generate random tests p256verify
  • Loading branch information
laisolizq authored Oct 25, 2024
2 parents 33f397d + 930ab72 commit 7cd8391
Show file tree
Hide file tree
Showing 40 changed files with 6,805 additions and 1,421 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,6 @@ tools-inputs/tests-parallel/parallel-tests
tools/coverage/reports*
inputs-executor/ethereum-tests/GeneralStateTests/no-exec-*
inputs-executor/ethereum-tests/GeneralStateTests/*/no-exec-*
inputs-executor/calldata/pre-rip7212-*
tools-inputs/data/calldata/pre-rip7212-*
tools-inputs/tools-calldata/generate-test-vectors/gen-pre-rip7212-*
109 changes: 109 additions & 0 deletions inputs-executor/calldata/pres_0.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
{
"oldStateRoot": "0x4a9bfcb163ec91c5beb22e6aca41592433092c8c7821b01d37fd0de483f9265d",
"newStateRoot": "0xd4776604e80fd530ec129626476a4ec60ad23b794237759be1431adb3c531ecc",
"oldAccInputHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"newAccInputHash": "0xb4e52d00450e33eda747f05c3ac64eb3b69192f93fdf15d552fd38a351229681",
"newLocalExitRoot": "0x0000000000000000000000000000000000000000000000000000000000000000",
"oldNumBatch": 0,
"newNumBatch": 1,
"chainID": 1000,
"forkID": 13,
"forcedBlockHashL1": "0x0000000000000000000000000000000000000000000000000000000000000000",
"batchL2Data": "0x0b73e6af6f00000000f8a780843b9aca00830186a094000000000000000000000000000000000000000180b880456e9aea5e197a1f1af7a3e85a3212fa4049a3ba34c2289b4c860fc0b0c64ef3000000000000000000000000000000000000000000000000000000000000001c9242685bf161793cc25603c231bc2f568eb630ea16aa137d2664ac80388256084f8ae3bd7535248d0bd448298cc2e2071e56992d0774dc340c368ae950852ada8203e8808088625f8d98e8a88fb3c45b0dba1d4f7314e4ff21ee88d386ed4206ec42d2b8e429b84c9e93bf61d96d08643b185fd15138e6e1b2ecc1817c7fbd59ab9b951d351cff",
"l1InfoRoot": "0x090bcaf734c4f06c93954a827b45a6e8c67b8e0fd1e0a35a1c5982d6961828f9",
"timestampLimit": "1944498031",
"sequencerAddr": "0x617b3a3528F9cDd6630fd3301B9c8911F7Bf063D",
"batchHashData": "0xe1a661530e15b40bf2b5993f310c180f465601892e7a5153b875cfa3baff212f",
"contractsBytecode": {},
"l1InfoTree": {
"skipVerifyL1InfoRoot": true
},
"db": {
"0x4a9bfcb163ec91c5beb22e6aca41592433092c8c7821b01d37fd0de483f9265d": [
"0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000",
"9ec300ed8bd3f934",
"389b06b4dc13fc14",
"72715e7972ca0eaa",
"7782f27412c48d2c",
"0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000"
],
"0x7782f27412c48d2c72715e7972ca0eaa389b06b4dc13fc149ec300ed8bd3f934": [
"597bb4307b5e299f",
"f5029596ddb82f37",
"3daa688690ceee05",
"06b719f2bf4cb5e9",
"ebb05ed2082602b9",
"c538204eb07f3d6c",
"a5ed480ede7b8f0e",
"52621f81fded9c35",
"0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000"
],
"0x06b719f2bf4cb5e93daa688690ceee05f5029596ddb82f37597bb4307b5e299f": [
"16dde42596b907f0",
"49015d7e991a1528",
"94dd9dadd060910b",
"60b4d5e9af514018",
"494f9491c8507dc3",
"e92914c00b37a1cd",
"f6b613135380bd5f",
"b487e2e7e1d98168",
"0000000000000001",
"0000000000000000",
"0000000000000000",
"0000000000000000"
],
"0xb487e2e7e1d98168f6b613135380bd5fe92914c00b37a1cd494f9491c8507dc3": [
"00000000c6200000",
"00000000d78ebc5a",
"000000000000000a",
"0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000"
],
"0x52621f81fded9c35a5ed480ede7b8f0ec538204eb07f3d6cebb05ed2082602b9": [
"66ee2be0687eea76",
"6926f8ca8796c78a",
"4c2f3e938869b82d",
"649e63bfe1247ba4",
"35f28afeae0ff489",
"b6d75a1b213c2f7c",
"521f1ce7fca92f45",
"2afffacb569cf689",
"0000000000000001",
"0000000000000000",
"0000000000000000",
"0000000000000000"
],
"0x2afffacb569cf689521f1ce7fca92f45b6d75a1b213c2f7c35f28afeae0ff489": [
"0000000063100000",
"000000006bc75e2d",
"0000000000000005",
"0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000"
]
},
"virtualCounters": {
"steps": 43380,
"arith": 1639,
"binary": 2820,
"memAlign": 6,
"keccaks": 11,
"padding": 15,
"poseidon": 913,
"sha256": 0
}
}
109 changes: 109 additions & 0 deletions inputs-executor/calldata/pres_1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
{
"oldStateRoot": "0x4a9bfcb163ec91c5beb22e6aca41592433092c8c7821b01d37fd0de483f9265d",
"newStateRoot": "0x24e3a0f5dc9d8084f5345c14f5a805f6692d9dcde19b7e1c6bba564363f9ccd2",
"oldAccInputHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"newAccInputHash": "0x65e1e423c5ee62935b1e029865e73888b949ac3d76617e577f463217a9bda775",
"newLocalExitRoot": "0x0000000000000000000000000000000000000000000000000000000000000000",
"oldNumBatch": 0,
"newNumBatch": 1,
"chainID": 1000,
"forkID": 13,
"forcedBlockHashL1": "0x0000000000000000000000000000000000000000000000000000000000000000",
"batchL2Data": "0x0b73e6af6f00000000f8a780843b9aca00830186a094000000000000000000000000000000000000000180b880456e9aea5e197a1f1af7a3e85a3212fa4049a3ba34c2289b4c860fc0b0c64ef300000000000000000000000000000000000000000000000000000000000000059242685bf161793cc25603c231bc2f568eb630ea16aa137d2664ac80388256084f8ae3bd7535248d0bd448298cc2e2071e56992d0774dc340c368ae950852ada8203e8808011b680dbfd57bdb62baca2db5d4b7a1bcee576ff3082a58e100f1658a3e3366472e97176537aa9cc067ed61873520777ff1fa980731ca75d02fc07c0f9ed0da91bff",
"l1InfoRoot": "0x090bcaf734c4f06c93954a827b45a6e8c67b8e0fd1e0a35a1c5982d6961828f9",
"timestampLimit": "1944498031",
"sequencerAddr": "0x617b3a3528F9cDd6630fd3301B9c8911F7Bf063D",
"batchHashData": "0x53c50b07d6b9db04158e611096d86db83d9570dea3c9895aba74378ef1aa48dd",
"contractsBytecode": {},
"l1InfoTree": {
"skipVerifyL1InfoRoot": true
},
"db": {
"0x4a9bfcb163ec91c5beb22e6aca41592433092c8c7821b01d37fd0de483f9265d": [
"0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000",
"9ec300ed8bd3f934",
"389b06b4dc13fc14",
"72715e7972ca0eaa",
"7782f27412c48d2c",
"0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000"
],
"0x7782f27412c48d2c72715e7972ca0eaa389b06b4dc13fc149ec300ed8bd3f934": [
"597bb4307b5e299f",
"f5029596ddb82f37",
"3daa688690ceee05",
"06b719f2bf4cb5e9",
"ebb05ed2082602b9",
"c538204eb07f3d6c",
"a5ed480ede7b8f0e",
"52621f81fded9c35",
"0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000"
],
"0x06b719f2bf4cb5e93daa688690ceee05f5029596ddb82f37597bb4307b5e299f": [
"16dde42596b907f0",
"49015d7e991a1528",
"94dd9dadd060910b",
"60b4d5e9af514018",
"494f9491c8507dc3",
"e92914c00b37a1cd",
"f6b613135380bd5f",
"b487e2e7e1d98168",
"0000000000000001",
"0000000000000000",
"0000000000000000",
"0000000000000000"
],
"0xb487e2e7e1d98168f6b613135380bd5fe92914c00b37a1cd494f9491c8507dc3": [
"00000000c6200000",
"00000000d78ebc5a",
"000000000000000a",
"0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000"
],
"0x52621f81fded9c35a5ed480ede7b8f0ec538204eb07f3d6cebb05ed2082602b9": [
"66ee2be0687eea76",
"6926f8ca8796c78a",
"4c2f3e938869b82d",
"649e63bfe1247ba4",
"35f28afeae0ff489",
"b6d75a1b213c2f7c",
"521f1ce7fca92f45",
"2afffacb569cf689",
"0000000000000001",
"0000000000000000",
"0000000000000000",
"0000000000000000"
],
"0x2afffacb569cf689521f1ce7fca92f45b6d75a1b213c2f7c35f28afeae0ff489": [
"0000000063100000",
"000000006bc75e2d",
"0000000000000005",
"0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000"
]
},
"virtualCounters": {
"steps": 37131,
"arith": 1113,
"binary": 2305,
"memAlign": 6,
"keccaks": 10,
"padding": 15,
"poseidon": 913,
"sha256": 0
}
}
109 changes: 109 additions & 0 deletions inputs-executor/calldata/pres_10.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
{
"oldStateRoot": "0x4a9bfcb163ec91c5beb22e6aca41592433092c8c7821b01d37fd0de483f9265d",
"newStateRoot": "0x73eb87349fb9e931a453cdee0a8bae1b9fe4a217d494515274da82868e06066a",
"oldAccInputHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"newAccInputHash": "0x01cd802db8748f4ca1d3785fb3e47eb3c8133b4393fd93fc6b1e3d9501d57daf",
"newLocalExitRoot": "0x0000000000000000000000000000000000000000000000000000000000000000",
"oldNumBatch": 0,
"newNumBatch": 1,
"chainID": 1000,
"forkID": 13,
"forcedBlockHashL1": "0x0000000000000000000000000000000000000000000000000000000000000000",
"batchL2Data": "0x0b73e6af6f00000000f8c780843b9aca00830186a094000000000000000000000000000000000000010080b8a0bb5a52f42f9c9261ed4361f59422a1e30036e7c32b270c8807a419feca605023d45c5740946b2a147f59262ee6f5bc90bd01ed280528b62b3aed5fc93f06f739b329f479a2bbd0a5c384ee1493b1f5186a87139cac5df4087c134b49156847db2927b10512bae3eddcfe467828128bad2903269919f7086069c8c4df6c732838c7787964eaac00e5921fb1498a60f4606766b3d9685001558d1a974e7341513e8203e88080d0ce33b127e43f580e52b885d7133fff00f2e3e58640c430e616bddc1e2ecf844ea158e61b1b987db7de7a1be433047fde81a86646ef7e5165a716de1ba781231cff",
"l1InfoRoot": "0x090bcaf734c4f06c93954a827b45a6e8c67b8e0fd1e0a35a1c5982d6961828f9",
"timestampLimit": "1944498031",
"sequencerAddr": "0x617b3a3528F9cDd6630fd3301B9c8911F7Bf063D",
"batchHashData": "0x497626e02e4629eb7581393d3746cf3b14ed366f4780d0384a1de7e62c5b5e7f",
"contractsBytecode": {},
"l1InfoTree": {
"skipVerifyL1InfoRoot": true
},
"db": {
"0x4a9bfcb163ec91c5beb22e6aca41592433092c8c7821b01d37fd0de483f9265d": [
"0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000",
"9ec300ed8bd3f934",
"389b06b4dc13fc14",
"72715e7972ca0eaa",
"7782f27412c48d2c",
"0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000"
],
"0x7782f27412c48d2c72715e7972ca0eaa389b06b4dc13fc149ec300ed8bd3f934": [
"597bb4307b5e299f",
"f5029596ddb82f37",
"3daa688690ceee05",
"06b719f2bf4cb5e9",
"ebb05ed2082602b9",
"c538204eb07f3d6c",
"a5ed480ede7b8f0e",
"52621f81fded9c35",
"0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000"
],
"0x06b719f2bf4cb5e93daa688690ceee05f5029596ddb82f37597bb4307b5e299f": [
"16dde42596b907f0",
"49015d7e991a1528",
"94dd9dadd060910b",
"60b4d5e9af514018",
"494f9491c8507dc3",
"e92914c00b37a1cd",
"f6b613135380bd5f",
"b487e2e7e1d98168",
"0000000000000001",
"0000000000000000",
"0000000000000000",
"0000000000000000"
],
"0xb487e2e7e1d98168f6b613135380bd5fe92914c00b37a1cd494f9491c8507dc3": [
"00000000c6200000",
"00000000d78ebc5a",
"000000000000000a",
"0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000"
],
"0x52621f81fded9c35a5ed480ede7b8f0ec538204eb07f3d6cebb05ed2082602b9": [
"66ee2be0687eea76",
"6926f8ca8796c78a",
"4c2f3e938869b82d",
"649e63bfe1247ba4",
"35f28afeae0ff489",
"b6d75a1b213c2f7c",
"521f1ce7fca92f45",
"2afffacb569cf689",
"0000000000000001",
"0000000000000000",
"0000000000000000",
"0000000000000000"
],
"0x2afffacb569cf689521f1ce7fca92f45b6d75a1b213c2f7c35f28afeae0ff489": [
"0000000063100000",
"000000006bc75e2d",
"0000000000000005",
"0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000"
]
},
"virtualCounters": {
"steps": 51488,
"arith": 1774,
"binary": 2713,
"memAlign": 7,
"keccaks": 11,
"padding": 15,
"poseidon": 913,
"sha256": 0
}
}
Loading

0 comments on commit 7cd8391

Please sign in to comment.