From ef610b46a66302088be9d36033060d67d02b058d Mon Sep 17 00:00:00 2001 From: bearni95 Date: Tue, 14 May 2024 19:44:18 +0200 Subject: [PATCH] fixed pnpm-lock.yaml --- .../contracts/L1/provers/GuardianProver.sol | 4 - .../contracts/L1/provers/Guardians.sol | 1 - .../contracts/L1/tiers/HeklaTierProvider.sol | 6 +- .../contracts/bridge/IQuotaManager.sol | 7 + .../deployments/hekla-contract-logs.md | 4 +- .../deployments/mainnet-contract-logs.md | 283 +++++++++++------- .../driver/chain_syncer/blob/syncer.go | 7 +- packages/taiko-client/pkg/rpc/blob_tx.go | 137 --------- packages/taiko-client/pkg/rpc/blob_tx_test.go | 74 ----- .../proposer/transaction_builder/blob.go | 10 +- packages/taiko-client/prover/prover_test.go | 1 - release-please-config.json | 1 + 12 files changed, 198 insertions(+), 337 deletions(-) delete mode 100644 packages/taiko-client/pkg/rpc/blob_tx.go delete mode 100644 packages/taiko-client/pkg/rpc/blob_tx_test.go diff --git a/packages/protocol/contracts/L1/provers/GuardianProver.sol b/packages/protocol/contracts/L1/provers/GuardianProver.sol index 6942a0b557c..74f351cb690 100644 --- a/packages/protocol/contracts/L1/provers/GuardianProver.sol +++ b/packages/protocol/contracts/L1/provers/GuardianProver.sol @@ -76,10 +76,6 @@ contract GuardianProver is IVerifier, Guardians { nonReentrant returns (bool approved_) { - if (_proof.tier != LibTiers.TIER_GUARDIAN) { - revert INVALID_PROOF(); - } - bytes32 hash = keccak256(abi.encode(_meta, _tran, _proof.data)); approved_ = approve(_meta.id, hash); diff --git a/packages/protocol/contracts/L1/provers/Guardians.sol b/packages/protocol/contracts/L1/provers/Guardians.sol index 10e84f1d597..2fa886abbb1 100644 --- a/packages/protocol/contracts/L1/provers/Guardians.sol +++ b/packages/protocol/contracts/L1/provers/Guardians.sol @@ -42,7 +42,6 @@ abstract contract Guardians is EssentialContract { error INVALID_GUARDIAN(); error INVALID_GUARDIAN_SET(); error INVALID_MIN_GUARDIANS(); - error INVALID_PROOF(); /// @notice Set the set of guardians /// @param _newGuardians The new set of guardians diff --git a/packages/protocol/contracts/L1/tiers/HeklaTierProvider.sol b/packages/protocol/contracts/L1/tiers/HeklaTierProvider.sol index 5445dfac01b..9d5098fdf15 100644 --- a/packages/protocol/contracts/L1/tiers/HeklaTierProvider.sol +++ b/packages/protocol/contracts/L1/tiers/HeklaTierProvider.sol @@ -65,9 +65,7 @@ contract HeklaTierProvider is EssentialContract, ITierProvider { /// @inheritdoc ITierProvider function getMinTier(uint256 _rand) public pure override returns (uint16) { - // 50% will be selected to require SGX proofs. - if (_rand % 2 == 0) return LibTiers.TIER_SGX; - // Other blocks are optimistic, without validity proofs. - return LibTiers.TIER_OPTIMISTIC; + // All blocks require SGX proofs. + return LibTiers.TIER_SGX; } } diff --git a/packages/protocol/contracts/bridge/IQuotaManager.sol b/packages/protocol/contracts/bridge/IQuotaManager.sol index 8b2381ae8e0..3091e019315 100644 --- a/packages/protocol/contracts/bridge/IQuotaManager.sol +++ b/packages/protocol/contracts/bridge/IQuotaManager.sol @@ -6,6 +6,13 @@ pragma solidity 0.8.24; interface IQuotaManager { /// @notice Consumes a specific amount of quota for a given address. /// This function must revert if available quota is smaller than the given amount of quota. + /// + /// @dev Note that IQuotaManager is used by vaults and bridge, and should be registered in a + /// shared address manager on the L1, therefore, a registered IQuotaManager and its per-token + /// quota settings will be shared by all Taiko L2s. To enable a per-L2 quota, we need to modify + /// this function to: + /// `function consumeQuota(uint256 _srcChainId, address _token, uint256 _amount) ` + /// /// @param _token The token address. Ether is represented with address(0). /// @param _amount The amount of quota to consume. function consumeQuota(address _token, uint256 _amount) external; diff --git a/packages/protocol/deployments/hekla-contract-logs.md b/packages/protocol/deployments/hekla-contract-logs.md index 3e6389d4b6c..6d3a5f443d6 100644 --- a/packages/protocol/deployments/hekla-contract-logs.md +++ b/packages/protocol/deployments/hekla-contract-logs.md @@ -106,9 +106,9 @@ ### tierProvider -- impl: `0x02932D1c8C9EBf283aA809E7591A070c82b1696D` +- impl: `0x750D885DCAB712bA808D66D934CF315D0D98d04c.` - logs: - - upgraded on May 10, 2024 at commit `4903bec` + - upgraded on May 14, 2024 at commit `0ef7b8caa` ### guardian_prover_minority diff --git a/packages/protocol/deployments/mainnet-contract-logs.md b/packages/protocol/deployments/mainnet-contract-logs.md index ca9e17d3eb4..e015395441d 100644 --- a/packages/protocol/deployments/mainnet-contract-logs.md +++ b/packages/protocol/deployments/mainnet-contract-logs.md @@ -6,252 +6,329 @@ ## L1 Contracts -### shared_address_manager +### Shared + +#### shared_address_manager - proxy: `0xEf9EaA1dd30a9AA1df01c36411b5F082aA65fBaa` -- impl: `0x9cA1Ab10c9fAc5153F8b78E67f03aAa69C9c6A15` -- owner: `0x56706F118e42AE069F20c5636141B844D1324AE1` -- pendingOwner: `admin.taiko.eth` -- todo: - - admin.taiko.eth to accept the owner +- impl: `0xF1cA1F1A068468E1dcF90dA6add185467de80943` +- owner: `admin.taiko.eth` +- names: + - taiko_token: `0x10dea67478c5F8C5E2D90e5E9B26dBe60c54d800` + - signal_service: `0x9e0a24964e5397B566c1ed39258e21aB5E35C77C` + - signal_service@167000: `0x1670000000000000000000000000000000000005` + - bridge: `0xd60247c6848B7Ca29eDdF63AA924E53dB6Ddd8EC` + - bridge@167000: `0x1670000000000000000000000000000000000001` + - erc20_vault: `0x996282cA11E5DEb6B5D122CC3B9A1FcAAD4415Ab` + - erc20_vault@167000: `0x1670000000000000000000000000000000000002` + - erc721_vault: `0x0b470dd3A0e1C41228856Fb319649E7c08f419Aa` + - erc721_vault@167000: `0x1670000000000000000000000000000000000003` + - erc1155_vault: `0xaf145913EA4a56BE22E120ED9C24589659881702` + - erc1155_vault@167000: `0x1670000000000000000000000000000000000004` + - bridged_erc1155: `0x3c90963cfba436400b0f9c46aa9224cb379c2c40` + - bridged_erc721: `0xc3310905e2bc9cfb198695b75ef3e5b69c6a1bf7` + - bridged_erc20: `0x79bc0aada00fcf6e7ab514bfeb093b5fae3653e3` + - bridge_watchdog: `0x00000291ab79c55dc4fcd97dfba4880df4b93624` + - quota_manager: `0x91f67118DD47d502B1f0C354D0611997B022f29E` - logs: - - deployed on May 1, 2024 at commit `56dddf2b6` + - deployed on May 1, 2024 @commit `56dddf2b6` + - admin.taiko.eth accepted the ownership @tx`0x0ed114fee6de4e3e2206cea44e6632ec0c4588f73648d98d8df5dc0183b07885` + - Upgraded from `0x9cA1Ab10c9fAc5153F8b78E67f03aAa69C9c6A15` to `0xF1cA1F1A068468E1dcF90dA6add185467de80943` @commit `b90b932` @tx`0x416560cd96dc75ccffebe889e8d1ab3e08b33f814dc4a2bf7c6f9555071d1f6f` + - `Init2()` called @tx `0x7311fee56f87294e336393b55939489bc1e810c402f304013475d04c90ca32a9` -### taiko_token +#### taiko_token - ens: `token.taiko.eth` - proxy: `0x10dea67478c5F8C5E2D90e5E9B26dBe60c54d800` -- impl: `0x9ae1a067f9655dd0511390e3d70bb25933ae61eb` -- owner: `labs.taiko.eth` +- impl: `0xea53c0f4b129Cf3f3FBA896F9f23ca18246e9B3c` +- owner: `admin.taiko.eth` - logs: - - deployed on April 25, 2024 at commit `2f6d3c62e` + - deployed on April 25, 2024 @commit `2f6d3c62e` + - upgraded impl from `0x9ae1a067f9655dd0511390e3d70bb25933ae61eb` to `0xea53c0f4b129Cf3f3FBA896F9f23ca18246e9B3c` @commit `b90b932` and, + - Changed owner from `labs.taiko.eth` to `admin.taiko.eth` @tx `0x7d82794932540ed9edd259e58f6ef8ae21a49beada7f0224638f888f7149c01c` + - Accept owner @tx`0x416560cd96dc75ccffebe889e8d1ab3e08b33f814dc4a2bf7c6f9555071d1f6f` -### signal_service +#### signal_service - proxy: `0x9e0a24964e5397B566c1ed39258e21aB5E35C77C` -- impl: `0xE1d91bAE44B70bD66e8b688B8421fD62dcC33c72` -- owner: `0x56706F118e42AE069F20c5636141B844D1324AE1` -- pendingOwner: `admin.taiko.eth` -- todo: - - admin.taiko.eth to accept the owner +- impl: `0xB11Cd7bA46a12F238b4Ad831f6F296262C1e652d` +- owner: `admin.taiko.eth` - logs: - - deployed on May 1, 2024 at commit `56dddf2b6` + - deployed on May 1, 2024 @commit `56dddf2b6` + - admin.taiko.eth accepted the ownership @tx`0x0ed114fee6de4e3e2206cea44e6632ec0c4588f73648d98d8df5dc0183b07885` + - upgraded from `0xE1d91bAE44B70bD66e8b688B8421fD62dcC33c72` to `0xB11Cd7bA46a12F238b4Ad831f6F296262C1e652d` @commit `b90b932` @tx`0x416560cd96dc75ccffebe889e8d1ab3e08b33f814dc4a2bf7c6f9555071d1f6f` -### bridge +#### bridge - proxy: `0xd60247c6848B7Ca29eDdF63AA924E53dB6Ddd8EC` -- impl: `0x91d593d34f2E1904cDCe3D5290a74563F87bCF6f` -- owner: `0x56706F118e42AE069F20c5636141B844D1324AE1` -- pendingOwner: `admin.taiko.eth` -- todo: - - admin.taiko.eth to accept the owner +- impl: `0x4A1091c2fb37D9C4a661c2384Ff539d94CCF853D` +- owner: `admin.taiko.eth` - logs: - - deployed on May 1, 2024 at commit `56dddf2b6` + - deployed on May 1, 2024 @commit `56dddf2b6` + - admin.taiko.eth accepted the ownership @tx`0x0ed114fee6de4e3e2206cea44e6632ec0c4588f73648d98d8df5dc0183b07885` + - upgraded from `0x91d593d34f2E1904cDCe3D5290a74563F87bCF6f` to `0x4A1091c2fb37D9C4a661c2384Ff539d94CCF853D` @commit `b90b932` @tx`0x416560cd96dc75ccffebe889e8d1ab3e08b33f814dc4a2bf7c6f9555071d1f6f` -### quota_manager +#### quota_manager - proxy: `0x91f67118DD47d502B1f0C354D0611997B022f29E` - impl: `0x49c5e5F131314Bb24b17E249960F8B12F925ef22` -- owner: `0x56706F118e42AE069F20c5636141B844D1324AE1` -- pendingOwner: `admin.taiko.eth` -- todo: - - admin.taiko.eth to accept the owner +- owner: `admin.taiko.eth` +- quota: + - ETH: `64516129032258064516` (`200_000 * 1 ether / 3100`) + - WETH(`0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2`): `64516129032258064516` (`200_000 * 1 ether / 3100`) + - TKO(`0x10dea67478c5F8C5E2D90e5E9B26dBe60c54d800`): `40000000000000000000000` (`200_000 * 1e18 / 5`) + - USDT(`0xdAC17F958D2ee523a2206206994597C13D831ec7`): `200000000000` (`200_000 * 1e6`) + - USDC(`0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48`): `200000000000` (`200_000 * 1e6`) - logs: - deployed on May 13, 2024 at commit `b90b932` + - admin.taiko.eth accepted the ownership @tx`0x2d6ce1781137899f65c1810e42f556c27caa4e9bd13077ba5bc7a9a0975eefcb` -### erc20_vault +#### erc20_vault - proxy: `0x996282cA11E5DEb6B5D122CC3B9A1FcAAD4415Ab` -- impl: `0x15D9F7e12aEa18DAEF5c651fBf97567CAd4a4BEc` +- impl: `0xC722d9f3f8D60288589F7f67a9CFAd34d3B9bf8E` - owner: `admin.taiko.eth` - logs: - - deployed on May 1, 2024 at commit `56dddf2b6` + - deployed on May 1, 2024 @commit `56dddf2b6` + - upgraded from `0x15D9F7e12aEa18DAEF5c651fBf97567CAd4a4BEc` to `0xC722d9f3f8D60288589F7f67a9CFAd34d3B9bf8E` @commit `b90b932` @tx`0x416560cd96dc75ccffebe889e8d1ab3e08b33f814dc4a2bf7c6f9555071d1f6f` -### erc721_vault +#### erc721_vault - proxy: `0x0b470dd3A0e1C41228856Fb319649E7c08f419Aa` -- impl: `0xEC04849E7722Fd69797a155796Db75aC8F94f692` +- impl: `0x41A7BDD153a5AfFb10Ed1AD3D6a4e5ad001495FA` - owner: `admin.taiko.eth` - logs: - - deployed on May 1, 2024 at commit `56dddf2b6` + - deployed on May 1, 2024 @commit `56dddf2b6` + - upgraded from `0xEC04849E7722Fd69797a155796Db75aC8F94f692` to `0x41A7BDD153a5AfFb10Ed1AD3D6a4e5ad001495FA` @commit `b90b932` @tx`0x416560cd96dc75ccffebe889e8d1ab3e08b33f814dc4a2bf7c6f9555071d1f6f` -### erc1155_vault +#### erc1155_vault - proxy: `0xaf145913EA4a56BE22E120ED9C24589659881702` -- impl: `0x7748dA086A2e6EDd8Db97eD236840910013c6396` +- impl: `0xd90b5fcf8d00d333d107E4Ab7F94c0c0A41CDcfE` - owner: `admin.taiko.eth` - logs: - - deployed on May 1, 2024 at commit `56dddf2b6` + - deployed on May 1, 2024 @commit `56dddf2b6` + - upgraded from `0x7748dA086A2e6EDd8Db97eD236840910013c6396` to `0xd90b5fcf8d00d333d107E4Ab7F94c0c0A41CDcfE` @commit `b90b932` @tx`0x416560cd96dc75ccffebe889e8d1ab3e08b33f814dc4a2bf7c6f9555071d1f6f` -### bridged_erc20 +#### bridged_erc20 - impl: `0xcc5d488073FA918cBbd73B9A523F3858C4de7372` - logs: - - deployed on May 1, 2024 at commit `56dddf2b6` + - deployed on May 1, 2024 @commit `56dddf2b6` -### bridged_erc721 +#### bridged_erc721 - impl: `0xc4096E9ff1526Bd1840B65e9f45695135aC12De7` - logs: - - deployed on May 1, 2024 at commit `56dddf2b6` + - deployed on May 1, 2024 @commit `56dddf2b6` -### bridged_erc1155 +#### bridged_erc1155 - impl: `0x39E4C1214e733639d059979079A151911e42791d` - logs: - - deployed on May 1, 2024 at commit `56dddf2b6` + - deployed on May 1, 2024 @commit `56dddf2b6` + +### Rollup Specific -### rollup_address_manager +#### rollup_address_manager - proxy: `0x579f40D0BE111b823962043702cabe6Aaa290780` -- impl: `0xd912aB787624c9eb96a37e658e9596e114360440` -- pendingOwner: `admin.taiko.eth` -- todo: - - admin.taiko.eth to accept the owner +- impl: `0xF1cA1F1A068468E1dcF90dA6add185467de80943` +- names: + - taiko_token: `0x10dea67478c5F8C5E2D90e5E9B26dBe60c54d800` + - signal_service: `0x9e0a24964e5397B566c1ed39258e21aB5E35C77C` + - bridge: `0xd60247c6848B7Ca29eDdF63AA924E53dB6Ddd8EC` + - taiko: `0x06a9Ab27c7e2255df1815E6CC0168d7755Feb19a` + - tier_provider: `0x33879cDF01121dc7bCe011b461e64d791aE931F2` + - tier_sgx: `0xb0f3186FC1963f774f52ff455DC86aEdD0b31F81` + - guardian_prover_minority: `0x579A8d63a2Db646284CBFE31FE5082c9989E985c` + - tier_guardian_minority: `0x579A8d63a2Db646284CBFE31FE5082c9989E985c` + - guardian_prover: `0xE3D777143Ea25A6E031d1e921F396750885f43aC` + - tier_guardian: `0xE3D777143Ea25A6E031d1e921F396750885f43aC` + - automata_dcap_attestation: `0x8d7C954960a36a7596d7eA4945dDf891967ca8A3` + - proposer_one: `0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045` vitalik.eth + - proposer: `0x000000633b68f5d8d3a86593ebb815b4663bcbe0` - logs: - - deployed on May 1, 2024 at commit `56dddf2b6` + - deployed on May 1, 2024 @commit `56dddf2b6` + - admin.taiko.eth accepted the ownership @tx`0x0ed114fee6de4e3e2206cea44e6632ec0c4588f73648d98d8df5dc0183b07885` + - Upgraded from `0xd912aB787624c9eb96a37e658e9596e114360440` to `0xF1cA1F1A068468E1dcF90dA6add185467de80943` @commit `b90b932` @tx`0x416560cd96dc75ccffebe889e8d1ab3e08b33f814dc4a2bf7c6f9555071d1f6f` + - `Init2()` called @tx `0x7311fee56f87294e336393b55939489bc1e810c402f304013475d04c90ca32a9` -### taikoL1 +#### taikoL1 - proxy: `0x06a9Ab27c7e2255df1815E6CC0168d7755Feb19a` -- impl: `0x99Ba70E62cab0cB983e66F72330fBDDC11d85501` +- impl: `0x9fBBedBBcBb753E7214BE08381efE10d89D712fE` - owner: `admin.taiko.eth` - logs: - - deployed on May 1, 2024 at commit `56dddf2b6` + - deployed on May 1, 2024 @commit `56dddf2b6` + - Upgraded from `0x99Ba70E62cab0cB983e66F72330fBDDC11d85501` to `0x9fBBedBBcBb753E7214BE08381efE10d89D712fE` @commit `b90b932` @tx`0x416560cd96dc75ccffebe889e8d1ab3e08b33f814dc4a2bf7c6f9555071d1f6f` + - `Init2()` called and reset block hash to `0411D9F84A525864E0A7E8BB51667D49C6BF73820AF9E4BC76EA66ADB6BE8903` @tx `0x7311fee56f87294e336393b55939489bc1e810c402f304013475d04c90ca32a9` -### assignmentHook +#### assignment_hook - proxy: `0x537a2f0D3a5879b41BCb5A2afE2EA5c4961796F6` -- impl: `0x4f664222C3fF6207558A745648B568D095dDA170` +- impl: `0xe226fAd08E2f0AE68C32Eb5d8210fFeDB736Fb0d` - owner: `admin.taiko.eth` - logs: - - deployed on May 1, 2024 at commit `56dddf2b6` + - deployed on May 1, 2024 @commit `56dddf2b6` + - Upgraded from `0x4f664222C3fF6207558A745648B568D095dDA170` to `0xe226fAd08E2f0AE68C32Eb5d8210fFeDB736Fb0d` @commit `b90b932` @tx`0x416560cd96dc75ccffebe889e8d1ab3e08b33f814dc4a2bf7c6f9555071d1f6f` -### tierProvider +#### tier_provider - proxy: `0x33879cDF01121dc7bCe011b461e64d791aE931F2` - impl: `0xf8254fd073063C35811577877f840548e77fD52E` - owner: `admin.taiko.eth` - logs: - - deployed on May 1, 2024 at commit `56dddf2b6` + - deployed on May 1, 2024 @commit `56dddf2b6` -### tier_sgx +#### tier_sgx - proxy: `0xb0f3186FC1963f774f52ff455DC86aEdD0b31F81` -- impl: `0x3f54067EF5d8B414Bdb1945cdF482BD158Aad175` +- impl: `0xf381868DD6B2aC8cca468D63B42F9040DE2257E9` - owner: `admin.taiko.eth` - logs: - - deployed on May 1, 2024 at commit `56dddf2b6` + - deployed on May 1, 2024 @commit `56dddf2b6` + - Upgraded from `0x3f54067EF5d8B414Bdb1945cdF482BD158Aad175` to `0xf381868DD6B2aC8cca468D63B42F9040DE2257E9` @commit `b90b932` @tx`0x416560cd96dc75ccffebe889e8d1ab3e08b33f814dc4a2bf7c6f9555071d1f6f` -### guardian_prover_minority +#### guardian_prover_minority - proxy: `0x579A8d63a2Db646284CBFE31FE5082c9989E985c` -- impl: `0x717DC5E3814591790BcB1fD9259eEdA7c14ce9CF` +- impl: `0x750221E951b77a2Cb4046De41Ec5F6d1aa7942D2` - owner: `admin.taiko.eth` -- todo: - - admin.taiko.eth to accept the owner - logs: - - deployed on May 1, 2024 at commit `56dddf2b6` + - deployed on May 1, 2024 @commit `56dddf2b6` + - admin.taiko.eth accepted the ownership @tx`0x0ed114fee6de4e3e2206cea44e6632ec0c4588f73648d98d8df5dc0183b07885` + - Upgraded from `0x717DC5E3814591790BcB1fD9259eEdA7c14ce9CF` to `0x750221E951b77a2Cb4046De41Ec5F6d1aa7942D2` @commit `b90b932` @tx`0x416560cd96dc75ccffebe889e8d1ab3e08b33f814dc4a2bf7c6f9555071d1f6f` -### guardian_prover +#### guardian_prover - proxy: `0xE3D777143Ea25A6E031d1e921F396750885f43aC` -- impl: `0x717DC5E3814591790BcB1fD9259eEdA7c14ce9CF` +- impl: `0x750221E951b77a2Cb4046De41Ec5F6d1aa7942D2` - owner: `admin.taiko.eth` - logs: - - deployed on May 1, 2024 at commit `56dddf2b6` + - deployed on May 1, 2024 @commit `56dddf2b6` + - Upgraded from `0x717DC5E3814591790BcB1fD9259eEdA7c14ce9CF` to `0x750221E951b77a2Cb4046De41Ec5F6d1aa7942D2` @commit `b90b932` @tx`0x416560cd96dc75ccffebe889e8d1ab3e08b33f814dc4a2bf7c6f9555071d1f6f` -### p256_verifier +#### p256_verifier - impl: `0x11A9ebA17EbF92b40fcf9a640Ebbc47Db6fBeab0` - logs: - - deployed on May 1, 2024 at commit `56dddf2b6` + - deployed on May 1, 2024 @commit `56dddf2b6` -### sig_verify_lib +#### sig_verify_lib - impl: `0x47bB416ee947fE4a4b655011aF7d6E3A1B80E6e9` - logs: - - deployed on May 1, 2024 at commit `56dddf2b6` + - deployed on May 1, 2024 @commit `56dddf2b6` -### pem_cert_chain_lib +#### pem_cert_chain_lib - impl: `0x02772b7B3a5Bea0141C993Dbb8D0733C19F46169` - logs: - - deployed on May 1, 2024 at commit `56dddf2b6` + - deployed on May 1, 2024 @commit `56dddf2b6` -### automata_dcap_attestation +#### automata_dcap_attestation - proxy: `0x8d7C954960a36a7596d7eA4945dDf891967ca8A3` -- impl: `0xEE8FC1dbb8D345f5bF35dFb939C6f9EdC5fCDAFc` +- impl: `0xde1b1FBe7D721af4A56651272ef91A59B7303323` - owner: `admin.taiko.eth` - logs: - - deployed on May 1, 2024 at commit `56dddf2b6` + - deployed on May 1, 2024 @commit `56dddf2b6` + - Upgraded from `0xEE8FC1dbb8D345f5bF35dFb939C6f9EdC5fCDAFc` to `0xde1b1FBe7D721af4A56651272ef91A59B7303323` @commit `b90b932` @tx`0x416560cd96dc75ccffebe889e8d1ab3e08b33f814dc4a2bf7c6f9555071d1f6f` + - Called `configureTcbInfoJson` and `configureQeIdentityJson` @commit `b90b932` @tx`0x2d6ce1781137899f65c1810e42f556c27caa4e9bd13077ba5bc7a9a0975eefcb` + +### token_unlocking + +- impl: `0x244108e321FE03b0E33FE63Ef62285F05d191a62` +- logs: + - deployed on May 13, 2024 at commit `165e28279` ## L2 Contracts -### bridge +### Shared + +#### shared_address_manager + +- proxy: `0x1670000000000000000000000000000000000006` +- impl: `0x0167000000000000000000000000000000000006` +- owner: `0xf8ff2AF0DC1D5BA4811f22aCb02936A1529fd2Be` +- todo: + - change owner to DelegateOwner +- logs: + - deployed on May 1, 2024 @commit `56dddf2b6` + +#### bridge - proxy: `0x1670000000000000000000000000000000000001` - impl: `0x0167000000000000000000000000000000000001` - owner: `0xf8ff2AF0DC1D5BA4811f22aCb02936A1529fd2Be` +- todo: + - change owner to DelegateOwner - logs: - - deployed on May 1, 2024 at commit `56dddf2b6` + - deployed on May 1, 2024 @commit `56dddf2b6` -### erc20_vault +#### erc20_vault - proxy: `0x1670000000000000000000000000000000000002` - impl: `0x0167000000000000000000000000000000000002` - owner: `0xf8ff2AF0DC1D5BA4811f22aCb02936A1529fd2Be` +- todo: + - change owner to DelegateOwner - logs: - - deployed on May 1, 2024 at commit `56dddf2b6` + - deployed on May 1, 2024 @commit `56dddf2b6` -### erc721_vault +#### erc721_vault - proxy: `0x1670000000000000000000000000000000000003` - impl: `0x0167000000000000000000000000000000000003` - owner: `0xf8ff2AF0DC1D5BA4811f22aCb02936A1529fd2Be` +- todo: + - change owner to DelegateOwner - logs: - - deployed on May 1, 2024 at commit `56dddf2b6` + - deployed on May 1, 2024 @commit `56dddf2b6` -### erc1155_vault +#### erc1155_vault - proxy: `0x1670000000000000000000000000000000000004` - impl: `0x0167000000000000000000000000000000000004` - owner: `0xf8ff2AF0DC1D5BA4811f22aCb02936A1529fd2Be` +- todo: + - change owner to DelegateOwner - logs: - - deployed on May 1, 2024 at commit `56dddf2b6` + - deployed on May 1, 2024 @commit `56dddf2b6` -### signal_service +#### signal_service - proxy: `0x1670000000000000000000000000000000000005` - impl: `0x0167000000000000000000000000000000000005` - owner: `0xf8ff2AF0DC1D5BA4811f22aCb02936A1529fd2Be` +- todo: + - change owner to DelegateOwner - logs: - - deployed on May 1, 2024 at commit `56dddf2b6` + - deployed on May 1, 2024 @commit `56dddf2b6` -### shared_address_manager +### Rollup Specific -- proxy: `0x1670000000000000000000000000000000000006` -- impl: `0x0167000000000000000000000000000000000006` +#### rollup_address_manager + +- proxy: `0x1670000000000000000000000000000000010002` +- impl: `0x0167000000000000000000000000000000010002` - owner: `0xf8ff2AF0DC1D5BA4811f22aCb02936A1529fd2Be` +- todo: + - change owner to DelegateOwner - logs: - - deployed on May 1, 2024 at commit `56dddf2b6` + - deployed on May 1, 2024 @commit `56dddf2b6` + - `Init2()` called @tx `0x7311fee56f87294e336393b55939489bc1e810c402f304013475d04c90ca32a9` -### taikoL2 +#### taikoL2 - proxy: `0x1670000000000000000000000000000000010001` - impl: `0x0167000000000000000000000000000000010001` - owner: `0xf8ff2AF0DC1D5BA4811f22aCb02936A1529fd2Be` +- todo: + - change owner to DelegateOwner - logs: - - deployed on May 1, 2024 at commit `56dddf2b6` - -### rollup_address_manager - -- proxy: `0x1670000000000000000000000000000000010002` -- impl: `0x0167000000000000000000000000000000010002` -- owner: `0xf8ff2AF0DC1D5BA4811f22aCb02936A1529fd2Be` -- logs: - - deployed on May 1, 2024 at commit `56dddf2b6` + - deployed on May 1, 2024 @commit `56dddf2b6` ## Other EOAs/Contracts diff --git a/packages/taiko-client/driver/chain_syncer/blob/syncer.go b/packages/taiko-client/driver/chain_syncer/blob/syncer.go index fdaed3bd418..b9590e2e7f0 100644 --- a/packages/taiko-client/driver/chain_syncer/blob/syncer.go +++ b/packages/taiko-client/driver/chain_syncer/blob/syncer.go @@ -255,12 +255,7 @@ func (s *Syncer) onBlockProposed( } txListBytes, err := txListFetcher.Fetch(ctx, tx, &event.Meta) if err != nil { - if errors.Is(err, rpc.ErrBlobInvalid) { - log.Info("Invalid blob detected", "blockID", event.BlockId) - txListBytes = []byte{} - } else { - return fmt.Errorf("failed to fetch tx list: %w", err) - } + return fmt.Errorf("failed to fetch tx list: %w", err) } // Decompress the transactions list and try to insert a new head block to L2 EE. diff --git a/packages/taiko-client/pkg/rpc/blob_tx.go b/packages/taiko-client/pkg/rpc/blob_tx.go deleted file mode 100644 index 97c7f0119b0..00000000000 --- a/packages/taiko-client/pkg/rpc/blob_tx.go +++ /dev/null @@ -1,137 +0,0 @@ -package rpc - -import ( - "errors" - "math/big" - - "github.com/ethereum-optimism/optimism/op-service/eth" - "github.com/ethereum/go-ethereum/accounts/abi/bind" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/common/hexutil" - "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/crypto/kzg4844" - "github.com/ethereum/go-ethereum/params" - "github.com/holiman/uint256" -) - -var ( - ErrBlobInvalid = errors.New("invalid blob encoding") -) - -// TransactBlobTx creates, signs and then sends blob transactions. -func (c *EthClient) TransactBlobTx( - opts *bind.TransactOpts, - contract common.Address, - input []byte, - sidecar *types.BlobTxSidecar, -) (*types.Transaction, error) { - // Sign the transaction and schedule it for execution - if opts.Signer == nil { - return nil, errors.New("no signer to authorize the transaction with") - } - // Create blob tx - blobTx, err := c.CreateBlobTx(opts, contract, input, sidecar) - if err != nil { - return nil, err - } - signedTx, err := opts.Signer(opts.From, types.NewTx(blobTx)) - if err != nil { - return nil, err - } - if opts.NoSend { - return signedTx, nil - } - if err := c.SendTransaction(opts.Context, signedTx); err != nil { - return nil, err - } - return signedTx, nil -} - -// CreateBlobTx creates a blob transaction by given parameters. -func (c *EthClient) CreateBlobTx( - opts *bind.TransactOpts, - contract common.Address, - input []byte, - sidecar *types.BlobTxSidecar, -) (*types.BlobTx, error) { - // Fetch the nonce for the account - var ( - nonce *hexutil.Uint64 - gas *hexutil.Uint64 - ) - if opts.Nonce != nil { - curNonce := hexutil.Uint64(opts.Nonce.Uint64()) - nonce = &curNonce - } - - if input == nil { - input = []byte{} - } - - if opts.GasLimit != 0 { - gasVal := hexutil.Uint64(opts.GasLimit) - gas = &gasVal - } - - rawTx, err := c.FillTransaction(opts.Context, &TransactionArgs{ - From: &opts.From, - To: &contract, - Gas: gas, - GasPrice: (*hexutil.Big)(opts.GasPrice), - MaxFeePerGas: (*hexutil.Big)(opts.GasFeeCap), - MaxPriorityFeePerGas: (*hexutil.Big)(opts.GasTipCap), - Value: (*hexutil.Big)(opts.Value), - Nonce: nonce, - Data: (*hexutil.Bytes)(&input), - AccessList: nil, - ChainID: nil, - BlobFeeCap: nil, - BlobHashes: sidecar.BlobHashes(), - }) - if err != nil { - return nil, err - } - - blobFeeCap := rawTx.BlobGasFeeCap() - if blobFeeCap == nil || blobFeeCap.Uint64() < params.BlobTxMinBlobGasprice { - blobFeeCap = new(big.Int).SetUint64(uint64(params.BlobTxMinBlobGasprice)) - } - - return &types.BlobTx{ - ChainID: uint256.MustFromBig(rawTx.ChainId()), - Nonce: rawTx.Nonce(), - GasTipCap: uint256.MustFromBig(rawTx.GasTipCap()), - GasFeeCap: uint256.MustFromBig(rawTx.GasFeeCap()), - Gas: rawTx.Gas(), - To: *rawTx.To(), - Value: uint256.MustFromBig(rawTx.Value()), - Data: rawTx.Data(), - AccessList: rawTx.AccessList(), - BlobFeeCap: uint256.MustFromBig(blobFeeCap), - BlobHashes: sidecar.BlobHashes(), - Sidecar: sidecar, - }, nil -} - -// MakeSidecar makes a sidecar which only includes one blob with the given data. -func MakeSidecar(data []byte) (*types.BlobTxSidecar, error) { - var blob eth.Blob - if err := blob.FromData(data); err != nil { - return nil, err - } - - sideCar := &types.BlobTxSidecar{Blobs: []kzg4844.Blob{*blob.KZGBlob()}} - for _, blob := range sideCar.Blobs { - commitment, err := kzg4844.BlobToCommitment(blob) - if err != nil { - return nil, err - } - proof, err := kzg4844.ComputeBlobProof(blob, commitment) - if err != nil { - return nil, err - } - sideCar.Commitments = append(sideCar.Commitments, commitment) - sideCar.Proofs = append(sideCar.Proofs, proof) - } - return sideCar, nil -} diff --git a/packages/taiko-client/pkg/rpc/blob_tx_test.go b/packages/taiko-client/pkg/rpc/blob_tx_test.go deleted file mode 100644 index 9cbebe95d0f..00000000000 --- a/packages/taiko-client/pkg/rpc/blob_tx_test.go +++ /dev/null @@ -1,74 +0,0 @@ -package rpc - -import ( - "context" - "os" - "testing" - "time" - - "github.com/ethereum-optimism/optimism/op-service/eth" - "github.com/ethereum/go-ethereum/accounts/abi/bind" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/common/hexutil" - "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/crypto" - "github.com/stretchr/testify/assert" - - "github.com/taikoxyz/taiko-mono/packages/taiko-client/internal/utils" -) - -func TestSendingBlobTx(t *testing.T) { - t.SkipNow() - // Load environment variables. - utils.LoadEnv() - - ctx, cancel := context.WithCancel(context.Background()) - defer cancel() - - url := os.Getenv("L1_NODE_WS_ENDPOINT") - l1Client, err := NewEthClient(ctx, url, time.Second*20) - assert.NoError(t, err) - - priv := os.Getenv("L1_PROPOSER_PRIVATE_KEY") - sk, err := crypto.ToECDSA(common.FromHex(priv)) - assert.NoError(t, err) - - opts, err := bind.NewKeyedTransactorWithChainID(sk, l1Client.ChainID) - assert.NoError(t, err) - opts.Context = ctx - //opts.NoSend = true - - balance, err := l1Client.BalanceAt(ctx, opts.From, nil) - assert.NoError(t, err) - t.Logf("address: %s, balance: %s", opts.From.String(), balance.String()) - - data, dErr := os.ReadFile("./tx_blob.go") - assert.NoError(t, dErr) - //data := []byte{'s'} - sideCar, sErr := MakeSidecar(data) - assert.NoError(t, sErr) - - tx, err := l1Client.TransactBlobTx(opts, common.Address{}, nil, sideCar) - assert.NoError(t, err) - - receipt, err := bind.WaitMined(ctx, l1Client, tx) - assert.NoError(t, err) - assert.Equal(t, true, receipt.Status == types.ReceiptStatusSuccessful) - - t.Log("blob hash: ", tx.BlobHashes()[0].String()) - t.Log("block number: ", receipt.BlockNumber.Uint64()) - t.Log("tx hash: ", receipt.TxHash.String()) -} - -func TestMakeSideCar(t *testing.T) { - origin, err := os.ReadFile("./blob_tx.go") - assert.NoError(t, err) - - sideCar, mErr := MakeSidecar(origin) - assert.NoError(t, mErr) - - blob := eth.Blob(sideCar.Blobs[0]) - origin1, dErr := blob.ToData() - assert.NoError(t, dErr) - assert.Equal(t, hexutil.Bytes(origin), origin1) -} diff --git a/packages/taiko-client/proposer/transaction_builder/blob.go b/packages/taiko-client/proposer/transaction_builder/blob.go index cd6a4230f61..278d6e810ea 100644 --- a/packages/taiko-client/proposer/transaction_builder/blob.go +++ b/packages/taiko-client/proposer/transaction_builder/blob.go @@ -63,14 +63,14 @@ func (b *BlobTransactionBuilder) Build( includeParentMetaHash bool, txListBytes []byte, ) (*txmgr.TxCandidate, error) { - // Make a sidecar then calculate the blob hash. - sideCar, err := rpc.MakeSidecar(txListBytes) - if err != nil { + var blob = ð.Blob{} + if err := blob.FromData(txListBytes); err != nil { return nil, err } - var blob = ð.Blob{} - if err := blob.FromData(txListBytes); err != nil { + // Make a sidecar then calculate the blob hash. + sideCar, _, err := txmgr.MakeSidecar([]*eth.Blob{blob}) + if err != nil { return nil, err } diff --git a/packages/taiko-client/prover/prover_test.go b/packages/taiko-client/prover/prover_test.go index 3e175f0dcd2..d539c12b517 100644 --- a/packages/taiko-client/prover/prover_test.go +++ b/packages/taiko-client/prover/prover_test.go @@ -232,7 +232,6 @@ func (s *ProverTestSuite) TestOnBlockVerified() { } func (s *ProverTestSuite) TestContestWrongBlocks() { - s.T().Skip() s.p.cfg.ContesterMode = false s.Nil(s.p.initEventHandlers()) e := s.ProposeAndInsertValidBlock(s.proposer, s.d.ChainSyncer().BlobSyncer()) diff --git a/release-please-config.json b/release-please-config.json index 109eacb690a..143972fcbc6 100644 --- a/release-please-config.json +++ b/release-please-config.json @@ -11,6 +11,7 @@ "packages/protocol": {}, "packages/relayer": {}, "packages/taikoon": {}, + "packages/taikoon-ui": {}, "packages/taiko-client": {}, "packages/supplementary-contracts": {} },