mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-25 22:26:42 +00:00
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:
parent
7e0d8a02c8
commit
965043b977
7 changed files with 279 additions and 15 deletions
|
|
@ -12,11 +12,13 @@ import (
|
|||
var (
|
||||
InternalDevnetOntakeBlock = new(big.Int).SetUint64(0)
|
||||
PreconfDevnetOntakeBlock = common.Big0
|
||||
MasayaDevnetOntakeBlock = common.Big0
|
||||
HeklaOntakeBlock = new(big.Int).SetUint64(840_512)
|
||||
MainnetOntakeBlock = new(big.Int).SetUint64(538_304)
|
||||
|
||||
InternalDevnetPacayaBlock = new(big.Int).SetUint64(10)
|
||||
PreconfDevnetPacayaBlock = common.Big0
|
||||
MasayaDevnetPacayaBlock = common.Big0
|
||||
HeklaPacayaBlock = new(big.Int).SetUint64(1_299_888)
|
||||
MainnetPacayaBlock = new(big.Int).SetUint64(1_166_000)
|
||||
)
|
||||
|
|
@ -68,6 +70,11 @@ func TaikoGenesisBlock(networkID uint64) *Genesis {
|
|||
chainConfig.OntakeBlock = PreconfDevnetOntakeBlock
|
||||
chainConfig.PacayaBlock = PreconfDevnetPacayaBlock
|
||||
allocJSON = taikoGenesis.PreconfDevnetGenesisAllocJSON
|
||||
case params.MasayaDevnetNetworkID.Uint64():
|
||||
chainConfig.ChainID = params.MasayaDevnetNetworkID
|
||||
chainConfig.OntakeBlock = MasayaDevnetOntakeBlock
|
||||
chainConfig.PacayaBlock = MasayaDevnetPacayaBlock
|
||||
allocJSON = taikoGenesis.MasayaGenesisAllocJSON
|
||||
default:
|
||||
chainConfig.ChainID = params.TaikoInternalL2ANetworkID
|
||||
chainConfig.OntakeBlock = InternalDevnetOntakeBlock
|
||||
|
|
|
|||
|
|
@ -36,3 +36,6 @@ var MainnetGenesisAllocJSON []byte
|
|||
|
||||
//go:embed preconf_devnet.json
|
||||
var PreconfDevnetGenesisAllocJSON []byte
|
||||
|
||||
//go:embed masaya.json
|
||||
var MasayaGenesisAllocJSON []byte
|
||||
|
|
|
|||
212
core/taiko_genesis/masaya.json
Normal file
212
core/taiko_genesis/masaya.json
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -46,7 +46,16 @@ func (w *Miner) buildTransactionsLists(
|
|||
currentHead = w.chain.CurrentBlock()
|
||||
)
|
||||
|
||||
log.Info("buildTransactionsLists",
|
||||
"blockMaxGasLimit", blockMaxGasLimit,
|
||||
"maxBytesPerTxList", maxBytesPerTxList,
|
||||
"maxTransactionsLists", maxTransactionsLists,
|
||||
"localAccounts", localAccounts,
|
||||
"minTip", minTip,
|
||||
)
|
||||
|
||||
if currentHead == nil {
|
||||
log.Error("buildTransactionsLists failed to find current head")
|
||||
return nil, fmt.Errorf("failed to find current head")
|
||||
}
|
||||
|
||||
|
|
@ -58,6 +67,10 @@ func (w *Miner) buildTransactionsLists(
|
|||
OnlyPlainTxs: true,
|
||||
},
|
||||
)) == 0 {
|
||||
log.Warn("buildTransactionsLists: tx pool is empty",
|
||||
"minTip", minTip,
|
||||
"onlyPlainTxs", true,
|
||||
)
|
||||
return txsLists, nil
|
||||
}
|
||||
|
||||
|
|
@ -71,6 +84,15 @@ func (w *Miner) buildTransactionsLists(
|
|||
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)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
|
@ -99,9 +121,23 @@ func (w *Miner) buildTransactionsLists(
|
|||
minTip,
|
||||
)
|
||||
if err != nil {
|
||||
log.Error("buildTransactionsLists: commit transactions failed", "error", 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{
|
||||
TxList: result.TxsRemaining,
|
||||
EstimatedGasUsed: accumulateGasUsed(result.ReceiptsRemaining),
|
||||
|
|
@ -125,6 +161,10 @@ func (w *Miner) buildTransactionsLists(
|
|||
txsLists = append(txsLists, preBuiltTxList)
|
||||
}
|
||||
|
||||
log.Info("buildTransactionsLists: commit transactions finished",
|
||||
"txLists", len(txsLists),
|
||||
)
|
||||
|
||||
return txsLists, nil
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -48,6 +48,7 @@ var (
|
|||
KatlaNetworkID = big.NewInt(167008)
|
||||
HeklaNetworkID = big.NewInt(167009)
|
||||
PreconfDevnetNetworkID = big.NewInt(167010)
|
||||
MasayaDevnetNetworkID = big.NewInt(167011)
|
||||
)
|
||||
|
||||
var networkIDToChainConfig = map[*big.Int]*ChainConfig{
|
||||
|
|
@ -62,6 +63,7 @@ var networkIDToChainConfig = map[*big.Int]*ChainConfig{
|
|||
KatlaNetworkID: TaikoChainConfig,
|
||||
HeklaNetworkID: TaikoChainConfig,
|
||||
PreconfDevnetNetworkID: TaikoChainConfig,
|
||||
MasayaDevnetNetworkID: TaikoChainConfig,
|
||||
MainnetChainConfig.ChainID: MainnetChainConfig,
|
||||
SepoliaChainConfig.ChainID: SepoliaChainConfig,
|
||||
TestChainConfig.ChainID: TestChainConfig,
|
||||
|
|
|
|||
|
|
@ -33,12 +33,12 @@ import (
|
|||
)
|
||||
|
||||
const (
|
||||
wsReadBuffer = 1024
|
||||
wsWriteBuffer = 1024
|
||||
wsReadBuffer = 10 * 1024 * 1024 // CHANGE(taiko): change to 10 * 1024 * 1024
|
||||
wsWriteBuffer = 10 * 1024 * 1024 // CHANGE(taiko): change to 10 * 1024 * 1024
|
||||
wsPingInterval = 30 * time.Second
|
||||
wsPingWriteTimeout = 5 * 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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue