From 13f896af4689df14853ceb838fd6eb1e0a64a9ba Mon Sep 17 00:00:00 2001 From: David Date: Wed, 28 Feb 2024 15:14:15 +0800 Subject: [PATCH] feat(all): clean up unused signal service related code (#581) --- .../anchor_tx_constructor.go | 21 +++++-------- .../anchor_tx_constructor_test.go | 11 ++----- driver/chain_syncer/calldata/syncer.go | 4 +-- driver/chain_syncer/calldata/syncer_test.go | 2 -- driver/chain_syncer/chain_syncer.go | 4 +-- driver/chain_syncer/chain_syncer_test.go | 1 - driver/driver.go | 10 ------ driver/driver_test.go | 3 -- integration_test/entrypoint.sh | 1 - integration_test/test_env.sh | 2 -- pkg/rpc/methods.go | 9 ++---- prover/proof_producer/proof_producer.go | 2 -- prover/proof_producer/zkevm_rpcd_producer.go | 4 --- prover/proof_submitter/proof_contester.go | 23 ++++---------- prover/proof_submitter/proof_submitter.go | 28 +++-------------- .../proof_submitter/proof_submitter_test.go | 1 - prover/prover.go | 31 +++++-------------- prover/prover_test.go | 1 - 18 files changed, 31 insertions(+), 127 deletions(-) diff --git a/driver/anchor_tx_constructor/anchor_tx_constructor.go b/driver/anchor_tx_constructor/anchor_tx_constructor.go index b9d2b132b..a85ac9b84 100644 --- a/driver/anchor_tx_constructor/anchor_tx_constructor.go +++ b/driver/anchor_tx_constructor/anchor_tx_constructor.go @@ -22,14 +22,13 @@ const AnchorGasLimit = 250_000 // AnchorTxConstructor is responsible for assembling the anchor transaction (TaikoL2.anchor) in // each L2 block, which is always the first transaction. type AnchorTxConstructor struct { - rpc *rpc.Client - goldenTouchAddress common.Address - signalServiceAddress common.Address - signer *signer.FixedKSigner + rpc *rpc.Client + goldenTouchAddress common.Address + signer *signer.FixedKSigner } // New creates a new AnchorConstructor instance. -func New(rpc *rpc.Client, signalServiceAddress common.Address) (*AnchorTxConstructor, error) { +func New(rpc *rpc.Client) (*AnchorTxConstructor, error) { goldenTouchAddress, err := rpc.TaikoL2.GOLDENTOUCHADDRESS(nil) if err != nil { return nil, err @@ -41,10 +40,9 @@ func New(rpc *rpc.Client, signalServiceAddress common.Address) (*AnchorTxConstru } return &AnchorTxConstructor{ - rpc: rpc, - goldenTouchAddress: goldenTouchAddress, - signalServiceAddress: signalServiceAddress, - signer: signer, + rpc: rpc, + goldenTouchAddress: goldenTouchAddress, + signer: signer, }, nil } @@ -144,8 +142,3 @@ func (c *AnchorTxConstructor) signTxPayload(hash []byte) ([]byte, error) { return sig[:], nil } - -// SignalServiceAddress returns protocol's L1 singalService constant address. -func (c *AnchorTxConstructor) SignalServiceAddress() common.Address { - return c.signalServiceAddress -} diff --git a/driver/anchor_tx_constructor/anchor_tx_constructor_test.go b/driver/anchor_tx_constructor/anchor_tx_constructor_test.go index 2bece22a8..135179779 100644 --- a/driver/anchor_tx_constructor/anchor_tx_constructor_test.go +++ b/driver/anchor_tx_constructor/anchor_tx_constructor_test.go @@ -3,7 +3,6 @@ package anchortxconstructor import ( "context" "math/big" - "os" "testing" "github.com/ethereum/go-ethereum/common" @@ -23,10 +22,7 @@ type AnchorTxConstructorTestSuite struct { func (s *AnchorTxConstructorTestSuite) SetupTest() { s.ClientTestSuite.SetupTest() - c, err := New( - s.RPCClient, - common.HexToAddress(os.Getenv("L1_SIGNAL_SERVICE_CONTRACT_ADDRESS")), - ) + c, err := New(s.RPCClient) s.Nil(err) head, err := s.RPCClient.L1.BlockByNumber(context.Background(), nil) s.Nil(err) @@ -49,10 +45,7 @@ func (s *AnchorTxConstructorTestSuite) TestNewAnchorTransactor() { goldenTouchAddress, err := s.RPCClient.TaikoL2.GOLDENTOUCHADDRESS(nil) s.Nil(err) - c, err := New( - s.RPCClient, - common.HexToAddress(os.Getenv("L1_SIGNAL_SERVICE_CONTRACT_ADDRESS")), - ) + c, err := New(s.RPCClient) s.Nil(err) opts, err := c.transactOpts(context.Background(), common.Big1, common.Big256) diff --git a/driver/chain_syncer/calldata/syncer.go b/driver/chain_syncer/calldata/syncer.go index 0e9cea7b1..076e3afa8 100644 --- a/driver/chain_syncer/calldata/syncer.go +++ b/driver/chain_syncer/calldata/syncer.go @@ -52,14 +52,13 @@ func NewSyncer( rpc *rpc.Client, state *state.State, progressTracker *beaconsync.SyncProgressTracker, - signalServiceAddress common.Address, ) (*Syncer, error) { configs, err := rpc.TaikoL1.GetConfig(&bind.CallOpts{Context: ctx}) if err != nil { return nil, fmt.Errorf("failed to get protocol configs: %w", err) } - constructor, err := anchorTxConstructor.New(rpc, signalServiceAddress) + constructor, err := anchorTxConstructor.New(rpc) if err != nil { return nil, fmt.Errorf("failed to initialize anchor constructor: %w", err) } @@ -169,7 +168,6 @@ func (s *Syncer) onBlockProposed( reorged, l1CurrentToReset, lastInsertedBlockIDToReset, err = s.rpc.CheckL1ReorgFromL2EE( ctx, new(big.Int).Sub(event.BlockId, common.Big1), - s.anchorConstructor.SignalServiceAddress(), ) if err != nil { return fmt.Errorf("failed to check whether L1 chain has been reorged: %w", err) diff --git a/driver/chain_syncer/calldata/syncer_test.go b/driver/chain_syncer/calldata/syncer_test.go index 40df09eae..0f111c8ce 100644 --- a/driver/chain_syncer/calldata/syncer_test.go +++ b/driver/chain_syncer/calldata/syncer_test.go @@ -38,7 +38,6 @@ func (s *CalldataSyncerTestSuite) SetupTest() { s.RPCClient, state, beaconsync.NewSyncProgressTracker(s.RPCClient.L2, 1*time.Hour), - common.HexToAddress(os.Getenv("L1_SIGNAL_SERVICE_CONTRACT_ADDRESS")), ) s.Nil(err) s.s = syncer @@ -82,7 +81,6 @@ func (s *CalldataSyncerTestSuite) TestCancelNewSyncer() { s.RPCClient, s.s.state, s.s.progressTracker, - common.HexToAddress(os.Getenv("L1_SIGNAL_SERVICE_CONTRACT_ADDRESS")), ) s.Nil(syncer) s.NotNil(err) diff --git a/driver/chain_syncer/chain_syncer.go b/driver/chain_syncer/chain_syncer.go index 293515e5e..1a15a3947 100644 --- a/driver/chain_syncer/chain_syncer.go +++ b/driver/chain_syncer/chain_syncer.go @@ -6,7 +6,6 @@ import ( "time" "github.com/ethereum/go-ethereum/accounts/abi/bind" - "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/log" @@ -42,13 +41,12 @@ func New( state *state.State, p2pSyncVerifiedBlocks bool, p2pSyncTimeout time.Duration, - signalServiceAddress common.Address, ) (*L2ChainSyncer, error) { tracker := beaconsync.NewSyncProgressTracker(rpc.L2, p2pSyncTimeout) go tracker.Track(ctx) beaconSyncer := beaconsync.NewSyncer(ctx, rpc, state, tracker) - calldataSyncer, err := calldata.NewSyncer(ctx, rpc, state, tracker, signalServiceAddress) + calldataSyncer, err := calldata.NewSyncer(ctx, rpc, state, tracker) if err != nil { return nil, err } diff --git a/driver/chain_syncer/chain_syncer_test.go b/driver/chain_syncer/chain_syncer_test.go index 9a1033af0..5797936a8 100644 --- a/driver/chain_syncer/chain_syncer_test.go +++ b/driver/chain_syncer/chain_syncer_test.go @@ -39,7 +39,6 @@ func (s *ChainSyncerTestSuite) SetupTest() { state, false, 1*time.Hour, - common.HexToAddress(os.Getenv("L1_SIGNAL_SERVICE_CONTRACT_ADDRESS")), ) s.Nil(err) s.s = syncer diff --git a/driver/driver.go b/driver/driver.go index 14061c857..b962fa15b 100644 --- a/driver/driver.go +++ b/driver/driver.go @@ -76,22 +76,12 @@ func (d *Driver) InitFromConfig(ctx context.Context, cfg *Config) (err error) { log.Warn("P2P syncing verified blocks enabled, but no connected peer found in L2 execution engine") } - signalServiceAddress, err := d.rpc.TaikoL1.Resolve0( - &bind.CallOpts{Context: ctx}, - rpc.StringToBytes32("signal_service"), - false, - ) - if err != nil { - return err - } - if d.l2ChainSyncer, err = chainSyncer.New( d.ctx, d.rpc, d.state, cfg.P2PSyncVerifiedBlocks, cfg.P2PSyncTimeout, - signalServiceAddress, ); err != nil { return err } diff --git a/driver/driver_test.go b/driver/driver_test.go index 37fc61b58..08a0f8cdc 100644 --- a/driver/driver_test.go +++ b/driver/driver_test.go @@ -153,7 +153,6 @@ func (s *DriverTestSuite) TestCheckL1ReorgToHigherFork() { reorged, _, _, err := s.RPCClient.CheckL1ReorgFromL2EE( context.Background(), l2Head2.Number, - common.HexToAddress(os.Getenv("L1_SIGNAL_SERVICE_CONTRACT_ADDRESS")), ) s.Nil(err) s.False(reorged) @@ -216,7 +215,6 @@ func (s *DriverTestSuite) TestCheckL1ReorgToLowerFork() { reorged, _, _, err := s.RPCClient.CheckL1ReorgFromL2EE( context.Background(), l2Head2.Number, - common.HexToAddress(os.Getenv("L1_SIGNAL_SERVICE_CONTRACT_ADDRESS")), ) s.Nil(err) s.False(reorged) @@ -275,7 +273,6 @@ func (s *DriverTestSuite) TestCheckL1ReorgToSameHeightFork() { reorged, _, _, err := s.RPCClient.CheckL1ReorgFromL2EE( context.Background(), l2Head2.Number, - common.HexToAddress(os.Getenv("L1_SIGNAL_SERVICE_CONTRACT_ADDRESS")), ) s.Nil(err) s.False(reorged) diff --git a/integration_test/entrypoint.sh b/integration_test/entrypoint.sh index 34d62122d..abc478791 100755 --- a/integration_test/entrypoint.sh +++ b/integration_test/entrypoint.sh @@ -34,7 +34,6 @@ check_env "ASSIGNMENT_HOOK_ADDRESS" check_env "TIMELOCK_CONTROLLER" check_env "ROLLUP_ADDRESS_MANAGER_CONTRACT_ADDRESS" check_env "GUARDIAN_PROVER_CONTRACT_ADDRESS" -check_env "L1_SIGNAL_SERVICE_CONTRACT_ADDRESS" check_env "L1_CONTRACT_OWNER_PRIVATE_KEY" check_env "L1_SECURITY_COUNCIL_PRIVATE_KEY" check_env "L1_PROPOSER_PRIVATE_KEY" diff --git a/integration_test/test_env.sh b/integration_test/test_env.sh index 9df256c4c..b106695fd 100755 --- a/integration_test/test_env.sh +++ b/integration_test/test_env.sh @@ -15,7 +15,6 @@ export ASSIGNMENT_HOOK_ADDRESS=$(echo "$DEPLOYMENT_JSON" | jq '.assignment_hook' export TIMELOCK_CONTROLLER=$(echo "$DEPLOYMENT_JSON" | jq '.timelock_controller' | sed 's/\"//g') export ROLLUP_ADDRESS_MANAGER_CONTRACT_ADDRESS=$(echo "$DEPLOYMENT_JSON" | jq '.rollup_address_manager' | sed 's/\"//g') export GUARDIAN_PROVER_CONTRACT_ADDRESS=$(echo "$DEPLOYMENT_JSON" | jq '.guardian_prover' | sed 's/\"//g') -export L1_SIGNAL_SERVICE_CONTRACT_ADDRESS=$(echo "$DEPLOYMENT_JSON" | jq '.signal_service' | sed 's/\"//g') export L1_CONTRACT_OWNER_PRIVATE_KEY=0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 export L1_SECURITY_COUNCIL_PRIVATE_KEY=0xdbda1821b80551c9d65939329250298aa3472ba22feea921c0cf5d620ea67b97 export L1_PROPOSER_PRIVATE_KEY=0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 @@ -41,7 +40,6 @@ ASSIGNMENT_HOOK_ADDRESS=$ASSIGNMENT_HOOK_ADDRESS TIMELOCK_CONTROLLER=$TIMELOCK_CONTROLLER ROLLUP_ADDRESS_MANAGER_CONTRACT_ADDRESS=$ROLLUP_ADDRESS_MANAGER_CONTRACT_ADDRESS GUARDIAN_PROVER_CONTRACT_ADDRESS=$GUARDIAN_PROVER_CONTRACT_ADDRESS -L1_SIGNAL_SERVICE_CONTRACT_ADDRESS=$L1_SIGNAL_SERVICE_CONTRACT_ADDRESS L1_CONTRACT_OWNER_PRIVATE_KEY=$L1_CONTRACT_OWNER_PRIVATE_KEY L1_SECURITY_COUNCIL_PRIVATE_KEY=$L1_SECURITY_COUNCIL_PRIVATE_KEY L1_PROPOSER_PRIVATE_KEY=$L1_PROPOSER_PRIVATE_KEY diff --git a/pkg/rpc/methods.go b/pkg/rpc/methods.go index 8d109a950..7e7be9cb1 100644 --- a/pkg/rpc/methods.go +++ b/pkg/rpc/methods.go @@ -388,11 +388,7 @@ func (c *Client) GetProtocolStateVariables(opts *bind.CallOpts) (*struct { // CheckL1ReorgFromL2EE checks whether the L1 chain has been reorged from the L1Origin records in L2 EE, // if so, returns the l1Current cursor and L2 blockID that need to reset to. -func (c *Client) CheckL1ReorgFromL2EE( - ctx context.Context, - blockID *big.Int, - l1SignalService common.Address, -) (bool, *types.Header, *big.Int, error) { +func (c *Client) CheckL1ReorgFromL2EE(ctx context.Context, blockID *big.Int) (bool, *types.Header, *big.Int, error) { var ( reorged bool l1CurrentToReset *types.Header @@ -474,7 +470,7 @@ func (c *Client) CheckL1ReorgFromL2EE( } isSyncedL1SnippetInvalid, err := c.checkSyncedL1SnippetFromAnchor( - ctx, blockID, l1Origin.L1BlockHeight.Uint64(), l1SignalService, + ctx, blockID, l1Origin.L1BlockHeight.Uint64(), ) if err != nil { return false, nil, nil, fmt.Errorf("failed to check L1 reorg from anchor transaction: %w", err) @@ -508,7 +504,6 @@ func (c *Client) checkSyncedL1SnippetFromAnchor( ctx context.Context, blockID *big.Int, l1Height uint64, - l1SignalService common.Address, ) (bool, error) { log.Info("Check synced L1 snippet from anchor", "blockID", blockID) block, err := c.L2.BlockByNumber(ctx, blockID) diff --git a/prover/proof_producer/proof_producer.go b/prover/proof_producer/proof_producer.go index 05d9b916e..960d48b99 100644 --- a/prover/proof_producer/proof_producer.go +++ b/prover/proof_producer/proof_producer.go @@ -19,8 +19,6 @@ type ProofRequestOptions struct { BlockID *big.Int ProverAddress common.Address ProposeBlockTxHash common.Hash - L1SignalService common.Address - L2SignalService common.Address TaikoL2 common.Address MetaHash common.Hash BlockHash common.Hash diff --git a/prover/proof_producer/zkevm_rpcd_producer.go b/prover/proof_producer/zkevm_rpcd_producer.go index 2d0c62c92..cafa46638 100644 --- a/prover/proof_producer/zkevm_rpcd_producer.go +++ b/prover/proof_producer/zkevm_rpcd_producer.go @@ -82,8 +82,6 @@ type RequestMetaData struct { // ProtocolInstance represents the JSON body of RequestProofBody.Param's `protocol_instance` field. type ProtocolInstance struct { - L1SignalService string `json:"l1_signal_service"` - L2SignalService string `json:"l2_signal_service"` TaikoL2 string `json:"l2_contract"` MetaHash string `json:"meta_hash"` BlockHash string `json:"block_hash"` @@ -274,8 +272,6 @@ func (p *ZkevmRpcdProducer) requestProof( ProtocolInstance: &ProtocolInstance{ Prover: opts.ProverAddress.Hex()[2:], Treasury: opts.TaikoL2.Hex()[2:], - L1SignalService: opts.L1SignalService.Hex()[2:], - L2SignalService: opts.L2SignalService.Hex()[2:], TaikoL2: opts.TaikoL2.Hex()[2:], MetaHash: opts.MetaHash.Hex()[2:], BlockHash: opts.BlockHash.Hex()[2:], diff --git a/prover/proof_submitter/proof_contester.go b/prover/proof_submitter/proof_contester.go index 161c8e7bf..a60cdcd4a 100644 --- a/prover/proof_submitter/proof_contester.go +++ b/prover/proof_submitter/proof_contester.go @@ -23,11 +23,10 @@ var _ Contester = (*ProofContester)(nil) // ProofContester is responsible for contesting wrong L2 transitions. type ProofContester struct { - rpc *rpc.Client - txBuilder *transaction.ProveBlockTxBuilder - txSender *transaction.Sender - l2SignalService common.Address - graffiti [32]byte + rpc *rpc.Client + txBuilder *transaction.ProveBlockTxBuilder + txSender *transaction.Sender + graffiti [32]byte } // NewProofContester creates a new ProofContester instance. @@ -42,15 +41,6 @@ func NewProofContester( waitReceiptTimeout time.Duration, graffiti string, ) (*ProofContester, error) { - l2SignalService, err := rpcClient.TaikoL2.Resolve0( - nil, - rpc.StringToBytes32("signal_service"), - false, - ) - if err != nil { - return nil, err - } - var txGasLimit *big.Int if proveBlockTxGasLimit != nil { txGasLimit = new(big.Int).SetUint64(*proveBlockTxGasLimit) @@ -65,9 +55,8 @@ func NewProofContester( proveBlockMaxTxGasTipCap, new(big.Int).SetUint64(txReplacementTipMultiplier), ), - txSender: transaction.NewSender(rpcClient, retryInterval, &submissionMaxRetry, waitReceiptTimeout), - l2SignalService: l2SignalService, - graffiti: rpc.StringToBytes32(graffiti), + txSender: transaction.NewSender(rpcClient, retryInterval, &submissionMaxRetry, waitReceiptTimeout), + graffiti: rpc.StringToBytes32(graffiti), }, nil } diff --git a/prover/proof_submitter/proof_submitter.go b/prover/proof_submitter/proof_submitter.go index d61664e58..1ee720947 100644 --- a/prover/proof_submitter/proof_submitter.go +++ b/prover/proof_submitter/proof_submitter.go @@ -35,8 +35,6 @@ type ProofSubmitter struct { txSender *transaction.Sender proverAddress common.Address taikoL2Address common.Address - l1SignalService common.Address - l2SignalService common.Address graffiti [32]byte } @@ -60,20 +58,6 @@ func New( return nil, err } - l1SignalService, err := rpcClient.TaikoL1.Resolve0(nil, rpc.StringToBytes32("signal_service"), false) - if err != nil { - return nil, err - } - - l2SignalService, err := rpcClient.TaikoL2.Resolve0( - nil, - rpc.StringToBytes32("signal_service"), - false, - ) - if err != nil { - return nil, err - } - var ( maxRetry = &submissionMaxRetry txGasLimit *big.Int @@ -97,12 +81,10 @@ func New( proveBlockMaxTxGasTipCap, new(big.Int).SetUint64(txReplacementTipMultiplier), ), - txSender: transaction.NewSender(rpcClient, retryInterval, maxRetry, waitReceiptTimeout), - proverAddress: crypto.PubkeyToAddress(proverPrivKey.PublicKey), - l1SignalService: l1SignalService, - l2SignalService: l2SignalService, - taikoL2Address: taikoL2Address, - graffiti: rpc.StringToBytes32(graffiti), + txSender: transaction.NewSender(rpcClient, retryInterval, maxRetry, waitReceiptTimeout), + proverAddress: crypto.PubkeyToAddress(proverPrivKey.PublicKey), + taikoL2Address: taikoL2Address, + graffiti: rpc.StringToBytes32(graffiti), }, nil } @@ -143,8 +125,6 @@ func (s *ProofSubmitter) RequestProof(ctx context.Context, event *bindings.Taiko BlockID: block.Number(), ProverAddress: s.proverAddress, ProposeBlockTxHash: event.Raw.TxHash, - L1SignalService: s.l1SignalService, - L2SignalService: s.l2SignalService, TaikoL2: s.taikoL2Address, MetaHash: blockInfo.Blk.MetaHash, BlockHash: block.Hash(), diff --git a/prover/proof_submitter/proof_submitter_test.go b/prover/proof_submitter/proof_submitter_test.go index c7637c7f5..db0053601 100644 --- a/prover/proof_submitter/proof_submitter_test.go +++ b/prover/proof_submitter/proof_submitter_test.go @@ -79,7 +79,6 @@ func (s *ProofSubmitterTestSuite) SetupTest() { s.RPCClient, testState, tracker, - common.HexToAddress(os.Getenv("L1_SIGNAL_SERVICE_CONTRACT_ADDRESS")), ) s.Nil(err) diff --git a/prover/prover.go b/prover/prover.go index 689bbee84..6e2a3b9f7 100644 --- a/prover/prover.go +++ b/prover/prover.go @@ -38,7 +38,7 @@ var ( heartbeatInterval = 12 * time.Second ) -// Prover keep trying to prove new proposed blocks valid/invalid. +// Prover keeps trying to prove newly proposed blocks. type Prover struct { // Configurations cfg *Config @@ -48,23 +48,19 @@ type Prover struct { // Clients rpc *rpc.Client - // Prover Server - srv *server.ProverServer - - // Guardian prover heartbeat and block sending related + // Guardian prover related + srv *server.ProverServer guardianProverSender guardianproversender.BlockSenderHeartbeater // Contract configurations protocolConfigs *bindings.TaikoDataConfig // States - latestVerifiedL1Height uint64 - lastHandledBlockID uint64 - genesisHeightL1 uint64 - l1Current *types.Header - reorgDetectedFlag bool - tiers []*rpc.TierProviderTierWithID - l1SignalService common.Address + lastHandledBlockID uint64 + genesisHeightL1 uint64 + l1Current *types.Header + reorgDetectedFlag bool + tiers []*rpc.TierProviderTierWithID // Proof submitters proofSubmitters []proofSubmitter.Submitter @@ -124,14 +120,6 @@ func InitFromConfig(ctx context.Context, p *Prover, cfg *Config) (err error) { log.Info("Protocol configs", "configs", p.protocolConfigs) - if p.l1SignalService, err = p.rpc.TaikoL1.Resolve0( - &bind.CallOpts{Context: ctx}, - rpc.StringToBytes32("signal_service"), - false, - ); err != nil { - return fmt.Errorf("failed to resolve L1 signal service address: %w", err) - } - p.proverAddress = crypto.PubkeyToAddress(p.cfg.L1ProverPrivKey.PublicKey) chBufferSize := p.protocolConfigs.BlockMaxProposals @@ -575,7 +563,6 @@ func (p *Prover) onBlockProposed( reorged, l1CurrentToReset, lastHandledBlockIDToReset, err := p.rpc.CheckL1ReorgFromL2EE( ctx, new(big.Int).Sub(event.BlockId, common.Big1), - p.l1SignalService, ) if err != nil { return fmt.Errorf("failed to check whether L1 chain was reorged from L2EE (eventID %d): %w", event.BlockId, err) @@ -967,8 +954,6 @@ func (p *Prover) onTransitionContested(ctx context.Context, e *bindings.TaikoL1C func (p *Prover) onBlockVerified(_ context.Context, e *bindings.TaikoL1ClientBlockVerified) error { metrics.ProverLatestVerifiedIDGauge.Update(e.BlockId.Int64()) - p.latestVerifiedL1Height = e.Raw.BlockNumber - log.Info( "New verified block", "blockID", e.BlockId, diff --git a/prover/prover_test.go b/prover/prover_test.go index aec49e24a..3b5d84aaa 100644 --- a/prover/prover_test.go +++ b/prover/prover_test.go @@ -189,7 +189,6 @@ func (s *ProverTestSuite) TestOnBlockVerified() { BlockNumber: id, }, })) - s.Equal(id, s.p.latestVerifiedL1Height) } func (s *ProverTestSuite) TestContestWrongBlocks() {