mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-27 15:16:43 +00:00
feat: Euclid release on Scroll Sepolia (#1122)
* feat: Euclid release on Scroll Sepolia (wip) * update system contract consensus params * update timestamp * improve logs * fix * adjust logs * undo some changes
This commit is contained in:
parent
e62c6f08e2
commit
478940e796
3 changed files with 33 additions and 15 deletions
|
|
@ -48,8 +48,9 @@ func New(ctx context.Context, config *params.SystemContractConfig, client sync_s
|
|||
}
|
||||
|
||||
if err := s.fetchAddressFromL1(); err != nil {
|
||||
log.Error("failed to fetch signer address from L1", "err", err)
|
||||
log.Error("Failed to fetch signer address from L1", "err", err)
|
||||
}
|
||||
|
||||
return s
|
||||
}
|
||||
|
||||
|
|
@ -80,7 +81,7 @@ func (s *SystemContract) Start() {
|
|||
return
|
||||
case <-syncTicker.C:
|
||||
if err := s.fetchAddressFromL1(); err != nil {
|
||||
log.Error("failed to fetch signer address from L1", "err", err)
|
||||
log.Error("Failed to fetch signer address from L1", "err", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -94,16 +95,24 @@ func (s *SystemContract) fetchAddressFromL1() error {
|
|||
}
|
||||
bAddress := common.BytesToAddress(address)
|
||||
|
||||
s.lock.Lock()
|
||||
defer s.lock.Unlock()
|
||||
|
||||
// Validate the address is not empty
|
||||
if bAddress == (common.Address{}) {
|
||||
return fmt.Errorf("retrieved empty signer address from L1 System Contract: contract=%s, slot=%s", s.config.SystemContractAddress.Hex(), s.config.SystemContractSlot.Hex())
|
||||
log.Debug("Retrieved empty signer address from L1 System Contract", "contract", s.config.SystemContractAddress.Hex(), "slot", s.config.SystemContractSlot.Hex())
|
||||
|
||||
// Not initialized yet -- we don't consider this an error
|
||||
if s.signerAddressL1 == (common.Address{}) {
|
||||
log.Warn("System Contract signer address not initialized")
|
||||
return nil
|
||||
}
|
||||
|
||||
return fmt.Errorf("retrieved empty signer address from L1 System Contract")
|
||||
}
|
||||
|
||||
log.Debug("Read address from system contract", "address", bAddress.Hex())
|
||||
|
||||
s.lock.Lock()
|
||||
defer s.lock.Unlock()
|
||||
|
||||
if s.signerAddressL1 != bAddress {
|
||||
s.signerAddressL1 = bAddress
|
||||
log.Info("Updated new signer from L1 system contract", "signer", bAddress.Hex())
|
||||
|
|
|
|||
|
|
@ -328,20 +328,29 @@ var (
|
|||
CurieBlock: big.NewInt(4740239),
|
||||
DarwinTime: newUint64(1723622400),
|
||||
DarwinV2Time: newUint64(1724832000),
|
||||
EuclidTime: newUint64(1741680000),
|
||||
EuclidV2Time: newUint64(1741852800),
|
||||
Clique: &CliqueConfig{
|
||||
Period: 3,
|
||||
Epoch: 30000,
|
||||
},
|
||||
SystemContract: &SystemContractConfig{
|
||||
Period: 3,
|
||||
SystemContractAddress: common.HexToAddress("0xC706Ba9fa4fedF4507CB7A898b4766c1bbf9be57"),
|
||||
SystemContractSlot: common.HexToHash("0x0000000000000000000000000000000000000000000000000000000000000067"),
|
||||
},
|
||||
Scroll: ScrollConfig{
|
||||
UseZktrie: true,
|
||||
MaxTxPerBlock: &ScrollMaxTxPerBlock,
|
||||
MaxTxPayloadBytesPerBlock: &ScrollMaxTxPayloadBytesPerBlock,
|
||||
FeeVaultAddress: &rcfg.ScrollFeeVaultAddress,
|
||||
L1Config: &L1Config{
|
||||
L1ChainId: 11155111,
|
||||
L1MessageQueueAddress: common.HexToAddress("0xF0B2293F5D834eAe920c6974D50957A1732de763"),
|
||||
NumL1MessagesPerBlock: 10,
|
||||
ScrollChainAddress: common.HexToAddress("0x2D567EcE699Eabe5afCd141eDB7A4f2D0D6ce8a0"),
|
||||
L1ChainId: 11155111,
|
||||
L1MessageQueueAddress: common.HexToAddress("0xF0B2293F5D834eAe920c6974D50957A1732de763"),
|
||||
L1MessageQueueV2Address: common.HexToAddress("0xA0673eC0A48aa924f067F1274EcD281A10c5f19F"),
|
||||
L1MessageQueueV2DeploymentBlock: 7773746,
|
||||
NumL1MessagesPerBlock: 10,
|
||||
ScrollChainAddress: common.HexToAddress("0x2D567EcE699Eabe5afCd141eDB7A4f2D0D6ce8a0"),
|
||||
},
|
||||
GenesisStateRoot: &ScrollSepoliaGenesisState,
|
||||
},
|
||||
|
|
@ -692,8 +701,8 @@ type ScrollConfig struct {
|
|||
type L1Config struct {
|
||||
L1ChainId uint64 `json:"l1ChainId,string,omitempty"`
|
||||
L1MessageQueueAddress common.Address `json:"l1MessageQueueAddress,omitempty"`
|
||||
L1MessageQueueV2Address common.Address `json:"l1MessageQueueV2Address,omitempty"` // TODO: set address once known
|
||||
L1MessageQueueV2DeploymentBlock uint64 `json:"l1MessageQueueV2DeploymentBlock,omitempty"` // TODO: set block number once known
|
||||
L1MessageQueueV2Address common.Address `json:"l1MessageQueueV2Address,omitempty"`
|
||||
L1MessageQueueV2DeploymentBlock uint64 `json:"l1MessageQueueV2DeploymentBlock,omitempty"`
|
||||
NumL1MessagesPerBlock uint64 `json:"numL1MessagesPerBlock,string,omitempty"`
|
||||
ScrollChainAddress common.Address `json:"scrollChainAddress,omitempty"`
|
||||
}
|
||||
|
|
@ -703,8 +712,8 @@ func (c *L1Config) String() string {
|
|||
return "<nil>"
|
||||
}
|
||||
|
||||
return fmt.Sprintf("{l1ChainId: %v, l1MessageQueueAddress: %v, numL1MessagesPerBlock: %v, ScrollChainAddress: %v}",
|
||||
c.L1ChainId, c.L1MessageQueueAddress.Hex(), c.NumL1MessagesPerBlock, c.ScrollChainAddress.Hex())
|
||||
return fmt.Sprintf("{l1ChainId: %v, l1MessageQueueAddress: %v, l1MessageQueueV2Address: %v, l1MessageQueueV2DeploymentBlock: %v, numL1MessagesPerBlock: %v, ScrollChainAddress: %v}",
|
||||
c.L1ChainId, c.L1MessageQueueAddress.Hex(), c.L1MessageQueueV2Address.Hex(), c.L1MessageQueueV2DeploymentBlock, c.NumL1MessagesPerBlock, c.ScrollChainAddress.Hex())
|
||||
}
|
||||
|
||||
func (s ScrollConfig) FeeVaultEnabled() bool {
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ import (
|
|||
const (
|
||||
VersionMajor = 5 // Major version component of the current release
|
||||
VersionMinor = 8 // Minor version component of the current release
|
||||
VersionPatch = 22 // Patch version component of the current release
|
||||
VersionPatch = 23 // Patch version component of the current release
|
||||
VersionMeta = "mainnet" // Version metadata to append to the version string
|
||||
)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue