Skip to content

Commit

Permalink
feat: update scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
davidtaikocha committed Jan 24, 2025
1 parent c1e06a1 commit 4ecd95a
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,16 @@ interface IOntakeFork {
function proveBlocks(uint64[] calldata, bytes[] calldata, bytes calldata) external;
function verifyBlocks(uint64) external;
function getVerifiedBlockProver(uint64) external view;
function getLastVerifiedBlock() external view;
function getBlockV2(uint64) external view;
function getTransition(uint64, uint32) external view;
function getTransition(uint64, bytes32) external;
function getTransitions(uint64[] calldata, bytes32[] calldata) external;
function lastProposedIn() external view;
function getStateVariables() external view;
function getConfig() external pure;
function resolve(uint64, bytes32, bool) external view;
function resolve(bytes32, bool) external view;
}

/// @title PacayaForkRouter
Expand All @@ -36,12 +40,16 @@ contract PacayaForkRouter is ForkRouter {
|| _selector == IOntakeFork.proveBlocks.selector
|| _selector == IOntakeFork.verifyBlocks.selector
|| _selector == IOntakeFork.getVerifiedBlockProver.selector
|| _selector == IOntakeFork.getLastVerifiedBlock.selector
|| _selector == IOntakeFork.getBlockV2.selector
|| _selector == bytes4(keccak256("getTransition(uint64,uint32)"))
|| _selector == bytes4(keccak256("getTransition(uint64,bytes32)"))
|| _selector == IOntakeFork.getTransitions.selector
|| _selector == IOntakeFork.lastProposedIn.selector
|| _selector == IOntakeFork.getStateVariables.selector
|| _selector == IOntakeFork.getConfig.selector
|| _selector == bytes4(keccak256("resolve(uint64,bytes32,bool)"))
|| _selector == bytes4(keccak256("resolve(bytes32,bool)"))
) return true;

return false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import "src/layer1/verifiers/Risc0Verifier.sol";
import "src/layer1/verifiers/SP1Verifier.sol";
import "src/layer1/devnet/verifiers/OpVerifier.sol";
import "src/layer1/devnet/verifiers/DevnetVerifier.sol";
import "src/layer1/fork-router/ForkRouter.sol";
import "src/layer1/fork-router/PacayaForkRouter.sol";
import "src/layer1/verifiers/compose/ComposeVerifier.sol";
import "src/layer1/devnet/DevnetInbox.sol";

Expand Down Expand Up @@ -102,7 +102,7 @@ contract UpgradeDevnetPacayaL1 is DeployCapability {
copyRegister(rollupResolver, sharedResolver, "bridge");
// TaikoInbox
address newFork = address(new DevnetInbox(rollupResolver));
UUPSUpgradeable(taikoInbox).upgradeTo(address(new ForkRouter(oldFork, newFork)));
UUPSUpgradeable(taikoInbox).upgradeTo(address(new PacayaForkRouter(oldFork, newFork)));
register(rollupResolver, "taiko", taikoInbox);
// Prover set
UUPSUpgradeable(proverSet).upgradeTo(address(new ProverSet(rollupResolver)));
Expand Down
7 changes: 2 additions & 5 deletions packages/taiko-client/prover/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -321,13 +321,10 @@ func (p *Prover) initEventHandlers() error {

// initProofTiers initializes the proof tiers for the current prover.
func (p *Prover) initProofTiers(ctx context.Context) error {
// Check if the current protocol is in Pacaya fork.
if _, err := p.rpc.GetProtocolStateVariablesPacaya(&bind.CallOpts{Context: ctx}); err == nil {
return nil
}
tiers, err := p.rpc.GetTiers(ctx)
if err != nil {
return err
log.Warn("Failed to get tiers", "error", err)
return nil
}
p.sharedState.SetTiers(tiers)
return nil
Expand Down
1 change: 0 additions & 1 deletion packages/taiko-client/prover/prover_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,6 @@ func (s *ProverTestSuite) TestProveOp() {
}

func (s *ProverTestSuite) TestGetBlockProofStatus() {
s.T().Skip("TODO: Fix this test")
parent, err := s.p.rpc.L2.HeaderByNumber(context.Background(), nil)
s.Nil(err)

Expand Down

0 comments on commit 4ecd95a

Please sign in to comment.