Skip to content

Commit

Permalink
Resolve merge conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaodino committed Feb 26, 2024
2 parents abef1be + f064224 commit a85b96b
Show file tree
Hide file tree
Showing 83 changed files with 758 additions and 3,315 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/bridge-ui-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:

jobs:
Deploy-Preview:
runs-on: ubuntu-latest
runs-on: [taiko-runner]
steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/bridge-ui-production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:

jobs:
Deploy-Production:
runs-on: ubuntu-latest
runs-on: [taiko-runner]
steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/bridge-ui.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:

jobs:
build:
runs-on: ubuntu-latest
runs-on: [taiko-runner]
steps:
- name: Cancel previous runs
uses: styfle/[email protected]
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/eventindexer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:
jobs:
lint:
name: lint
runs-on: ubuntu-latest
runs-on: [taiko-runner]
steps:
- uses: actions/setup-go@v5
with:
Expand All @@ -29,7 +29,7 @@ jobs:
args: --config=.golangci.yml --timeout=4m

test:
runs-on: ubuntu-latest
runs-on: [taiko-runner]
needs: lint
steps:
- name: Cancel Previous Runs
Expand All @@ -56,7 +56,7 @@ jobs:
# only push docker image on PR merge to main
if: ${{ github.event }} == 'push'
name: Build and push docker image
runs-on: ubuntu-latest
runs-on: [taiko-runner]

steps:
- name: Checkout
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/fork-diff-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:

jobs:
Deploy-Preview:
runs-on: ubuntu-latest
runs-on: [taiko-runner]
steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/fork-diff-production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:

jobs:
Deploy-Production:
runs-on: ubuntu-latest
runs-on: [taiko-runner]
steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:

jobs:
Deploy-Preview:
runs-on: ubuntu-latest
runs-on: [taiko-runner]
steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:

jobs:
Deploy-Production:
runs-on: ubuntu-latest
runs-on: [taiko-runner]
steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/guardianproverhealthcheck.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:
jobs:
lint:
name: lint
runs-on: ubuntu-latest
runs-on: [taiko-runner]
steps:
- uses: actions/setup-go@v5
with:
Expand All @@ -29,7 +29,7 @@ jobs:
args: --config=.golangci.yml --timeout=4m

test:
runs-on: ubuntu-latest
runs-on: [taiko-runner]
needs: lint
steps:
- name: Cancel Previous Runs
Expand All @@ -56,7 +56,7 @@ jobs:
# only push docker image on PR merge to main
if: ${{ github.event }} == 'push'
name: Build and push docker image
runs-on: ubuntu-latest
runs-on: [taiko-runner]

steps:
- name: Checkout
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/protocol.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:

jobs:
build:
runs-on: ubuntu-latest
runs-on: [taiko-runner]
steps:
- name: Cancel previous runs
uses: styfle/[email protected]
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/relayer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:
jobs:
lint:
name: lint
runs-on: ubuntu-latest
runs-on: [taiko-runner]
steps:
- uses: actions/setup-go@v5
with:
Expand All @@ -29,7 +29,7 @@ jobs:
args: --config=.golangci.yml --timeout=4m

test:
runs-on: ubuntu-latest
runs-on: [taiko-runner]
needs: lint
steps:
- name: Cancel Previous Runs
Expand All @@ -56,7 +56,7 @@ jobs:
# only push docker image on PR merge to main
if: ${{ github.event }} == 'push'
name: Build and push docker image
runs-on: ubuntu-latest
runs-on: [taiko-runner]

steps:
- name: Checkout
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ permissions:

jobs:
release-please:
runs-on: ubuntu-latest
runs-on: [taiko-runner]
steps:
- uses: google-github-actions/release-please-action@v4
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/validate-pr-title.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ on:
jobs:
validate-pr-title:
if: github.event_name == 'pull_request_target'
runs-on: ubuntu-latest
runs-on: [taiko-runner]
steps:
- uses: amannn/action-semantic-pull-request@v5
env:
Expand Down
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"packages/branding": "0.3.0",
"packages/bridge-ui": "2.9.1",
"packages/bridge-ui": "2.9.2",
"packages/eventindexer": "0.13.0",
"packages/fork-diff": "0.4.0",
"packages/guardian-prover-health-check": "0.1.0",
Expand Down
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,6 @@
"packages/bridge-ui/src/i18n",
"packages/guardian-prover-health-check-ui/src/i18n"
],
"i18n-ally.keystyle": "nested"
"i18n-ally.keystyle": "nested",
"solidity.compileUsingRemoteVersion": "v0.8.24+commit.e11b9ed9"
}
8 changes: 8 additions & 0 deletions packages/bridge-ui/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## [2.9.2](https://github.com/taikoxyz/taiko-mono/compare/bridge-ui-v2.9.1...bridge-ui-v2.9.2) (2024-02-23)


### Bug Fixes

* **bridge-ui:** add injected provider to connectors ([#16008](https://github.com/taikoxyz/taiko-mono/issues/16008)) ([0496ff4](https://github.com/taikoxyz/taiko-mono/commit/0496ff40e374354b83d17121e4760391fed90a31))
* **bridge-ui:** renamed configuredCustomToken to configuredCustomTokens ([#15905](https://github.com/taikoxyz/taiko-mono/issues/15905)) ([a9f60b8](https://github.com/taikoxyz/taiko-mono/commit/a9f60b8c114dfd277e8dc227e7fbbe8716698d53))

## [2.9.1](https://github.com/taikoxyz/taiko-mono/compare/bridge-ui-v2.9.0...bridge-ui-v2.9.1) (2024-02-22)


Expand Down
4 changes: 2 additions & 2 deletions packages/bridge-ui/config/sample/configuredBridges.example
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"signalServiceAddress": "",
"hops": [
{
"chaind: ,
"chaind": ,
"crossChainSyncAddress": "",
"signalServiceAddress": "",
}
Expand All @@ -55,7 +55,7 @@
"signalServiceAddress": "",
"hops": [
{
"chaind: ,
"chaind": ,
"crossChainSyncAddress": "",
"signalServiceAddress": "",
}
Expand Down
2 changes: 1 addition & 1 deletion packages/bridge-ui/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bridge-ui",
"version": "2.9.1",
"version": "2.9.2",
"private": true,
"scripts": {
"dev": "vite dev",
Expand Down
2 changes: 2 additions & 0 deletions packages/bridge-ui/src/libs/connect/web3modal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ const chainImages = getChainImages();
export const web3modal = createWeb3Modal({
wagmiConfig: config,
projectId,
featuredWalletIds: [],
excludeWalletIds: ['c57ca95b47569778a828d19178114f4db188b89b763c899ba0be274e97267d96'],
// chains,
chainImages,
themeVariables: {
Expand Down
4 changes: 2 additions & 2 deletions packages/bridge-ui/src/libs/wagmi/client.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { walletConnect } from '@wagmi/connectors';
import { injected, walletConnect } from '@wagmi/connectors';
import { createConfig, getPublicClient, http, reconnect } from '@wagmi/core';

import { PUBLIC_WALLETCONNECT_PROJECT_ID } from '$env/static/public';
Expand All @@ -15,7 +15,7 @@ const transports = chains.reduce((acc, { id }) => ({ ...acc, [id]: http() }), {}
export const config = createConfig({
//@ts-ignore
chains: [...chains],
connectors: [walletConnect({ projectId })],
connectors: [walletConnect({ projectId, showQrModal: false }), injected()],
transports,
});

Expand Down
2 changes: 1 addition & 1 deletion packages/protocol/contracts/L1/TaikoData.sol
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,6 @@ library TaikoData {
mapping(bytes32 blobHash => uint256 since) reusableBlobs;
SlotA slotA; // slot 6
SlotB slotB; // slot 7
uint256[143] __gap;
uint256[43] __gap;
}
}
12 changes: 5 additions & 7 deletions packages/protocol/contracts/L1/TaikoL1.sol
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import "./TaikoEvents.sol";
/// This contract doesn't hold any Ether. Ether deposited to L2 are held by the Bridge contract.
contract TaikoL1 is EssentialContract, ITaikoL1, ITierProvider, TaikoEvents, TaikoErrors {
TaikoData.State public state;
uint256[100] private __gap;
uint256[50] private __gap;

modifier whenProvingNotPaused() {
if (state.slotB.provingPaused) revert L1_PROVING_PAUSED();
Expand Down Expand Up @@ -195,22 +195,21 @@ contract TaikoL1 is EssentialContract, ITaikoL1, ITierProvider, TaikoEvents, Tai
return ITierProvider(resolve("tier_provider", false)).getTier(tierId);
}

/// @notice Retrieves the IDs of all supported tiers.
function getTierIds() public view virtual override returns (uint16[] memory ids) {
/// @inheritdoc ITierProvider
function getTierIds() public view override returns (uint16[] memory ids) {
ids = ITierProvider(resolve("tier_provider", false)).getTierIds();
if (ids.length >= type(uint8).max) revert L1_TOO_MANY_TIERS();
}

/// @notice Determines the minimal tier for a block based on a random input.
function getMinTier(uint256 rand) public view virtual override returns (uint16) {
/// @inheritdoc ITierProvider
function getMinTier(uint256 rand) public view override returns (uint16) {
return ITierProvider(resolve("tier_provider", false)).getMinTier(rand);
}

/// @inheritdoc ITaikoL1
function getConfig() public view virtual override returns (TaikoData.Config memory) {
// All hard-coded configurations:
// - treasury: the actual TaikoL2 address.
// - blockMaxTxs: 80 (limited by the PSE zkEVM circuits)
// - anchorGasLimit: 250_000 (based on internal devnet, its ~220_000
// after 256 L2 blocks)
return TaikoData.Config({
Expand All @@ -221,7 +220,6 @@ contract TaikoL1 is EssentialContract, ITaikoL1, ITierProvider, TaikoEvents, Tai
blockRingBufferSize: 864_100,
// Can be overridden by the tier config.
maxBlocksToVerifyPerProposal: 10,
// Limited by the PSE zkEVM circuits.
blockMaxGasLimit: 15_000_000,
// Each go-ethereum transaction has a size limit of 128KB,
// and right now txList is still saved in calldata, so we set it
Expand Down
2 changes: 2 additions & 0 deletions packages/protocol/contracts/L1/TaikoToken.sol
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ import "../common/EssentialContract.sol";
/// in the form of bonds. It is an ERC20 token with 18 decimal places of
/// precision.
contract TaikoToken is EssentialContract, ERC20SnapshotUpgradeable, ERC20VotesUpgradeable {
uint256[50] private __gap;

error TKO_INVALID_ADDR();

/// @notice Initializes the TaikoToken contract and mints initial tokens.
Expand Down
2 changes: 2 additions & 0 deletions packages/protocol/contracts/L1/hooks/AssignmentHook.sol
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ contract AssignmentHook is EssentialContract, IHook {
// get paid within this limit.
uint256 public constant MAX_GAS_PAYING_PROVER = 50_000;

uint256[50] private __gap;

event BlockAssigned(
address indexed assignedProver, TaikoData.BlockMetadata meta, ProverAssignment assignment
);
Expand Down
2 changes: 1 addition & 1 deletion packages/protocol/contracts/L1/libs/LibProving.sol
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ library LibProving {
if (tier.contestBond == 0) return;

bool inProvingWindow = uint256(ts.timestamp).max(state.slotB.lastUnpausedAt)
+ tier.provingWindow >= block.timestamp;
+ tier.provingWindow * 60 >= block.timestamp;
bool isAssignedPover = msg.sender == blk.assignedProver;

// The assigned prover can only submit the very first transition.
Expand Down
2 changes: 1 addition & 1 deletion packages/protocol/contracts/L1/libs/LibVerifying.sol
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ library LibVerifying {
tierProvider = resolver.resolve("tier_provider", false);
}
if (
uint256(ITierProvider(tierProvider).getTier(ts.tier).cooldownWindow)
uint256(ITierProvider(tierProvider).getTier(ts.tier).cooldownWindow) * 60
+ uint256(ts.timestamp).max(state.slotB.lastUnpausedAt) > block.timestamp
) {
// If cooldownWindow is 0, the block can theoretically
Expand Down
2 changes: 2 additions & 0 deletions packages/protocol/contracts/L1/provers/GuardianProver.sol
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ import "./Guardians.sol";

/// @title GuardianProver
contract GuardianProver is Guardians {
uint256[50] private __gap;

event GuardianApproval(
address indexed addr, uint256 indexed blockId, bytes32 blockHash, bool approved
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,10 @@ pragma solidity 0.8.24;
import "../../common/EssentialContract.sol";
import "./ITierProvider.sol";

contract OptimisticTierProvider is EssentialContract, ITierProvider {
error TIER_NOT_FOUND();
/// @title DevnetTierProvider
/// @dev Labeled in AddressResolver as "tier_provider"
contract DevnetTierProvider is EssentialContract, ITierProvider {
uint256[50] private __gap;

/// @notice Initializes the contract with the provided address manager.
function init() external initializer {
Expand All @@ -31,9 +33,9 @@ contract OptimisticTierProvider is EssentialContract, ITierProvider {
verifierName: "tier_optimistic",
validityBond: 250 ether, // TKO
contestBond: 500 ether, // TKO
cooldownWindow: 24 hours,
provingWindow: 2 hours,
maxBlocksToVerifyPerProof: 10
cooldownWindow: 1440, //24 hours
provingWindow: 120, // 2 hours
maxBlocksToVerifyPerProof: 16
});
}

Expand All @@ -42,9 +44,9 @@ contract OptimisticTierProvider is EssentialContract, ITierProvider {
verifierName: "tier_guardian",
validityBond: 0, // must be 0 for top tier
contestBond: 0, // must be 0 for top tier
cooldownWindow: 24 hours,
provingWindow: 8 hours,
maxBlocksToVerifyPerProof: 4
cooldownWindow: 60, //1 hours
provingWindow: 2880, // 48 hours
maxBlocksToVerifyPerProof: 16
});
}

Expand All @@ -57,7 +59,7 @@ contract OptimisticTierProvider is EssentialContract, ITierProvider {
tiers[1] = LibTiers.TIER_GUARDIAN;
}

function getMinTier(uint256 /*rand*/ ) public pure override returns (uint16) {
function getMinTier(uint256) public pure override returns (uint16) {
return LibTiers.TIER_OPTIMISTIC;
}
}
Loading

0 comments on commit a85b96b

Please sign in to comment.