Skip to content

Commit

Permalink
Merge pull request #188 from 0xPolygonHermez/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
krlosMata authored Mar 2, 2023
2 parents 3ca57dd + eaedeb6 commit afcd043
Show file tree
Hide file tree
Showing 11,962 changed files with 3,596,915 additions and 81,954 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,20 @@ tools/ethereum-tests/info-output-*
inputs-integration
errors.txt
info.txt
info-30M.txt
info-inputs.txt
info-output.txt
tools/ethereum-tests/final-table.txt
tools/ethereum-tests/.DS_Store
all-info.txt
all-info-2.txt

tools-calldata/evm/.DS_Store
tools/benchmark/inputs
tools/benchmark/.DS_Store

tools/coverage/reports
tools/benchmark/benchmark_config.json
tools/.DS_Store

.DS_Store
130 changes: 65 additions & 65 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,82 +16,82 @@ Maintained tests:
```

## Ethereum test vectors coverage
- Ethereum test targeted are located [here](https://github.com/ethereum/tests/tree/develop/BlockchainTests/GeneralStateTests)
- Ethereum test targeted are located [here](https://github.com/0xPolygonHermez/ethereum-tests/tree/test-vectors)
> `Ignored` test does not fit in zkEVM implementation. Therefore, it could not be applied to zkEVM.
> More coverage will be added while test are being tested
## Overview
- Commit [ethereum/tests](https://github.com/ethereum/tests): 24fa31adb30f71ee700b27decb5204e53a11d9f3
- Commit [zkevm-testvectors](https://github.com/0xPolygonHermez/zkevm-testvectors): 51fce991e0621c4397e122fc6d24794bc10f0fc5
- Commit [zkevm-rom](https://github.com/0xPolygonHermez/zkevm-rom): a428ddc391044032ef285105e52624bc2051dbcb
- Commit [zkevm-proverjs](https://github.com/0xPolygonHermez/zkevm-proverjs): cedc278e4fbc93b84e8ea4008d9fa4ab590ce08f
- Commit [ethereum-tests](https://github.com/0xPolygonHermez/ethereum-tests/tree/test-vectors): 71fce961e5ebd9c13d67213b3cd964798f1859e6
- Commit [zkevm-testvectors](https://github.com/0xPolygonHermez/zkevm-testvectors): a6001e3ddfa3d110abe56814aff731d318f882c2
- Commit [zkevm-rom](https://github.com/0xPolygonHermez/zkevm-rom): 0dbd9217feb050888a4a1702d79e5fa4d54e9c48
- Commit [zkevm-proverjs](https://github.com/0xPolygonHermez/zkevm-proverjs): a15ed4b5f4dbaca87e32a2295d64bccf4f7d3d88

| Total | Generation errors | Ignored | :heavy_check_mark: | :x: | Coverage |
|:-----:|:-----------------:|:-------:|:------------------:|:---:|:--------:|
| 13294 | 42 | 3598 | 9653 | 1 | 99.55% |
| 17799 | 64 | 6931 | 10804 | 0 | 99.41% |


## Extended table

| Folder Name | Total | :heavy_check_mark: | :x: | Ignored | Cov |
|:------------------------------------:|:-----:|:------------------:|:---:|:-------:|:----:|
| stArgsZeroOneBalance | 96 | 94 | 0 | 2 | 100% |
| stAttackTest | 2 | 0 | 0 | 2 | 100% |
| stBadOpcode | 203 | 172 | 1 | 30 | 99% |
| stBugs | 9 | 7 | 0 | 2 | 100% |
| stCallCodes | 87 | 67 | 0 | 20 | 100% |
| stCallCreateCallCodeTest | 55 | 39 | 0 | 16 | 100% |
| stCallDelegateCodesCallCodeHomestead | 58 | 41 | 0 | 17 | 100% |
| stCallDelegateCodesHomestead | 58 | 41 | 0 | 17 | 100% |
| stChainId | 2 | 1 | 0 | 1 | 100% |
| stCodeCopyTest | 2 | 2 | 0 | 0 | 100% |
| stCodeSizeLimit | 5 | 5 | 0 | 0 | 100% |
| stCreate2 | 150 | 103 | 1 | 46 | 99% |
| stCreateTest | 91 | 77 | 1 | 13 | 99% |
| stDelegatecallTestHomestead | 31 | 25 | 0 | 6 | 100% |
| stEIP150Specific | 25 | 23 | 0 | 2 | 100% |
| stEIP150singleCodeGasPrices | 339 | 329 | 0 | 10 | 100% |
| stEIP1559 | 1 | 0 | 0 | 1 | 100% |
| stEIP158Specific | 7 | 4 | 0 | 3 | 100% |
| stEIP2930 | 138 | 3 | 0 | 135 | 100% |
| stEIP3607 | 5 | 5 | 0 | 0 | 100% |
| stExample | 38 | 33 | 1 | 4 | 97% |
| stExtCodeHash | 65 | 16 | 0 | 49 | 100% |
| stHomesteadSpecific | 5 | 5 | 0 | 0 | 100% |
| stInitCodeTest | 22 | 20 | 0 | 2 | 100% |
| stLogTests | 46 | 46 | 0 | 0 | 100% |
| stMemExpandingEIP150Calls | 10 | 10 | 0 | 0 | 100% |
| stMemoryStressTest | 82 | 48 | 0 | 34 | 100% |
| stMemoryTest | 578 | 223 | 0 | 355 | 100% |
| stNonZeroCallsTest | 24 | 20 | 0 | 4 | 100% |
| stPreCompiledContracts | 960 | 425 | 0 | 535 | 100% |
| stPreCompiledContracts2 | 203 | 53 | 2 | 148 | 96% |
| stQuadraticComplexityTest | 32 | 13 | 0 | 19 | 100% |
| stRandom | 313 | 169 | 5 | 139 | 97% |
| stRandom2 | 226 | 167 | 3 | 56 | 98% |
| stRecursiveCreate | 2 | 2 | 0 | 0 | 100% |
| stRefundTest | 26 | 11 | 0 | 15 | 100% |
| stReturnDataTest | 81 | 46 | 0 | 35 | 100% |
| stRevertTest | 271 | 136 | 0 | 135 | 100% |
| stSLoadTest | 1 | 1 | 0 | 0 | 100% |
| stSStoreTest | 475 | 467 | 0 | 8 | 100% |
| stSelfBalance | 7 | 7 | 0 | 0 | 100% |
| stShift | 42 | 40 | 1 | 1 | 98% |
| stSolidityTest | 23 | 18 | 0 | 5 | 100% |
| stSpecialTest | 14 | 8 | 2 | 4 | 80% |
| stStackTests | 375 | 202 | 0 | 173 | 100% |
| stStaticCall | 478 | 386 | 13 | 79 | 97% |
| stStaticFlagEnabled | 34 | 24 | 0 | 10 | 100% |
| stSystemOperationsTest | 69 | 49 | 6 | 14 | 89% |
| stTimeConsuming | 5190 | 5187 | 0 | 3 | 100% |
| stTransactionTest | 164 | 149 | 2 | 13 | 99% |
| stTransitionTest | 6 | 6 | 0 | 0 | 100% |
| stWalletTest | 46 | 43 | 0 | 3 | 100% |
| stZeroCallsRevert | 16 | 12 | 0 | 4 | 100% |
| stZeroCallsTest | 24 | 20 | 0 | 4 | 100% |
| stZeroKnowledge2 | 519 | 0 | 0 | 519 | 100% |
| stZeroKnowledge | 800 | 0 | 0 | 800 | 100% |
| VMTests | 651 | 553 | 5 | 93 | 99% |
| Folder Name | Total | :heavy_check_mark: | :x: | Ignored | Cov |
|:------------------------------------:|:-----:|:------------------:|:---:|:-------:|:------:|
| stArgsZeroOneBalance | 96 | 94 | 0 | 2 | 100.00 |
| stAttackTest | 2 | 0 | 0 | 2 | 100.00 |
| stBadOpcode | 4250 | 194 | 1 | 4055 | 99.49 |
| stBugs | 9 | 7 | 0 | 2 | 100.00 |
| stCallCodes | 87 | 67 | 0 | 20 | 100.00 |
| stCallCreateCallCodeTest | 55 | 39 | 0 | 16 | 100.00 |
| stCallDelegateCodesCallCodeHomestead | 58 | 41 | 0 | 17 | 100.00 |
| stCallDelegateCodesHomestead | 58 | 41 | 0 | 17 | 100.00 |
| stChainId | 2 | 1 | 0 | 1 | 100.00 |
| stCodeCopyTest | 2 | 2 | 0 | 0 | 100.00 |
| stCodeSizeLimit | 6 | 6 | 0 | 0 | 100.00 |
| stCreate2 | 174 | 127 | 1 | 46 | 99.22 |
| stCreateTest | 173 | 137 | 15 | 21 | 90.13 |
| stDelegatecallTestHomestead | 31 | 26 | 0 | 5 | 100.00 |
| stEIP150Specific | 25 | 23 | 0 | 2 | 100.00 |
| stEIP150singleCodeGasPrices | 339 | 329 | 0 | 10 | 100.00 |
| stEIP1559 | 44 | 0 | 0 | 44 | 100.00 |
| stEIP158Specific | 7 | 4 | 0 | 3 | 100.00 |
| stEIP2930 | 138 | 3 | 0 | 135 | 100.00 |
| stEIP3607 | 12 | 12 | 0 | 0 | 100.00 |
| stExample | 38 | 34 | 0 | 4 | 100.00 |
| stExtCodeHash | 65 | 16 | 0 | 49 | 100.00 |
| stHomesteadSpecific | 5 | 5 | 0 | 0 | 100.00 |
| stInitCodeTest | 22 | 20 | 0 | 2 | 100.00 |
| stLogTests | 46 | 46 | 0 | 0 | 100.00 |
| stMemExpandingEIP150Calls | 10 | 10 | 0 | 0 | 100.00 |
| stMemoryStressTest | 82 | 79 | 0 | 3 | 100.00 |
| stMemoryTest | 578 | 567 | 0 | 11 | 100.00 |
| stNonZeroCallsTest | 24 | 20 | 0 | 4 | 100.00 |
| stPreCompiledContracts | 960 | 425 | 0 | 535 | 100.00 |
| stPreCompiledContracts2 | 248 | 100 | 0 | 148 | 100.00 |
| stQuadraticComplexityTest | 32 | 17 | 6 | 9 | 73.91 |
| stRandom | 313 | 262 | 6 | 45 | 97.76 |
| stRandom2 | 226 | 205 | 0 | 21 | 100.00 |
| stRecursiveCreate | 2 | 2 | 0 | 0 | 100.00 |
| stRefundTest | 26 | 11 | 0 | 15 | 100.00 |
| stReturnDataTest | 273 | 237 | 0 | 36 | 100.00 |
| stRevertTest | 271 | 168 | 0 | 103 | 100.00 |
| stSLoadTest | 1 | 1 | 0 | 0 | 100.00 |
| stSStoreTest | 475 | 467 | 0 | 8 | 100.00 |
| stSelfBalance | 42 | 40 | 0 | 2 | 100.00 |
| stShift | 42 | 42 | 0 | 0 | 100.00 |
| stSolidityTest | 23 | 18 | 0 | 5 | 100.00 |
| stSpecialTest | 22 | 10 | 2 | 10 | 83.33 |
| stStackTests | 375 | 375 | 0 | 0 | 100.00 |
| stStaticCall | 478 | 391 | 12 | 75 | 97.02 |
| stStaticFlagEnabled | 34 | 24 | 0 | 10 | 100.00 |
| stSystemOperationsTest | 72 | 54 | 0 | 18 | 100.00 |
| stTimeConsuming | 5190 | 5187 | 0 | 3 | 100.00 |
| stTransactionTest | 164 | 148 | 0 | 16 | 100.00 |
| stTransitionTest | 6 | 6 | 0 | 0 | 100.00 |
| stWalletTest | 46 | 43 | 0 | 3 | 100.00 |
| stZeroCallsRevert | 16 | 12 | 0 | 4 | 100.00 |
| stZeroCallsTest | 24 | 20 | 0 | 4 | 100.00 |
| stZeroKnowledge2 | 519 | 0 | 0 | 519 | 100.00 |
| stZeroKnowledge | 800 | 0 | 0 | 800 | 100.00 |
| VMTests | 651 | 578 | 14 | 59 | 97.64 |


## Note
Expand Down
90 changes: 46 additions & 44 deletions hardhat.config.js
Original file line number Diff line number Diff line change
@@ -1,53 +1,55 @@
require("@nomiclabs/hardhat-waffle");
require("@openzeppelin/hardhat-upgrades");
require('@nomiclabs/hardhat-waffle');
require('@openzeppelin/hardhat-upgrades');

DEFAULT_MNEMONIC = "test test test test test test test test test test test junk";
DEFAULT_MNEMONIC = 'test test test test test test test test test test test junk';

/**
* @type import('hardhat/config').HardhatUserConfig
*/
module.exports = {
solidity: {
compilers: [
{
version: "0.8.9",
settings: {
optimizer: {
enabled: false,
//runs: 999999
}
}
},
{
version: "0.8.7",
settings: {
optimizer: {
enabled: false,
//runs: 999999
}
}
},
{
version: "0.6.11",
settings: {
optimizer: {
enabled: true,
runs: 999999
}
solidity: {
compilers: [
{
version: '0.8.9',
settings: {
optimizer: {
enabled: false,
// runs: 999999
},
},
},
{
version: '0.8.7',
settings: {
optimizer: {
enabled: false,
// runs: 999999
},
},
},
{
version: '0.6.11',
settings: {
optimizer: {
enabled: true,
runs: 999999,
},
},
},
],
},
networks: {
localhost: {
url: 'http://127.0.0.1:8545',
accounts: {
mnemonic: DEFAULT_MNEMONIC,
path: "m/44'/60'/0'/0",
initialIndex: 0,
count: 20,
},
},
hardhat: {
allowUnlimitedContractSize: true,
}
}
]
},
networks: {
localhost: {
url: "http://127.0.0.1:8545",
accounts: {
mnemonic: DEFAULT_MNEMONIC,
path: "m/44'/60'/0'/0",
initialIndex: 0,
count: 20,
},
},
}
};

3 changes: 2 additions & 1 deletion inputs-executor/calldata/chainId_0.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
{
"oldStateRoot": "0x9e88ad623662912afd2dba0c9c407409b4c6a7806de1234ff5000e950a5c2d63",
"newStateRoot": "0xb0a858ef79b75c3172cf0949c9fa9e0cfa5205156277bf393928480eec016f61",
"newStateRoot": "0x449c585fc949d73cbb61390778a6ba68a7b1a97b6cfa627be76eeb9f851d8a29",
"oldAccInputHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"newAccInputHash": "0x453ec0178109175625d61a7f7b955e33d31f69632d4e70fbe0e340bc6ab6a150",
"newLocalExitRoot": "0x0000000000000000000000000000000000000000000000000000000000000000",
"oldNumBatch": 0,
"newNumBatch": 1,
"chainID": 1000,
"forkID": 2,
"batchL2Data": "0xe3800a8401c9c38094100000000000000000000000000000000000000080808203e88080fb5f36a0c33e896d5005a171e3587685546a2cc2d8f839d6ca60e0892487662416efdaf0fb5f9cf814e9a722ff5ed0a16a94e0ef88bae4951c9d64c6fa47d2da1c",
"globalExitRoot": "0x090bcaf734c4f06c93954a827b45a6e8c67b8e0fd1e0a35a1c5982d6961828f9",
"timestamp": 1944498031,
Expand Down
3 changes: 2 additions & 1 deletion inputs-executor/calldata/custom-tx_0.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
{
"oldStateRoot": "0x4a9bfcb163ec91c5beb22e6aca41592433092c8c7821b01d37fd0de483f9265d",
"newStateRoot": "0x7816ade23d0be72819da6f2081ce4386102e75ed2409a5ee5cda2fb79610ea44",
"newStateRoot": "0x48c07541083f05957edfd403a8226cab1ce2d54fd7b1bb8ab0fab0cf530d7e6c",
"oldAccInputHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"newAccInputHash": "0xbf95cd5b5506607e62a0d217210ef0179130db064070dbc7c3b37e37747c4fd9",
"newLocalExitRoot": "0x0000000000000000000000000000000000000000000000000000000000000000",
"oldNumBatch": 0,
"newNumBatch": 1,
"chainID": 1000,
"forkID": 2,
"batchL2Data": "0xe3800a8401c9c380944d5cf5032b2a844602278b01199ed191a86c93ff01808203e88080b091173dbf91b3b0c7d72ace33bb96fa0d4b43868fe4be91e5ae0b9de52c3dd6362efc031939fb5797c30577e66edd5ffbc34b30b4585a1a8632dd71c13f74201c",
"globalExitRoot": "0x090bcaf734c4f06c93954a827b45a6e8c67b8e0fd1e0a35a1c5982d6961828f9",
"timestamp": 1944498031,
Expand Down
5 changes: 3 additions & 2 deletions inputs-executor/calldata/custom-tx_1.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"oldStateRoot": "0x4a9bfcb163ec91c5beb22e6aca41592433092c8c7821b01d37fd0de483f9265d",
"newStateRoot": "0x0143c4ffec267aba2b44f9c5253c41042af8388b7ac2535c566e70937242a2db",
"newStateRoot": "0x5ce97f7b959b5dbb207ca525a18a7034a1244f23ec0bd393ec1b3e28786dd164",
"oldAccInputHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"newAccInputHash": "0x73f025e7bb9b5599379736af2b3769bbbf83e36279227e483c538ac1e444f901",
"newLocalExitRoot": "0x0000000000000000000000000000000000000000000000000000000000000000",
Expand Down Expand Up @@ -93,5 +93,6 @@
"0000000000000000",
"0000000000000000"
]
}
},
"forkID": 2
}
5 changes: 3 additions & 2 deletions inputs-executor/calldata/custom-tx_2.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"oldStateRoot": "0x4a9bfcb163ec91c5beb22e6aca41592433092c8c7821b01d37fd0de483f9265d",
"newStateRoot": "0x0143c4ffec267aba2b44f9c5253c41042af8388b7ac2535c566e70937242a2db",
"newStateRoot": "0x5ce97f7b959b5dbb207ca525a18a7034a1244f23ec0bd393ec1b3e28786dd164",
"oldAccInputHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"newAccInputHash": "0xaa2e7d61a42edfb1dcf0932311f47b94a04d31fadebc216b6125af3c1fdee6ef",
"newLocalExitRoot": "0x0000000000000000000000000000000000000000000000000000000000000000",
Expand Down Expand Up @@ -93,5 +93,6 @@
"0000000000000000",
"0000000000000000"
]
}
},
"forkID": 2
}
Loading

0 comments on commit afcd043

Please sign in to comment.