76 Commits

Author SHA1 Message Date
Andrea Franz
5d3c6785e1 chore: move forge scripts under /script 2025-06-30 11:23:59 +02:00
Andrea Franz
962c731aa9 feat: implement L1ETHBridge.finalizeWithdrawal 2025-06-27 17:06:52 +02:00
Andrea Franz
6200e94927 chore: update CompletedMessage to have the hash of the message without all the fields 2025-06-27 17:06:52 +02:00
Andrea Franz
4408e5a1fb chore: rename completeBridge to completeBridging 2025-06-27 17:06:52 +02:00
Andrea Franz
3464208e46 chore: remove sender/recipient checks in YieldRollup.sendMessage since they are already in the ETH bridges 2025-06-27 17:06:52 +02:00
Andrea Franz
dc1549d03d feat: implement L2ETHBridge.bridgeETH and L1ETHBridge.completeBridge 2025-06-27 17:06:52 +02:00
Andrea Franz
ba08cb9e91 chore: move L1ETHBridge and L2ETHBridge to src/bridging/eth 2025-06-27 17:06:52 +02:00
Andrea Franz
f49b1b2855 chore: move L2YieldMessageService under src/messaging/l2 2025-06-27 17:06:52 +02:00
Andrea Franz
5bedbfd509 chore: moved YieldRollup to src/rollup 2025-06-27 17:06:52 +02:00
Andrea Franz
f6ebdcde96 chore: add L1/L2 ETHBridge interfaces and emit events when addresses are updated 2025-06-23 15:58:28 +02:00
Andrea Franz
8949ea7855 chore(L1ETHBridge): L1ETHBridge inherits from MessageServiceBase and makes sure addresses are not 0 in setter functions 2025-06-23 15:58:28 +02:00
Andrea Franz
667916e2ab feat: add L2YieldMessageService 2025-06-23 15:58:28 +02:00
Andrea Franz
c39a921f7b feat: Add L2ETHBridge with the completeBridge function 2025-06-23 15:58:27 +02:00
Andrea Franz
bd90067a29 feat: add YieldRollup 2025-06-23 15:58:27 +02:00
Andrea Franz
6ca33e924d feature(L1ETHBridge): add L1ETHBridge that wraps a message for the L2ETHBridge contracts and forwards the funds to the yield manager 2025-06-23 15:58:27 +02:00
The Dark Jester
e66abc64fd Feat/1076 refactor and allow overriding (#1079)
* allow tokenbridge overrides

* add L1MessageService overrides

* refactor L2 MessageService

* refactor L2 MessageService V1

* use correct modifier

* refactor LineaRollup for overriding

* allow other overrides

* reinstate general in pause on tokenbridge

* add missing NatSpec

* sample overrides

* add generic bridge and document placeholder

* documentation and folder placement

* documentation cleanup

* use imported references

* use variable pragma for inherited contracts

* reset pragmas for some

* use base abstract contracts with version overrides

* use TokenBridgeBase as abstract

* Update contracts/src/bridging/token/TokenBridgeBase.sol

Co-authored-by: Victorien Gauch <85494462+VGau@users.noreply.github.com>
Signed-off-by: The Dark Jester <thedarkjester@users.noreply.github.com>

* Update contracts/src/bridging/token/TokenBridgeBase.sol

Co-authored-by: Victorien Gauch <85494462+VGau@users.noreply.github.com>
Signed-off-by: The Dark Jester <thedarkjester@users.noreply.github.com>

* Update contracts/src/bridging/token/TokenBridgeBase.sol

Co-authored-by: Victorien Gauch <85494462+VGau@users.noreply.github.com>
Signed-off-by: The Dark Jester <thedarkjester@users.noreply.github.com>

* Update contracts/src/bridging/token/interfaces/ITokenBridge.sol

Co-authored-by: Victorien Gauch <85494462+VGau@users.noreply.github.com>
Signed-off-by: The Dark Jester <thedarkjester@users.noreply.github.com>

* Update contracts/src/messaging/l2/L2MessageServiceBase.sol

Co-authored-by: Victorien Gauch <85494462+VGau@users.noreply.github.com>
Signed-off-by: The Dark Jester <thedarkjester@users.noreply.github.com>

* Update contracts/src/messaging/l2/v1/interfaces/IL2MessageServiceV1.sol

Co-authored-by: Victorien Gauch <85494462+VGau@users.noreply.github.com>
Signed-off-by: The Dark Jester <thedarkjester@users.noreply.github.com>

* Update contracts/src/rollup/interfaces/ILineaRollup.sol

Co-authored-by: Victorien Gauch <85494462+VGau@users.noreply.github.com>
Signed-off-by: The Dark Jester <thedarkjester@users.noreply.github.com>

* Update contracts/src/rollup/LineaRollupBase.sol

Co-authored-by: Victorien Gauch <85494462+VGau@users.noreply.github.com>
Signed-off-by: The Dark Jester <thedarkjester@users.noreply.github.com>

* Update contracts/src/_testing/unit/bridging/InheritingTokenBridge.sol

Co-authored-by: Victorien Gauch <85494462+VGau@users.noreply.github.com>
Signed-off-by: The Dark Jester <thedarkjester@users.noreply.github.com>

* Update contracts/src/verifiers/PlonkVerifierDev.sol

Co-authored-by: Victorien Gauch <85494462+VGau@users.noreply.github.com>
Signed-off-by: The Dark Jester <thedarkjester@users.noreply.github.com>

* Update contracts/src/verifiers/PlonkVerifierForDataAggregation.sol

Co-authored-by: Victorien Gauch <85494462+VGau@users.noreply.github.com>
Signed-off-by: The Dark Jester <thedarkjester@users.noreply.github.com>

* Update contracts/src/verifiers/PlonkVerifierForMultiTypeDataAggregation.sol

Co-authored-by: Victorien Gauch <85494462+VGau@users.noreply.github.com>
Signed-off-by: The Dark Jester <thedarkjester@users.noreply.github.com>

* Update contracts/src/verifiers/PlonkVerifierMainnetFull.sol

Co-authored-by: Victorien Gauch <85494462+VGau@users.noreply.github.com>
Signed-off-by: The Dark Jester <thedarkjester@users.noreply.github.com>

* Update contracts/src/verifiers/PlonkVerifierSepoliaFull.sol

Co-authored-by: Victorien Gauch <85494462+VGau@users.noreply.github.com>
Signed-off-by: The Dark Jester <thedarkjester@users.noreply.github.com>

* linting

* allow submitDataAsCalldata overriding

* address missing test coverage

* adjust gap name for storage clarity

---------

Signed-off-by: The Dark Jester <thedarkjester@users.noreply.github.com>
Co-authored-by: Victorien Gauch <85494462+VGau@users.noreply.github.com>
2025-06-17 09:26:24 -07:00
AlexandreBelling
56c48093a3 Prover: Prepare the setup for 5.1.2 (#1070)
* chores(cfg): bumps the version of the prover to 5.1.2

* feat(contracts): updates the contracts to 5.1.2
2025-06-03 10:42:18 +02: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
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
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
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
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
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
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
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
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
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
f0bc3fa3b6 [Fix] Use finalization data struct to remove confusion (#354)
* use finalization data struct to remove confusion

* remove redundant check on block sequencing

* remove unused error from interface
2025-01-06 02:33:28 -08:00
The Dark Jester
63357efc0a [Fix] 4.5, 4.10 - Allow updating pause to role mappings and prevented using UNUSUED type (#415)
* Allow updating pause to role mappings

* Update contracts/test/lib/PauseManager.ts

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

* Update contracts/test/lib/PauseManager.ts

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

* Update contracts/test/lib/PauseManager.ts

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

* Update contracts/test/lib/PauseManager.ts

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

* add additional test cases

---------

Signed-off-by: The Dark Jester <thedarkjester@users.noreply.github.com>
Co-authored-by: kyzooghost <73516204+kyzooghost@users.noreply.github.com>
2025-01-06 02:33:10 -08:00
The Dark Jester
7918d8ce49 validate default admin and fallback operator init (#374) 2025-01-06 02:31:52 -08:00
The Dark Jester
eafe6870a9 bump hardhat and reduce lint warnings (#454) 2024-12-16 05:26:46 -08:00
kyzooghost
8a20b27f3d [Feat] - Foundry config, supports London EVM_VERSION for L2 Linea contracts (#361)
* forge build working

* poc done

* commit

* did lint command

* remove caret from hardhat-foundry

* add foundry installation to run-smc-tests.yml

* update run-smc-tests.yml
2024-11-29 07:09:07 -08:00
The Dark Jester
cdb74e1496 validate callforwarding proxy works as expected (#338) 2024-11-26 10:16:51 -08:00
The Dark Jester
98291b5c4b [Feat] 191 improve documentation (#316)
* initial changes for the contract readme

* testing guidelines wip

* add contract documentation

* add note on future deprecation

* add memory and CPU requirements for docker

* add audit references to documentation

* use tokenbridge make commands in documentation

* add additional comments to testing guidelines

* define contract style guide and link it

* address PR comments with better documentation

* document tweaks and traffic generation script

* catch error on failure of main()

* add precompute script and readme documentation

* use ethers address generation

---------

Co-authored-by: count-sum <andrei.alexandru@consensys.net>
2024-11-22 09:53:15 -08:00
The Dark Jester
4191d2eda2 [Fix] - L-01 - Validate default admin and fallback operator (#305)
* validate default admin and fallback operator

* revert confirmDeployment on empty list

* align natspec
2024-11-21 02:18:28 -08:00