diff --git a/.github/workflows/bridge-ui--ci.yml b/.github/workflows/bridge-ui--ci.yml index d270c524ec..4c1bb10c37 100644 --- a/.github/workflows/bridge-ui--ci.yml +++ b/.github/workflows/bridge-ui--ci.yml @@ -4,13 +4,16 @@ on: workflow_call jobs: build: - runs-on: [taiko-runner] + runs-on: [arc-runner-set] steps: - name: Cancel previous runs uses: styfle/cancel-workflow-action@0.12.1 with: access_token: ${{ github.token }} + - name: Install Git + run: sudo apt-get update && sudo apt-get install -y git + - name: Checkout repository uses: actions/checkout@v4 diff --git a/.github/workflows/docs-site--preview.yml b/.github/workflows/docs-site--preview.yml index 910fa4dc96..817eb7a018 100644 --- a/.github/workflows/docs-site--preview.yml +++ b/.github/workflows/docs-site--preview.yml @@ -14,8 +14,11 @@ on: jobs: deploy-docs-site-preview: - runs-on: [taiko-runner] + runs-on: [arc-runner-set] steps: + - name: Install Git + run: sudo apt-get update && sudo apt-get install -y git + - name: Checkout repository uses: actions/checkout@v4 diff --git a/.github/workflows/docs-site--production.yml b/.github/workflows/docs-site--production.yml index c450567596..78e03a182a 100644 --- a/.github/workflows/docs-site--production.yml +++ b/.github/workflows/docs-site--production.yml @@ -11,8 +11,11 @@ on: jobs: deploy-docs-site-production: - runs-on: [taiko-runner] + runs-on: [arc-runner-set] steps: + - name: Install Git + run: sudo apt-get update && sudo apt-get install -y git + - name: Checkout repository uses: actions/checkout@v4 diff --git a/.github/workflows/eventindexer.yml b/.github/workflows/eventindexer.yml index b6b42eaefe..1ff534248c 100644 --- a/.github/workflows/eventindexer.yml +++ b/.github/workflows/eventindexer.yml @@ -18,7 +18,7 @@ jobs: lint-eventindexer: name: lint-eventindexer if: github.event_name == 'pull_request' - runs-on: [taiko-runner] + runs-on: [arc-runner-set] steps: - uses: actions/setup-go@v5 with: @@ -35,7 +35,7 @@ jobs: args: --config=.golangci.yml --timeout=4m test-eventindexer: - runs-on: [taiko-runner] + runs-on: [arc-runner-set] if: ${{ github.event_name == 'pull_request' && github.event.pull_request.draft == false }} needs: lint-eventindexer steps: @@ -66,9 +66,12 @@ jobs: # Skip dependabot PRs if: ${{ github.event_name == 'pull_request' && ! startsWith(github.ref, 'refs/heads/dependabot/') }} name: Build and push docker image - runs-on: [taiko-runner] + runs-on: [arc-runner-set] steps: + - name: Install Git + run: sudo apt-get update && sudo apt-get install -y git + - name: Checkout uses: actions/checkout@v4 with: diff --git a/.github/workflows/fork-diff--preview.yml b/.github/workflows/fork-diff--preview.yml index 64f4d69bca..0c62bcd22a 100644 --- a/.github/workflows/fork-diff--preview.yml +++ b/.github/workflows/fork-diff--preview.yml @@ -15,8 +15,11 @@ on: jobs: deploy-fork-diff-preview: - runs-on: [taiko-runner] + runs-on: [arc-runner-set] steps: + - name: Install Git + run: sudo apt-get update && sudo apt-get install -y git + - name: Checkout repository uses: actions/checkout@v4 diff --git a/.github/workflows/fork-diff--production.yml b/.github/workflows/fork-diff--production.yml index fa9c9db3f1..c8c7b7cbce 100644 --- a/.github/workflows/fork-diff--production.yml +++ b/.github/workflows/fork-diff--production.yml @@ -12,8 +12,11 @@ on: jobs: deploy-fork-diff-production: - runs-on: [taiko-runner] + runs-on: [arc-runner-set] steps: + - name: Install Git + run: sudo apt-get update && sudo apt-get install -y git + - name: Checkout repository uses: actions/checkout@v4 diff --git a/.github/workflows/nfts.yml b/.github/workflows/nfts.yml index 93a41de561..c7098c1da0 100644 --- a/.github/workflows/nfts.yml +++ b/.github/workflows/nfts.yml @@ -9,13 +9,16 @@ on: jobs: build-nfts-contracts: if: github.event.pull_request.draft == false - runs-on: [taiko-runner] + runs-on: [arc-runner-set] steps: - name: Cancel previous runs uses: styfle/cancel-workflow-action@0.12.1 with: access_token: ${{ github.token }} + - name: Install Git + run: sudo apt-get update && sudo apt-get install -y git + - name: Checkout repository uses: actions/checkout@v4 with: diff --git a/.github/workflows/protocol.yml b/.github/workflows/protocol.yml index 5952fb968e..cbd1bbbd58 100644 --- a/.github/workflows/protocol.yml +++ b/.github/workflows/protocol.yml @@ -9,7 +9,7 @@ on: jobs: build-protocol: if: github.event.pull_request.draft == false - runs-on: [taiko-runner] + runs-on: [arc-runner-set] permissions: # Give the necessary permissions for stefanzweifel/git-auto-commit-action. contents: write @@ -19,6 +19,9 @@ jobs: with: access_token: ${{ github.token }} + - name: Install Git + run: sudo apt-get update && sudo apt-get install -y git + - name: Checkout repository uses: actions/checkout@v4 with: diff --git a/.github/workflows/relayer.yml b/.github/workflows/relayer.yml index e42cd859b4..976b854ad4 100644 --- a/.github/workflows/relayer.yml +++ b/.github/workflows/relayer.yml @@ -18,7 +18,7 @@ jobs: lint-relayer: name: lint-relayer if: ${{ github.event_name == 'pull_request' && github.event.pull_request.draft == false }} - runs-on: [taiko-runner] + runs-on: [arc-runner-set] steps: - uses: actions/setup-go@v5 with: @@ -36,7 +36,7 @@ jobs: test-relayer: if: ${{ github.event_name == 'pull_request' && github.event.pull_request.draft == false }} - runs-on: [taiko-runner] + runs-on: [arc-runner-set] needs: lint-relayer steps: - name: Cancel Previous Runs @@ -66,9 +66,12 @@ jobs: # Skip dependabot PRs if: ${{ github.event_name == 'pull_request' && ! startsWith(github.ref, 'refs/heads/dependabot/') }} name: Build and push docker image - runs-on: [taiko-runner] + runs-on: [arc-runner-set] steps: + - name: Install Git + run: sudo apt-get update && sudo apt-get install -y git + - name: Checkout uses: actions/checkout@v4 with: diff --git a/.github/workflows/repo--vercel-deploy.yml b/.github/workflows/repo--vercel-deploy.yml index 345fffeebc..4d06f1852e 100644 --- a/.github/workflows/repo--vercel-deploy.yml +++ b/.github/workflows/repo--vercel-deploy.yml @@ -33,6 +33,9 @@ jobs: run: | echo "Vercel Project ID: ${{ env.VERCEL_PROJECT_ID }}" + - name: Install Git + run: sudo apt-get update && sudo apt-get install -y git + - name: Checkout repository uses: actions/checkout@v4 diff --git a/.github/workflows/snaefell-ui--ci.yml b/.github/workflows/snaefell-ui--ci.yml index 59eb8b0481..0ac4039827 100644 --- a/.github/workflows/snaefell-ui--ci.yml +++ b/.github/workflows/snaefell-ui--ci.yml @@ -4,13 +4,16 @@ on: workflow_call jobs: build: - runs-on: [taiko-runner] + runs-on: [arc-runner-set] steps: - name: Cancel previous runs uses: styfle/cancel-workflow-action@0.12.1 with: access_token: ${{ github.token }} + - name: Install Git + run: sudo apt-get update && sudo apt-get install -y git + - name: Checkout repository uses: actions/checkout@v4 with: diff --git a/.github/workflows/supplementary-contracts.yml b/.github/workflows/supplementary-contracts.yml index 76025fb93e..cf58474057 100644 --- a/.github/workflows/supplementary-contracts.yml +++ b/.github/workflows/supplementary-contracts.yml @@ -9,13 +9,16 @@ on: jobs: build-supplementary-contracts: if: github.event.pull_request.draft == false - runs-on: [taiko-runner] + runs-on: [arc-runner-set] steps: - name: Cancel previous runs uses: styfle/cancel-workflow-action@0.12.1 with: access_token: ${{ github.token }} + - name: Install Git + run: sudo apt-get update && sudo apt-get install -y git + - name: Checkout repository uses: actions/checkout@v4 with: diff --git a/.github/workflows/taiko-client--docker.yml b/.github/workflows/taiko-client--docker.yml index 3f1441fe61..8b5ed92188 100644 --- a/.github/workflows/taiko-client--docker.yml +++ b/.github/workflows/taiko-client--docker.yml @@ -11,9 +11,12 @@ on: jobs: push-docker-image: name: Build and push docker image - runs-on: [ubuntu-latest] + runs-on: [arc-runner-set] steps: + - name: Install Git + run: sudo apt-get update && sudo apt-get install -y git + - name: Checkout uses: actions/checkout@v4 diff --git a/.github/workflows/taiko-client--hive_test.yml b/.github/workflows/taiko-client--hive_test.yml index 549728bb9f..edea54a679 100644 --- a/.github/workflows/taiko-client--hive_test.yml +++ b/.github/workflows/taiko-client--hive_test.yml @@ -12,8 +12,8 @@ jobs: hive_tests: if: github.event.pull_request.draft == false && contains(github.event.pull_request.labels.*.name, 'option.hive-test') name: hive tests - runs-on: [ubuntu-latest] - timeout-minutes: 15 + runs-on: [arc-runner-set] + timeout-minutes: 20 steps: - name: Cancel Previous Runs @@ -21,6 +21,9 @@ jobs: with: access_token: ${{ github.token }} + - name: Install Git + run: sudo apt-get update && sudo apt-get install -y git + - uses: actions/checkout@v4 - name: Set up Go diff --git a/.github/workflows/taiko-client--test.yml b/.github/workflows/taiko-client--test.yml index 8d2a6336b2..0c88c6988f 100644 --- a/.github/workflows/taiko-client--test.yml +++ b/.github/workflows/taiko-client--test.yml @@ -12,8 +12,11 @@ jobs: lint: if: github.event.pull_request.draft == false name: Lint - runs-on: [ubuntu-latest] + runs-on: [arc-runner-set] steps: + - name: Install Git + run: sudo apt-get update && sudo apt-get install -y git make + - uses: actions/checkout@v4 - name: Set up Go diff --git a/.github/workflows/taikoon-ui--ci.yml b/.github/workflows/taikoon-ui--ci.yml index 8aecc97c8b..7088ceb84f 100644 --- a/.github/workflows/taikoon-ui--ci.yml +++ b/.github/workflows/taikoon-ui--ci.yml @@ -4,13 +4,16 @@ on: workflow_call jobs: build: - runs-on: [taiko-runner] + runs-on: [arc-runner-set] steps: - name: Cancel previous runs uses: styfle/cancel-workflow-action@0.12.1 with: access_token: ${{ github.token }} + - name: Install Git + run: sudo apt-get update && sudo apt-get install -y git + - name: Checkout repository uses: actions/checkout@v4 with: diff --git a/.github/workflows/ui-lib--ci.yml b/.github/workflows/ui-lib--ci.yml index 4616023976..9dc97e4b1c 100644 --- a/.github/workflows/ui-lib--ci.yml +++ b/.github/workflows/ui-lib--ci.yml @@ -4,13 +4,16 @@ on: workflow_call jobs: build: - runs-on: [taiko-runner] + runs-on: [arc-runner-set] steps: - name: Cancel previous runs uses: styfle/cancel-workflow-action@0.12.1 with: access_token: ${{ github.token }} + - name: Install Git + run: sudo apt-get update && sudo apt-get install -y git + - name: Checkout repository uses: actions/checkout@v4 with: diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 5c6e590f4d..a31271e28f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -26,7 +26,7 @@ This section describes our coding standards at Taiko. **It is important you use the correct commit type**. For minor semver bumps, use `feat`, for patches use `fix`. For a major bump use `feat(scope)!` or `fix(scope)!`. If you use `chore`, `docs`, or `ci`, then it won't result in a release-please PR or version bump. -Specify the scope of your change with a [conventional commit](https://www.conventionalcommits.org/en/v1.0.0/) in the PR title (for example, `feat(scope): description of feature`). This will be squashed and merged into the `main` branch. You can find the full list of allowed scopes [here](https://github.com/taikoxyz/taiko-mono/blob/main/.github/workflows/validate-pr-title.yml). +Specify the scope of your change with a [conventional commit](https://www.conventionalcommits.org/en/v1.0.0/) in the PR title (for example, `feat(scope): description of feature`). This will be squashed and merged into the `main` branch. You can find the full list of allowed scopes [here](https://github.com/taikoxyz/taiko-mono/blob/main/.github/workflows/repo--validate-pr-title.yml). Because we squash all of the changes into a single commit, please try to keep the PR limited to the scope specified in the commit message. This commit message will end up in the automated changelog by checking which packages are affected by the commit. diff --git a/packages/bridge-ui/src/libs/bridge/Bridge.ts b/packages/bridge-ui/src/libs/bridge/Bridge.ts index 1bcf689b9a..5e73e5d268 100644 --- a/packages/bridge-ui/src/libs/bridge/Bridge.ts +++ b/packages/bridge-ui/src/libs/bridge/Bridge.ts @@ -6,6 +6,7 @@ import { routingContractsMap } from '$bridgeConfig'; import { MessageStatusError, ProcessMessageError, ReleaseError, WrongChainError, WrongOwnerError } from '$libs/error'; import type { BridgeProver } from '$libs/proof'; import { getConnectedWallet } from '$libs/util/getConnectedWallet'; +import { isSmartContract } from '$libs/util/isSmartContract'; import { getLogger } from '$libs/util/logger'; import { config } from '$libs/wagmi'; @@ -262,6 +263,11 @@ export abstract class Bridge { console.error('Failed to estimate gas, using fallback', error); estimatedGas = 1_300_000n; } + + if (message.to && (await isSmartContract(message.to, Number(message.destChainId)))) { + log(`Recipient is a smart contract, increasing fees by 5 percent`); + estimatedGas = (estimatedGas * 105n) / 100n; + } if (force) { return await writeContract(config, { address: bridgeContract.address, @@ -293,10 +299,13 @@ export abstract class Bridge { if (!message) throw new ProcessMessageError('Message is not defined'); - const estimatedGas = await bridgeContract.estimateGas.retryMessage([message, isFinalAttempt], { + let estimatedGas = await bridgeContract.estimateGas.retryMessage([message, isFinalAttempt], { account: client.account, }); - + if (message.to && (await isSmartContract(message.to, Number(message.destChainId)))) { + log(`Recipient is a smart contract, increasing fees by 5 percent`); + estimatedGas = (estimatedGas * 105n) / 100n; + } log('Estimated gas for retryMessage', estimatedGas); const { request } = await simulateContract(config, { @@ -319,9 +328,15 @@ export abstract class Bridge { log('Estimating gas for recallMessage', bridgeContract.address, [message, proof]); - const estimatedGas = await bridgeContract.estimateGas.recallMessage([message, proof], { account: client.account }); + let estimatedGas = await bridgeContract.estimateGas.recallMessage([message, proof], { account: client.account }); log('Estimated gas for recallMessage', estimatedGas); + if (message.from && (await isSmartContract(message.from, Number(message.srcChainId)))) { + log(`Sender is a smart contract, increasing fees by 5 percent`); + estimatedGas = (estimatedGas * 105n) / 100n; + } + log('Estimated gas for retryMessage', estimatedGas); + const { request } = await simulateContract(config, { address: bridgeContract.address, abi: bridgeContract.abi, 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 7a4a52aab1..a0364bcec8 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 @@ -133,7 +133,7 @@ If you've already deployed a ProverSet but would like to upgrade it through the Execute the following command, filling in the values in the curly braces appropriately. ```bash - forge create --private-key {YOUR_PRIVATE_KEY} --chain-id 17000 --rpc-url {YOUR_RPC_URL} contracts/layer1/provers/ProverSet.sol:ProverSet + forge create --private-key {YOUR_PRIVATE_KEY} --chain-id {CHAIN_ID} --rpc-url {YOUR_RPC_URL} contracts/layer1/provers/ProverSet.sol:ProverSet ```