Commit Graph

133 Commits

Author SHA1 Message Date
The Dark Jester
f611e5380d use common variable name for plonk verifier name (#1071) 2025-06-02 01:35:57 -07:00
The Dark Jester
b5cdaf5300 [Chore] Tweak contracts post Aderyn run (#1062)
* remove variable shadowing

* remove unused errors
2025-05-28 07:39:53 -07:00
The Dark Jester
9bc1e42c03 [Chore] Bump solc version and override L2 contracts (#1051)
* bump solc version and override L2 contracts

* remove unused file

* refactored and using 0.8.30

* remove floating pragmas

* bump pragma interfaces and inherited contracts
2025-05-28 06:21:54 -07:00
Victorien Gauch
37f6f30195 fix: set hardfork to prague for hardhar test (#1046) 2025-05-26 15:13:37 +02:00
AlexandreBelling
05d14d8df7 Prover/beta v2 release (#1043)
* bump to beta v2.1-rc16

* add a prover config file for devnet

* update srs url

* bump constraints to cbc6bcb and go-corset to v1.1.1

* use go-corset v1.1.1

* use go-corset v1.1.3

* feat(state-manager): insertion and ephemeral filters .

* chores(versions): align the constraints version

* chores(version): align the corset version

* chores(version): update the zkevm.bin

* chores(version): update the zkevm.bin

* fix(limits): removes discrepancy between the sepolia and the mainnet config file

* chores(release): update the verifier contracts

* testing(contract): updates the post-release testdata

* chores(contracts): update the contracts

* chores(constraints): updates constraints and corset to use the right value

* chores(mod): updates the corset dependency and zkevm.bin

* testing(contract): updates the testdata

* chores(config): update the sample config to use the right version

---------

Co-authored-by: gusiri <dreamerty@postech.ac.kr>
Co-authored-by: Bogdan Ursu <bogdanursuoffice@gmail.com>
2025-05-26 15:03:43 +02:00
Julien Marchand
d5e725df1c docs(contracts): fix charter links following renaming (#1024) 2025-05-19 05:27:01 -07:00
The Dark Jester
f48431ac5c [Chore] Document contract interaction (#926)
* placeholder docs

* adding more documentation

* documentation work in progress

* add main linking or index documents

* add a link images

* add messaging flows

* linking operator documentation and folder cleanup

* use correct pathing on tokenbridge.md

* link workflow documents

* add function signatures

* remove welcome to

* cross reference blob submission and finalization

* remove confusing text

* use better definition of shnarf

* fix broken link

* add charter, diagram and address book

* docs(LSC): Rename security-council-charter-v1.3.md to security-council-charter.md

Signed-off-by: Julien Marchand <julien-marchand@users.noreply.github.com>

* Update contracts/docs/mainnet-address-book.csv

Co-authored-by: Julien Marchand <julien-marchand@users.noreply.github.com>
Signed-off-by: The Dark Jester <thedarkjester@users.noreply.github.com>

---------

Signed-off-by: Julien Marchand <julien-marchand@users.noreply.github.com>
Signed-off-by: The Dark Jester <thedarkjester@users.noreply.github.com>
Co-authored-by: Julien Marchand <julien-marchand@users.noreply.github.com>
2025-05-19 13:36:09 +02:00
The Dark Jester
89e9c2cbca redo transient keyword pr (#1019) 2025-05-19 02:27:19 -07:00
The Dark Jester
5d5b56dadd [Chore] Bumping Hardhat and Solidity to latest (#995)
* bumping Hardhat and Solidity to latest

* bump coverage plugin

* add coverage var to command execute

* revert test

* update build script to use 0.8.28
2025-05-13 08:14:07 -07:00
The Dark Jester
72a15de3e3 remove betaV1 tests (#905) 2025-05-09 05:25:40 -07:00
The Dark Jester
1b2040fe1e [Feat] Use 9 blobs for Pectra (#944)
* use 9 blobs for Pectra

* add linting to script

* turn prague on by default

* remove non-prague configuration

* testing not-yet-prague is the reason for failure

* using pectra from genesis

* reset to 9 for testing

* lowering blobs per tick

* add missing 9s and update blobscan

* spotless

* expect 9 blobs in one tx

* Update coordinator/app/src/main/kotlin/net/consensys/zkevm/coordinator/app/config/CoordinatorConfig.kt

Co-authored-by: Julien Marchand <julien-marchand@users.noreply.github.com>
Signed-off-by: The Dark Jester <thedarkjester@users.noreply.github.com>

* refactor testdata folders and use 9 blob agg

* refactor function for ease of reading

* move arguments up

* rename function

* format parameters

* validate at least 1 blob exists

* more spotless

* simplify blob hash computation

---------

Signed-off-by: The Dark Jester <thedarkjester@users.noreply.github.com>
Co-authored-by: Julien Marchand <julien-marchand@users.noreply.github.com>
2025-05-09 01:47:54 -07:00
The Dark Jester
f8442704f3 [Fix] Adjust deploy script because beacon is different (#955)
* fix deploy script because beacon is different

* use hre

* Update contracts/deploy/05_deploy_BridgedToken.ts

Co-authored-by: Alain Nicolas <alainncls@users.noreply.github.com>
Signed-off-by: The Dark Jester <thedarkjester@users.noreply.github.com>

---------

Signed-off-by: The Dark Jester <thedarkjester@users.noreply.github.com>
Co-authored-by: Alain Nicolas <alainncls@users.noreply.github.com>
2025-05-07 06:27:40 -07:00
The Dark Jester
5d54702a63 bumping hardhat (#901) 2025-04-24 00:53:10 -07:00
The Dark Jester
66f81e24c3 [Chore ] Small documentation tweak (#895)
* small documentation tweak

* Update contracts/README.md

Co-authored-by: kyzooghost <73516204+kyzooghost@users.noreply.github.com>
Signed-off-by: The Dark Jester <thedarkjester@users.noreply.github.com>

---------

Signed-off-by: The Dark Jester <thedarkjester@users.noreply.github.com>
Co-authored-by: kyzooghost <73516204+kyzooghost@users.noreply.github.com>
2025-04-23 02:35:47 -07:00
AlexandreBelling
179a3552ae Prover/setup of beta v1.4 for mainnet (#875)
* chores(cfg): create the config-mainnet-full.toml

* feat(contracts): adds PlonkVerifierMainnetFull contract

* dropme(cfg): points to the mainnet test files

* chores(contract): adds a tarball with all the inputs for the contract testing

* move betav1 test

* got to executing rollup case

* minor edit

* did boilerplate for migration test

* new

* fix: update betav1.4 migrations tests

* fix: remove .only in tests

* minor edits

* add new unit test and fix testverifierindex variable

---------

Co-authored-by: kyzooghost <jeffersonzjtang@gmail.com>
Co-authored-by: VGau <victorien.gauch@consensys.net>
2025-04-17 13:28:22 +02:00
AlexandreBelling
7c107a9d13 chores(conf): set the version to 5.0.2 (#850)
* chores(conf): set the version to 5.0.2
* chores(5.0.2): Updates the contracts to work with 5.0.2
2025-04-08 16:31:59 +02:00
The Dark Jester
03bea2be26 lint fixing and logging of setverifieraddress (#811) 2025-04-08 07:29:56 -07:00
AlexandreBelling
efe3b24c25 Contract: update the Plonk verifier contract for betav2 (2) (#801)
* chores(verifier): updates the plonk verifier for beta-v2 on sepolia

* chores(config): changes the prover config to point to 5.0.0

* chores(prover): change the trace limits

* chores(testdata): updates the testdata
2025-03-25 10:56:06 +01:00
kyzooghost
e861b42699 [Fix] Update smart-contract-errors.yaml with script assistance (#809)
* fix

* added more errors to smart-contract-errors.toml

* cross-check against bytecode

* remove redundant comment
2025-03-25 20:34:49 +11:00
kyzooghost
c61dd1898a Refactor/deprecated solidity variables (#755)
* quick wins done

* doc changes

* deprecate mappings in LineaRollup

* add doc

* more deprecation

* fix

* fix linearollup version

* fix

* fix
2025-03-13 00:16:42 +11:00
kyzooghost
d05475241d [Feat] Pause cooldown (#723)
* changes to pausemanager

* add space

* working pausemanager tests

* npx hardhat test working for existing suite

* more pausemanager tests

* more tests and comments

* minor typo fix

* revert pauseTypes.ts changes

* fix PauseManager test cases

* small reverts

* more test adjustments

* Update contracts/src/security/pausing/PauseManager.sol

Co-authored-by: The Dark Jester <thedarkjester@users.noreply.github.com>
Signed-off-by: kyzooghost <73516204+kyzooghost@users.noreply.github.com>

* Update contracts/src/security/pausing/interfaces/IPauseManager.sol

Co-authored-by: The Dark Jester <thedarkjester@users.noreply.github.com>
Signed-off-by: kyzooghost <73516204+kyzooghost@users.noreply.github.com>

* Update contracts/src/security/pausing/PauseManager.sol

Co-authored-by: The Dark Jester <thedarkjester@users.noreply.github.com>
Signed-off-by: kyzooghost <73516204+kyzooghost@users.noreply.github.com>

* Update contracts/src/security/pausing/PauseManager.sol

Co-authored-by: The Dark Jester <thedarkjester@users.noreply.github.com>
Signed-off-by: kyzooghost <73516204+kyzooghost@users.noreply.github.com>

* fix unchecked

* Update contracts/src/security/pausing/PauseManager.sol

Co-authored-by: The Dark Jester <thedarkjester@users.noreply.github.com>
Signed-off-by: kyzooghost <73516204+kyzooghost@users.noreply.github.com>

* Update contracts/src/security/pausing/PauseManager.sol

Co-authored-by: The Dark Jester <thedarkjester@users.noreply.github.com>
Signed-off-by: kyzooghost <73516204+kyzooghost@users.noreply.github.com>

* Update contracts/src/security/pausing/PauseManager.sol

Co-authored-by: The Dark Jester <thedarkjester@users.noreply.github.com>
Signed-off-by: kyzooghost <73516204+kyzooghost@users.noreply.github.com>

* more comment fixes

* match interface and contract natspec comments

* add *.mdx changes

* change pauseExpiry to pauseExpiryTimestamp

* doc change

* tests passing with new pause expiry value after security council pause

* add new overflow test to pausemanager

* expand unchecked block

* indent unchecked block

* unPauseDueToExpiry -> unPauseByExpiredType

* Update contracts/src/security/pausing/PauseManager.sol

Co-authored-by: The Dark Jester <thedarkjester@users.noreply.github.com>
Signed-off-by: kyzooghost <73516204+kyzooghost@users.noreply.github.com>

* added unpausebytype comment

---------

Signed-off-by: kyzooghost <73516204+kyzooghost@users.noreply.github.com>
Co-authored-by: The Dark Jester <thedarkjester@users.noreply.github.com>
2025-03-01 00:46:53 +11:00
kyzooghost
14c64cf906 [Refactor] LineaRollup tests (#736)
* utils -> helpers in test

* start to refactor helpers

* did some deploy functions

* running tests with all helper functions refactored out

* slight cleanup

* did BlobSubmission.ts

* did Finalization.ts

* more comments to before

* clean up dependency order
2025-02-28 21:56:44 +11:00
kyzooghost
171b0ce431 [Fix] Foundry version to 1.0 (#732)
* fix foundry test

* add doc fixes
2025-02-27 23:02:19 +11:00
kyzooghost
62d0d24c57 [Feat] Precomputed/Counterfactual address for TokenBridge Remote Sender (#678)
* remove reinit function in tokenbridge

* passing tests with removal of setRemoteSender

* remove operational task and dead role reference

* added tokenbridgev1_1 artifact to e2e tests

* adjustments

* fix nonce increment
2025-02-27 20:14:26 +11:00
kyzooghost
086c861f0b [Fix] Smart contract errors references (#721)
* update for smart-contract-errors.toml

* remove ref to deprecated errors in coordinator

* update bridge-ui abi
2025-02-27 20:11:02 +11:00
kyzooghost
e4e4a186ac [Fix] OZ-Upgrade-Plugin + Solhint warnings (#661)
* fix tokenbridge init ordering given oz plugin warnings

* adjust solhint linting

* fix scripts/tokenBridge/gasEstimation/gasEstimation.ts

* added   /// @custom:oz-upgrades-unsafe-allow incorrect-initializer-order

* fix for L2MessageService

* remove warning silencer for demo purpose

* Revert "remove warning silencer for demo purpose"

This reverts commit 4eccc3d0fc32501ab0e99f737e7b25daa8214601.

* add incorrect-initializer-flag to upgrades constructor function
2025-02-27 06:38:34 +00:00
kyzooghost
a493d84d1a [Fix] Solidity docgen config (#731)
* docgen config fixes

* add libraries back to docgen

* added more libraries back in
2025-02-26 22:46:56 +11:00
kyzooghost
3a5cab036a fix tokenbridge comment typos (#729) 2025-02-26 21:29:50 +11:00
Pedro Novais
3caceed6f6 Staterecovery part 13 blockhash fixes (#675)
staterecovery: fix blockHash opcode and improve performance of blob fetching from L1

---------

Signed-off-by: Pedro Novais <1478752+jpnovais@users.noreply.github.com>
Co-authored-by: Roman Vaseev <4833306+Filter94@users.noreply.github.com>
2025-02-20 10:14:38 +00:00
kyzooghost
a72a7e930c smart contract doc changes for erc-20 (#695) 2025-02-18 20:24:09 +11:00
AlexandreBelling
d50e8141b3 chores(verifier): adds the new verifier contract and update the tests (#687) 2025-02-14 03:42:03 -08:00
AlexandreBelling
4c01e012ef chores(verifier): add the sepolia beta-v1.3 contract (fmtted) (#684)
* chores(verifier): add the sepolia beta-v1.3 contract (fmtted)

* chores(contracts): update the testdata proof

* fixup(testdata): readd the wrongly deleted fields
2025-02-13 01:49:27 -08:00
The Dark Jester
4700e9078c [Chore] - use defined account for opcode testing (#671)
* use defined account for opcode testing

* add output to show execution
2025-02-11 05:57:10 -08:00
The Dark Jester
c0836063cd use blockhash with current block (#663) 2025-02-07 04:12:45 -08:00
kyzooghost
aa64956c77 [Feat] L1 contracts bump to solidity 0.8.28 (#656)
* working hardhat compile

* bump solhint version

* bump hardhat version

* remove 0.8.26 refs

* remove solhint join discord cli message

* update upgrades-core dependency

* silence openzeppelin-upgrades error for test fixtures

* fix floating version for integrationtesttrue

* remove 0.8.26
2025-02-07 00:00:02 +11:00
The Dark Jester
b5194c0d5e add contracts and out of gas script linea scenario (#653) 2025-02-04 14:44:38 -08:00
kyzooghost
5fbd7ed9aa [Feat] Remove flattened contracts (#640)
* remove TokenBridgeFlatten and L2MessageServiceLineaMainnet

* remove contracts/deploy/04_deploy_L2MessageServiceV1Deployed.ts

* delete 04_deploy_L2MessageServiceImplementation

* give floating pragma to
IntegrationTestTrueVerifier.sol

* added deployed-artifacts

* added versioning to tokenbridge + l2messageservice artifacts

* revert bridge-ui changes

* fix typechain imports in e2e tests

* more artifact typechain fixes

* deploy contracts -> v1

* Revert "deploy contracts -> v1"

This reverts commit 34314bbad26a6c44e1ef311552f63f52275495f8.

* redo add v1 to artifact deployment scripts after merge main

* restore deleted files

* more pr adjustments

* empty to prompt ci
2025-02-05 00:53:43 +11:00
kyzooghost
1a811f452d [Feat] Floating pragma for inherited contracts (#630)
* floating pragma for inherited contracts

* make ratelimiter abstract contract
2025-02-04 20:28:54 +11:00
The Dark Jester
b1c8ec57d6 [Chore] - 498 v5 techdebt cleanup (#613)
* initial V5 removal before main coordinator adjust

* fix build issue

* default to V6 and remove V5 references

* force  Web3JLineaRollupSmartContractClientReadOnly

* fix test reference

* remove V5 references
2025-01-29 20:49:23 +00:00
Victorien Gauch
d9353756ee Fix: update contracts folder structure (#420)
* fix: update contracts folder structure

* fix: update contracts documentation

* fix: regenerate docs

* fix: remove .md file in solidity docs folder

* fix: rename Utils contract + update autoupdate script

* fix: update solidity doc

* fix: clean test contracts folder structure

* fix: clean test folder structure

* fix: update autoupdate.sh script

* fix: update solcover file

* fix: remove static nonce in LineaRollup test

* Merge branch 'main' into fix/399-update-contracts-folder-structure

* remove files in merge conflict

* fix prover reference for Mimc.sol

* fix: update docs

* fix: remove unused files

* point to correct folders in readmes

---------

Co-authored-by: thedarkjester <grant.southey@consensys.net>
2025-01-29 10:32:31 +01:00
AlexandreBelling
aeb86855ae Prover: connect the codehash and the statesummary module (#463)
* clean(prover): more hilo into zkevm/prover/common

* feat(codehash): implements the module connecting the codehash and the statesummary

* clean(ss): apply the changes for the statesummary

* feat(rand): moves everything to use rand/v2

* feat(csv): adds WriteExplicit

* feat(codehash): implements the consistency module

* fix(rng): Int31n -> Int32N

* fix(lint): pass the use of test-rng

* clean: clean one of the comment to remove debugging data

* fix(test): fix conversion test and also simplify the use of rng

* feat(codehash): enable the codehash consistency module

* reconnect the execution data hasher with the public input

* revert the rand/v2 for the testcase-gen of the contracts
2025-01-16 22:31:15 +01:00
kyzooghost
5e7e7e1cb9 hacky fix to check for forge install on pnpm run solidity:docgen (#501) 2025-01-09 22:07:24 +11:00
Nadeem Bhati
469bb8b925 Add support for foundry compilation and testing (#277)
* step 1/2

* fix

* setup 2/2, foundry test added

* readme added

* fix gitmodules

* fix gitmodule

* fix git module

* :(

* forge install: forge-std

v1.9.4

* readme fix
2025-01-09 02:38:55 -08:00
The Dark Jester
a5dffa3339 [Chore] - Add beta v1 proof verification test (#508)
* feat: reactivate the ecadd module

* feat: add the new contract (in prover folder)

* chores: move the plonk verifier in the contract folder

* add betaV1 sepolia proof verification test

* move functions closer to use

---------

Co-authored-by: AlexandreBelling <alexandrebelling8@gmail.com>
2025-01-09 01:17:47 -08:00
kyzooghost
3cf80e1d2c remove empty *.mdx page for storagefiller39 (#512) 2025-01-09 20:14:56 +11:00
kyzooghost
10ca81f6e6 [Fix] stucture typo (#502)
* fix structure typo

* fix structure typo
2025-01-09 20:12:15 +11:00
AlexandreBelling
2fb12b90a7 Prover: new beta-v1 contract (#504)
* feat: reactivate the ecadd module

* feat: add the new contract (in prover folder)

* chores: move the plonk verifier in the contract folder
2025-01-08 11:10:02 +01:00
The Dark Jester
643110c696 [Chore] - Match contract docs locally (#493)
* add docgen for solidity changes to husky

* add solidity docs

* Update .husky/pre-commit.js

Co-authored-by: kyzooghost <73516204+kyzooghost@users.noreply.github.com>
Signed-off-by: The Dark Jester <thedarkjester@users.noreply.github.com>

* Update .husky/pre-commit.js

Co-authored-by: kyzooghost <73516204+kyzooghost@users.noreply.github.com>
Signed-off-by: The Dark Jester <thedarkjester@users.noreply.github.com>

* Update .husky/pre-commit.js

Co-authored-by: kyzooghost <73516204+kyzooghost@users.noreply.github.com>
Signed-off-by: The Dark Jester <thedarkjester@users.noreply.github.com>

* Update .husky/pre-commit.js

Co-authored-by: kyzooghost <73516204+kyzooghost@users.noreply.github.com>
Signed-off-by: The Dark Jester <thedarkjester@users.noreply.github.com>

* Update .husky/pre-commit.js

Co-authored-by: kyzooghost <73516204+kyzooghost@users.noreply.github.com>
Signed-off-by: The Dark Jester <thedarkjester@users.noreply.github.com>

* Update .husky/pre-commit.js

Co-authored-by: kyzooghost <73516204+kyzooghost@users.noreply.github.com>
Signed-off-by: The Dark Jester <thedarkjester@users.noreply.github.com>

---------

Signed-off-by: The Dark Jester <thedarkjester@users.noreply.github.com>
Co-authored-by: kyzooghost <73516204+kyzooghost@users.noreply.github.com>
2025-01-06 06:12:38 -08:00
kyzooghost
a83412e247 [Fix] Add more checks to TokenBridge.initialize() (#380)
* added new tests covering TokenBridge.initialise() changes

* ran npx hardhat docgen

* update TokenBridge dynamic artifact

* test verified commit

* reverse verified commit test

* added nonZeroChainId modifier

* Update contracts/contracts/tokenBridge/interfaces/ITokenBridge.sol

Co-authored-by: The Dark Jester <thedarkjester@users.noreply.github.com>
Signed-off-by: kyzooghost <73516204+kyzooghost@users.noreply.github.com>

* update ITokenBridge doc

* add initialization check for default admin

---------

Signed-off-by: kyzooghost <73516204+kyzooghost@users.noreply.github.com>
Co-authored-by: The Dark Jester <thedarkjester@users.noreply.github.com>
Co-authored-by: thedarkjester <grant.southey@consensys.net>
2025-01-06 03:05:28 -08:00
The Dark Jester
94fc031fce use encodeCall vs encodeWithSelector (#414) 2025-01-06 02:33:55 -08:00