Skip to content

Commit

Permalink
Merge branch 'main' into fix_driver_p2p_sync
Browse files Browse the repository at this point in the history
  • Loading branch information
mask-pp authored May 21, 2024
2 parents da14dc3 + 293618e commit d95a447
Show file tree
Hide file tree
Showing 16 changed files with 52 additions and 34 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/blobstorage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ on:
branches: [main]
paths:
- "packages/blobstorage/**"
pull_request:
paths:
- "packages/blobstorage/**"

jobs:
test-blobstorage:
Expand Down
8 changes: 3 additions & 5 deletions .github/workflows/bridge-ui.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,11 @@ name: Bridge UI CI/CD

on:
push:
branches-ignore:
- main
- release-please-*
paths:
- "packages/bridge-ui/**"
tags:
- "bridge-ui-v*"
pull_request:
paths:
- "packages/bridge-ui/**"

jobs:
build-and-test:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/eventindexer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ name: Eventindexer
on:
push:
branches: [main]
paths:
- "packages/eventindexer/**"
pull_request:
paths:
- "packages/eventindexer/**"
- "go.mod"
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/guardian-prover-health-check-ui.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@ name: Guardians UI CI/CD

on:
push:
branches-ignore:
- release-please-*
tags:
- "bridge-ui-v*"
pull_request:
paths:
- "packages/guardian-prover-health-check-ui/**"

Expand Down Expand Up @@ -37,7 +38,7 @@ jobs:
vercel_token: ${{ secrets.VERCEL_TOKEN }}

deploy_guardians-ui_hekla_production:
if: ${{ github.ref_name == 'main' && contains(github.ref, 'refs/tags/guardians-ui-') }}
if: ${{ startsWith(github.ref, 'refs/tags/guardians-ui-v') }}
needs: build-and-test
uses: ./.github/workflows/repo--vercel-deploy.yml
with:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/guardian-prover-health-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ name: Guardians Health Check
on:
push:
branches: [main]
paths:
- "packages/guardian-prover-health-check/**"
pull_request:
paths:
- "packages/guardian-prover-health-check/**"
- "go.mod"
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/relayer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ name: Relayer
on:
push:
branches: [main]
paths:
- "packages/relayer/**"
pull_request:
paths:
- "packages/relayer/**"
- "go.mod"
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/repo--validate-pr-title.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,7 @@ jobs:
guardian-prover-health-check-ui
protocol
relayer
taikoon
snaefell-ui
nfts
ui-lib
taiko-client
supplementary-contracts
Expand Down
8 changes: 3 additions & 5 deletions .github/workflows/snaefell-ui.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@ name: Snaefell UI CI/CD

on:
push:
branches-ignore:
- release-please-*
paths:
- "packages/snaefell-ui/**"
tags:
- "snaefull-ui-v*"
pull_request:
paths:
- "packages/snaefell-ui/**"
Expand All @@ -28,7 +26,7 @@ jobs:
vercel_token: ${{ secrets.VERCEL_TOKEN }}

deploy_snaefell-ui_mainnet_production:
if: ${{ github.ref_name == 'main' && contains(github.ref, 'refs/tags/snaefell-ui-') }}
if: ${{ startsWith(github.ref, 'refs/tags/snaefull-ui-v') }}
needs: build-and-test
uses: ./.github/workflows/repo--vercel-deploy.yml
with:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/taiko-client--test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ name: "CI"
on:
push:
branches: [main]
paths:
- "packages/taiko-client/**"
pull_request:
paths:
- "packages/taiko-client/**"
- "go.mod"
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/taikoon-ui.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@ name: Taikoon UI CI/CD

on:
push:
branches-ignore:
- release-please-*
tags:
- "taikoon-ui-v*"
pull_request:
paths:
- "packages/taikoon-ui/**"

Expand All @@ -25,7 +26,7 @@ jobs:
vercel_token: ${{ secrets.VERCEL_TOKEN }}

deploy_taikoon-ui_mainnet_production:
if: ${{ github.ref_name == 'main' && contains(github.ref, 'refs/tags/taikoon-ui-') }}
if: ${{ startsWith(github.ref, 'refs/tags/taikoon-ui-v') }}
needs: build-and-test
uses: ./.github/workflows/repo--vercel-deploy.yml
with:
Expand Down
13 changes: 1 addition & 12 deletions packages/protocol/contracts/L1/libs/LibUtils.sol
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ library LibUtils {
view
returns (TaikoData.TransitionState storage)
{
_checkBlockId(_state, _blockId);
(TaikoData.Block storage blk, uint64 slot) = getBlock(_state, _config, _blockId);

uint32 tid = getTransitionId(_state, blk, slot, _parentHash);
Expand All @@ -59,7 +58,6 @@ library LibUtils {
view
returns (TaikoData.TransitionState storage)
{
_checkBlockId(_state, _blockId);
(TaikoData.Block storage blk, uint64 slot) = getBlock(_state, _config, _blockId);

if (_tid == 0 || _tid >= blk.nextTransitionId) revert L1_TRANSITION_NOT_FOUND();
Expand All @@ -81,9 +79,7 @@ library LibUtils {
{
slot_ = _blockId % _config.blockRingBufferSize;
blk_ = _state.blocks[slot_];
if (blk_.blockId != _blockId) {
revert L1_INVALID_BLOCK_ID();
}
if (blk_.blockId != _blockId) revert L1_INVALID_BLOCK_ID();
}

/// @dev Retrieves the ID of the transition with a given parentHash.
Expand Down Expand Up @@ -121,11 +117,4 @@ library LibUtils {
return block.timestamp >= deadline;
}
}

function _checkBlockId(TaikoData.State storage _state, uint64 _blockId) private view {
TaikoData.SlotB memory b = _state.slotB;
if (_blockId < b.lastVerifiedBlockId || _blockId >= b.numBlocks) {
revert L1_INVALID_BLOCK_ID();
}
}
}
2 changes: 2 additions & 0 deletions packages/protocol/deployments/mainnet-contract-logs.md
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,8 @@
- 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`
- todo:
- upgrade the implementation again

#### assignment_hook

Expand Down
18 changes: 16 additions & 2 deletions packages/protocol/script/DeployOnL1.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import "../contracts/automata-attestation/AutomataDcapV3Attestation.sol";
import "../contracts/automata-attestation/utils/SigVerifyLib.sol";
import "../contracts/automata-attestation/lib/PEMCertChainLib.sol";
import "../contracts/verifiers/SgxVerifier.sol";
import "../contracts/team/proving/ProverSet.sol";
import "../test/common/erc20/FreeMintERC20.sol";
import "../test/common/erc20/MayFailFreeMintERC20.sol";
import "../test/L1/TestTierProvider.sol";
Expand Down Expand Up @@ -273,7 +274,8 @@ contract DeployOnL1 is DeployCapability {
deployProxy({
name: "assignment_hook",
impl: address(new AssignmentHook()),
data: abi.encodeCall(AssignmentHook.init, (owner, rollupAddressManager))
data: abi.encodeCall(AssignmentHook.init, (owner, rollupAddressManager)),
registerTo: rollupAddressManager
});

deployProxy({
Expand Down Expand Up @@ -301,7 +303,11 @@ contract DeployOnL1 is DeployCapability {

register(rollupAddressManager, "tier_guardian_minority", guardianProverMinority);
register(rollupAddressManager, "tier_guardian", guardianProver);
register(rollupAddressManager, "tier_provider", address(new TestTierProvider()));
register(
rollupAddressManager,
"tier_provider",
address(deployTierProvider(vm.envString("TIER_PROVIDER")))
);

address[] memory guardians = vm.envAddress("GUARDIAN_PROVERS", ",");

Expand Down Expand Up @@ -333,6 +339,14 @@ contract DeployOnL1 is DeployCapability {
console2.log("SigVerifyLib", address(sigVerifyLib));
console2.log("PemCertChainLib", address(pemCertChainLib));
console2.log("AutomataDcapVaAttestation", automataProxy);

deployProxy({
name: "prover_set",
impl: address(new ProverSet()),
data: abi.encodeCall(
ProverSet.init, (owner, vm.envAddress("PROVER_SET_ADMIN"), rollupAddressManager)
)
});
}

function deployTierProvider(string memory tierProviderName) private returns (address) {
Expand Down
1 change: 1 addition & 0 deletions packages/protocol/script/test_deploy_on_l1.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ GUARDIAN_PROVERS="0x1000777700000000000000000000000000000001,0x10007777000000000
TAIKO_L2_ADDRESS=0x1000777700000000000000000000000000000001 \
L2_SIGNAL_SERVICE=0x1000777700000000000000000000000000000007 \
CONTRACT_OWNER=0x60997970C51812dc3A010C7d01b50e0d17dc79C8 \
PROVER_SET_ADMIN=0x60997970C51812dc3A010C7d01b50e0d17dc79C8 \
TAIKO_TOKEN_PREMINT_RECIPIENT=0xa0Ee7A142d267C1f36714E4a8F75612F20a79720 \
TAIKO_TOKEN_NAME="Taiko Token Katla" \
TAIKO_TOKEN_SYMBOL=TTKOk \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ func (s *Syncer) TriggerBeaconSync(verifyBlockID uint64) error {
if err != nil {
return err
}
if fcRes.PayloadStatus.Status != engine.SYNCING {
if fcRes.PayloadStatus.Status == engine.INVALID {
return fmt.Errorf("unexpected ForkchoiceUpdate response status: %s", fcRes.PayloadStatus.Status)
}

Expand Down
2 changes: 1 addition & 1 deletion packages/taikoon-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"test:integration": "playwright test",
"test:unit": "vitest",
"start": "npm run generate:abi && vite dev --open",
"generate:abi": "cd ../taikoon && pnpm compile && cd - && wagmi generate"
"generate:abi": "cd ../nfts && pnpm compile && cd - && wagmi generate"
},
"devDependencies": {
"@chromatic-com/storybook": "^1.3.1",
Expand Down

0 comments on commit d95a447

Please sign in to comment.