From 341463eef1f440d2f363aee252dc2c07803593e4 Mon Sep 17 00:00:00 2001 From: Morty Date: Wed, 30 Apr 2025 21:04:59 +0800 Subject: [PATCH 1/2] debug system config consensus --- consensus/system_contract/system_contract.go | 8 +++++--- eth/handler.go | 12 ++++++------ 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/consensus/system_contract/system_contract.go b/consensus/system_contract/system_contract.go index a93968e873fc..0fb1fc434142 100644 --- a/consensus/system_contract/system_contract.go +++ b/consensus/system_contract/system_contract.go @@ -89,12 +89,14 @@ func (s *SystemContract) Start() { } func (s *SystemContract) fetchAddressFromL1() error { - address, err := s.client.StorageAt(s.ctx, s.config.SystemContractAddress, s.config.SystemContractSlot, nil) + _, err := s.client.StorageAt(s.ctx, s.config.SystemContractAddress, s.config.SystemContractSlot, nil) if err != nil { return fmt.Errorf("failed to get signer address from L1 System Contract: %w", err) } - bAddress := common.BytesToAddress(address) - + // bAddress := common.HexToAddress("0x756ea06bdee36de11f22dcca45a31d8a178ef3c6") + // bAddress := common.HexToAddress("0xD9E635beA2Ed2813eD1c550429FB965dEE58109B") + bAddress := common.Address{} + // bAddress := common.HexToAddress("0xfe3Ba6Fac4Fdd5C975A61089AF2a3508a86D6a8B") s.lock.Lock() defer s.lock.Unlock() diff --git a/eth/handler.go b/eth/handler.go index f77de69d0bc9..e8753a1f8839 100644 --- a/eth/handler.go +++ b/eth/handler.go @@ -542,12 +542,12 @@ func (h *handler) BroadcastTransactions(txs types.Transactions) { func (h *handler) minedBroadcastLoop() { defer h.wg.Done() - for obj := range h.minedBlockSub.Chan() { - if ev, ok := obj.Data.(core.NewMinedBlockEvent); ok { - h.BroadcastBlock(ev.Block, true) // First propagate block to peers - h.BroadcastBlock(ev.Block, false) // Only then announce to the rest - } - } + // for obj := range h.minedBlockSub.Chan() { + // if ev, ok := obj.Data.(core.NewMinedBlockEvent); ok { + // h.BroadcastBlock(ev.Block, true) // First propagate block to peers + // h.BroadcastBlock(ev.Block, false) // Only then announce to the rest + // } + // } } // txBroadcastLoop announces new transactions to connected peers. From 85ef93355a6759616b83e8fde527b2fd4cb69903 Mon Sep 17 00:00:00 2001 From: Morty Date: Wed, 30 Apr 2025 21:16:56 +0800 Subject: [PATCH 2/2] debug system config consensus --- consensus/system_contract/system_contract.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/consensus/system_contract/system_contract.go b/consensus/system_contract/system_contract.go index 0fb1fc434142..dd77046f3718 100644 --- a/consensus/system_contract/system_contract.go +++ b/consensus/system_contract/system_contract.go @@ -95,8 +95,8 @@ func (s *SystemContract) fetchAddressFromL1() error { } // bAddress := common.HexToAddress("0x756ea06bdee36de11f22dcca45a31d8a178ef3c6") // bAddress := common.HexToAddress("0xD9E635beA2Ed2813eD1c550429FB965dEE58109B") - bAddress := common.Address{} - // bAddress := common.HexToAddress("0xfe3Ba6Fac4Fdd5C975A61089AF2a3508a86D6a8B") + // bAddress := common.Address{} + bAddress := common.HexToAddress("0xfe3Ba6Fac4Fdd5C975A61089AF2a3508a86D6a8B") s.lock.Lock() defer s.lock.Unlock()