chore(taiko): update preconf devnet genesis jsons (#381)

* update preconf genesis

* .

* update genesis

* Revert "update genesis"

This reverts commit 049e4a22ff0ef9a0e4d01d6da76b1194f093c171.

* update genesis

* logs

* .

* update genesis

* gen

* prep for merge

* add logs

* bump ws values

* build

* add masaya

* some logs for buildTransactionLists

* one more log

* rm basefee from logs

* add change logs

---------

Co-authored-by: David <david@taiko.xyz>
This commit is contained in:
jeff 2025-05-16 18:53:48 -07:00 committed by GitHub
parent 7e0d8a02c8
commit 965043b977
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 279 additions and 15 deletions

View file

@ -12,11 +12,13 @@ import (
var ( var (
InternalDevnetOntakeBlock = new(big.Int).SetUint64(0) InternalDevnetOntakeBlock = new(big.Int).SetUint64(0)
PreconfDevnetOntakeBlock = common.Big0 PreconfDevnetOntakeBlock = common.Big0
MasayaDevnetOntakeBlock = common.Big0
HeklaOntakeBlock = new(big.Int).SetUint64(840_512) HeklaOntakeBlock = new(big.Int).SetUint64(840_512)
MainnetOntakeBlock = new(big.Int).SetUint64(538_304) MainnetOntakeBlock = new(big.Int).SetUint64(538_304)
InternalDevnetPacayaBlock = new(big.Int).SetUint64(10) InternalDevnetPacayaBlock = new(big.Int).SetUint64(10)
PreconfDevnetPacayaBlock = common.Big0 PreconfDevnetPacayaBlock = common.Big0
MasayaDevnetPacayaBlock = common.Big0
HeklaPacayaBlock = new(big.Int).SetUint64(1_299_888) HeklaPacayaBlock = new(big.Int).SetUint64(1_299_888)
MainnetPacayaBlock = new(big.Int).SetUint64(1_166_000) MainnetPacayaBlock = new(big.Int).SetUint64(1_166_000)
) )
@ -68,6 +70,11 @@ func TaikoGenesisBlock(networkID uint64) *Genesis {
chainConfig.OntakeBlock = PreconfDevnetOntakeBlock chainConfig.OntakeBlock = PreconfDevnetOntakeBlock
chainConfig.PacayaBlock = PreconfDevnetPacayaBlock chainConfig.PacayaBlock = PreconfDevnetPacayaBlock
allocJSON = taikoGenesis.PreconfDevnetGenesisAllocJSON allocJSON = taikoGenesis.PreconfDevnetGenesisAllocJSON
case params.MasayaDevnetNetworkID.Uint64():
chainConfig.ChainID = params.MasayaDevnetNetworkID
chainConfig.OntakeBlock = MasayaDevnetOntakeBlock
chainConfig.PacayaBlock = MasayaDevnetPacayaBlock
allocJSON = taikoGenesis.MasayaGenesisAllocJSON
default: default:
chainConfig.ChainID = params.TaikoInternalL2ANetworkID chainConfig.ChainID = params.TaikoInternalL2ANetworkID
chainConfig.OntakeBlock = InternalDevnetOntakeBlock chainConfig.OntakeBlock = InternalDevnetOntakeBlock

View file

@ -36,3 +36,6 @@ var MainnetGenesisAllocJSON []byte
//go:embed preconf_devnet.json //go:embed preconf_devnet.json
var PreconfDevnetGenesisAllocJSON []byte var PreconfDevnetGenesisAllocJSON []byte
//go:embed masaya.json
var MasayaGenesisAllocJSON []byte

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -46,7 +46,16 @@ func (w *Miner) buildTransactionsLists(
currentHead = w.chain.CurrentBlock() currentHead = w.chain.CurrentBlock()
) )
log.Info("buildTransactionsLists",
"blockMaxGasLimit", blockMaxGasLimit,
"maxBytesPerTxList", maxBytesPerTxList,
"maxTransactionsLists", maxTransactionsLists,
"localAccounts", localAccounts,
"minTip", minTip,
)
if currentHead == nil { if currentHead == nil {
log.Error("buildTransactionsLists failed to find current head")
return nil, fmt.Errorf("failed to find current head") return nil, fmt.Errorf("failed to find current head")
} }
@ -58,6 +67,10 @@ func (w *Miner) buildTransactionsLists(
OnlyPlainTxs: true, OnlyPlainTxs: true,
}, },
)) == 0 { )) == 0 {
log.Warn("buildTransactionsLists: tx pool is empty",
"minTip", minTip,
"onlyPlainTxs", true,
)
return txsLists, nil return txsLists, nil
} }
@ -71,6 +84,15 @@ func (w *Miner) buildTransactionsLists(
baseFeePerGas: baseFee, baseFeePerGas: baseFee,
} }
log.Info("buildTransactionsLists: prepare work",
"timestamp", params.timestamp,
"forceTime", params.forceTime,
"parentHash", params.parentHash,
"coinbase", params.coinbase,
"random", params.random,
"noTxs", params.noTxs,
)
env, err := w.prepareWork(params, false) env, err := w.prepareWork(params, false)
if err != nil { if err != nil {
return nil, err return nil, err
@ -99,9 +121,23 @@ func (w *Miner) buildTransactionsLists(
minTip, minTip,
) )
if err != nil { if err != nil {
log.Error("buildTransactionsLists: commit transactions failed", "error", err)
return nil, nil, err return nil, nil, err
} }
log.Info("buildTransactionsLists: commit transactions",
"localTxs", len(localTxs),
"remoteTxs", len(remoteTxs),
"txsPruned", len(pruningResult.TxsPruned),
"receiptsPruned", len(pruningResult.ReceiptsPruned),
"txsRemaining", len(result.TxsRemaining),
"receiptsRemaining", len(result.ReceiptsRemaining),
"size", result.Size,
"gasUsed", accumulateGasUsed(result.ReceiptsRemaining),
"bytesLength", uint64(result.Size),
)
return result, &PreBuiltTxList{ return result, &PreBuiltTxList{
TxList: result.TxsRemaining, TxList: result.TxsRemaining,
EstimatedGasUsed: accumulateGasUsed(result.ReceiptsRemaining), EstimatedGasUsed: accumulateGasUsed(result.ReceiptsRemaining),
@ -125,6 +161,10 @@ func (w *Miner) buildTransactionsLists(
txsLists = append(txsLists, preBuiltTxList) txsLists = append(txsLists, preBuiltTxList)
} }
log.Info("buildTransactionsLists: commit transactions finished",
"txLists", len(txsLists),
)
return txsLists, nil return txsLists, nil
} }

View file

@ -48,6 +48,7 @@ var (
KatlaNetworkID = big.NewInt(167008) KatlaNetworkID = big.NewInt(167008)
HeklaNetworkID = big.NewInt(167009) HeklaNetworkID = big.NewInt(167009)
PreconfDevnetNetworkID = big.NewInt(167010) PreconfDevnetNetworkID = big.NewInt(167010)
MasayaDevnetNetworkID = big.NewInt(167011)
) )
var networkIDToChainConfig = map[*big.Int]*ChainConfig{ var networkIDToChainConfig = map[*big.Int]*ChainConfig{
@ -62,6 +63,7 @@ var networkIDToChainConfig = map[*big.Int]*ChainConfig{
KatlaNetworkID: TaikoChainConfig, KatlaNetworkID: TaikoChainConfig,
HeklaNetworkID: TaikoChainConfig, HeklaNetworkID: TaikoChainConfig,
PreconfDevnetNetworkID: TaikoChainConfig, PreconfDevnetNetworkID: TaikoChainConfig,
MasayaDevnetNetworkID: TaikoChainConfig,
MainnetChainConfig.ChainID: MainnetChainConfig, MainnetChainConfig.ChainID: MainnetChainConfig,
SepoliaChainConfig.ChainID: SepoliaChainConfig, SepoliaChainConfig.ChainID: SepoliaChainConfig,
TestChainConfig.ChainID: TestChainConfig, TestChainConfig.ChainID: TestChainConfig,

View file

@ -33,12 +33,12 @@ import (
) )
const ( const (
wsReadBuffer = 1024 wsReadBuffer = 10 * 1024 * 1024 // CHANGE(taiko): change to 10 * 1024 * 1024
wsWriteBuffer = 1024 wsWriteBuffer = 10 * 1024 * 1024 // CHANGE(taiko): change to 10 * 1024 * 1024
wsPingInterval = 30 * time.Second wsPingInterval = 30 * time.Second
wsPingWriteTimeout = 5 * time.Second wsPingWriteTimeout = 5 * time.Second
wsPongTimeout = 30 * time.Second wsPongTimeout = 30 * time.Second
wsDefaultReadLimit = 32 * 1024 * 1024 wsDefaultReadLimit = 100 * 1024 * 1024 // CHANGE(taiko): change to 100 * 1024 * 1024
) )
var wsBufferPool = new(sync.Pool) var wsBufferPool = new(sync.Pool)