From 95c9da29fdd432de156f331802b79703a2311898 Mon Sep 17 00:00:00 2001 From: maskpp Date: Mon, 16 Sep 2024 14:46:27 +0800 Subject: [PATCH 01/37] test(taiko-client): disable docker pull in hive test (#18101) --- packages/taiko-client/integration_test/hive_test.go | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/taiko-client/integration_test/hive_test.go b/packages/taiko-client/integration_test/hive_test.go index 66731fe199..6aea46425d 100644 --- a/packages/taiko-client/integration_test/hive_test.go +++ b/packages/taiko-client/integration_test/hive_test.go @@ -69,6 +69,7 @@ func testDenebReorg(t *testing.T, simPattern string, clientGroups [][]string) { handler, err := hivesim.NewHiveFramework(&hivesim.HiveConfig{ BuildOutput: false, ContainerOutput: true, + DockerPull: false, BaseDir: os.Getenv("HIVE_DIR"), SimPattern: "taiko", SimTestPattern: simPattern, From 5d5ca74970f88493ea75b14a13fe852f840f019a Mon Sep 17 00:00:00 2001 From: Ivan Lagunovsky Date: Mon, 16 Sep 2024 08:50:18 +0200 Subject: [PATCH 02/37] feat(taiko-client): update prover balance check to include bond balance (#18092) --- packages/taiko-client/pkg/rpc/utils.go | 30 ++++++++++++++++++++------ 1 file changed, 23 insertions(+), 7 deletions(-) diff --git a/packages/taiko-client/pkg/rpc/utils.go b/packages/taiko-client/pkg/rpc/utils.go index a4cb8eb0c0..b082511ec0 100644 --- a/packages/taiko-client/pkg/rpc/utils.go +++ b/packages/taiko-client/pkg/rpc/utils.go @@ -73,30 +73,46 @@ func CheckProverBalance( "bond", utils.WeiToEther(bond), ) - // Check prover's taiko token balance - balance, err := rpc.TaikoToken.BalanceOf(&bind.CallOpts{Context: ctxWithTimeout}, prover) + // Check prover's taiko token bondBalance + bondBalance, err := rpc.TaikoL1.BondBalanceOf(&bind.CallOpts{Context: ctxWithTimeout}, prover) if err != nil { return false, err } + // Check prover's taiko token tokenBalance + tokenBalance, err := rpc.TaikoToken.BalanceOf(&bind.CallOpts{Context: ctxWithTimeout}, prover) + if err != nil { + return false, err + } + + totalBalance := new(big.Int).Add(bondBalance, tokenBalance) log.Info( "Prover's wallet taiko token balance", - "balance", utils.WeiToEther(balance), + "bondBalance", utils.WeiToEther(bondBalance), + "tokenBalance", utils.WeiToEther(tokenBalance), + "totalBalance", utils.WeiToEther(totalBalance), "address", prover.Hex(), "bond", utils.WeiToEther(bond), ) - if bond.Cmp(allowance) > 0 || bond.Cmp(balance) > 0 { + if bond.Cmp(allowance) > 0 { log.Info( - "Assigned prover does not have required on-chain token balance or allowance", - "providedProver", prover.Hex(), - "taikoTokenBalance", utils.WeiToEther(balance), + "Assigned prover does not have required on-chain token allowance", "allowance", utils.WeiToEther(allowance), "bond", utils.WeiToEther(bond), ) return false, nil } + if bond.Cmp(totalBalance) > 0 { + log.Info( + "Assigned prover does not have required on-chain token balance", + "totalBalance", utils.WeiToEther(totalBalance), + "bond", utils.WeiToEther(bond), + ) + return false, nil + } + return true, nil } From 92c53f8655dbdab4c7db1b023823a4e760240894 Mon Sep 17 00:00:00 2001 From: Roger <50648015+RogerLamTd@users.noreply.github.com> Date: Sun, 15 Sep 2024 23:52:55 -0700 Subject: [PATCH 03/37] fix(docs-site): remove duplicate wording (#18105) --- .../docs/guides/node-operators/deploy-a-proverset.mdx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/docs-site/src/content/docs/guides/node-operators/deploy-a-proverset.mdx b/packages/docs-site/src/content/docs/guides/node-operators/deploy-a-proverset.mdx index faaa76a344..7a4a52aab1 100644 --- a/packages/docs-site/src/content/docs/guides/node-operators/deploy-a-proverset.mdx +++ b/packages/docs-site/src/content/docs/guides/node-operators/deploy-a-proverset.mdx @@ -97,7 +97,7 @@ This guide outlines how to achieve this with separate EOAs running prover and pr 6. **Deposit your tokens and run your proposer + prover as usual!** - If you've followed the instructions, send your TAIKO/TTKOh to the ProverSet proxy and begin running your prover and proposer as usual. Send the tokens to your ProverSet contract, and start proving. If you've set up your allowance properly, there should be no need to use the `depositBond` function, as it deposits TTKOh from the ProverSet to TaikoL1. + If you've followed the instructions, send your TAIKO/TTKOh to the ProverSet proxy and begin running your prover and proposer as usual. If you've set up your allowance properly, there should be no need to use the `depositBond` function, as it deposits TTKOh from the ProverSet to TaikoL1.