Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

implement enough aura consensus to follow chain #4

Draft
wants to merge 31 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
c74a5c5
save current state
gballet Dec 21, 2023
73b0e33
regenerate posdao contract bindings
gballet Dec 21, 2023
e401555
more build fixes
gballet Dec 21, 2023
5cff4c0
more build fixes
gballet Dec 21, 2023
5888c4b
more build fixes
gballet Dec 21, 2023
06cb619
fix simple name
gballet Dec 21, 2023
d182e6e
fix more build errors
gballet Dec 21, 2023
31f514d
39 build errors to go!
gballet Dec 21, 2023
d3c3189
fix build
gballet Dec 22, 2023
5b83e41
add chiado chainspec
gballet Dec 22, 2023
f9b401d
start import from #3
gballet Dec 24, 2023
3ff4cea
forkid hack
gballet Dec 24, 2023
569851f
genesis init
gballet Dec 24, 2023
acdf741
base fee collector
gballet Dec 24, 2023
e0f40e5
only apply max code size check after shanghai
gballet Dec 24, 2023
f9b7984
handshake hack
gballet Dec 24, 2023
9d20215
add bootnodes to list
gballet Dec 24, 2023
8b59beb
add TTD + banner info
gballet Dec 24, 2023
4d39269
fix: create the correct genesis
gballet Dec 29, 2023
e671567
fix: duplicate field
gballet Dec 29, 2023
4f2b78b
a few bug fixes found during my tests
gballet Jan 3, 2024
f99b31a
more error fixes
gballet Jan 3, 2024
bff9d0a
fixes to run through up to 6M blocks and counting
gballet Feb 7, 2024
4f94872
fix eip1559FeeCollector location in config
gballet Feb 15, 2024
fb7fbb2
config fix + support post london free txs
gballet Mar 6, 2024
b5bef5a
fix contract rewrite decoding
gballet Mar 9, 2024
50224cb
fix resume-time panic when still in aura mode
gballet Mar 9, 2024
0ad6a31
speedup: hardcode forkblock to determine if pos is active
gballet Mar 11, 2024
7af3d47
add withdrawals contract to config
gballet Mar 12, 2024
ce38b7e
add cancun time
gballet Mar 15, 2024
db2ecbb
fix post-dencun sync
gballet Apr 3, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 43 additions & 1 deletion cmd/utils/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,16 @@ var (
Usage: "Holesky network: pre-configured proof-of-stake test network",
Category: flags.EthCategory,
}
GnosisChainFlag = &cli.BoolFlag{
Name: "gnosis",
Usage: "Gnosis chain network: pre-configured merged proof-of-authority test network",
Category: flags.EthCategory,
}
ChiadoFlag = &cli.BoolFlag{
Name: "chiado",
Usage: "Chiado network: pre-configured merged proof-of-authority test network",
Category: flags.EthCategory,
}
// Dev mode
DeveloperFlag = &cli.BoolFlag{
Name: "dev",
Expand Down Expand Up @@ -916,6 +926,8 @@ var (
GoerliFlag,
SepoliaFlag,
HoleskyFlag,
GnosisChainFlag,
ChiadoFlag,
}
// NetworkFlags is the flag group of all built-in supported networks.
NetworkFlags = append([]cli.Flag{MainnetFlag}, TestnetFlags...)
Expand Down Expand Up @@ -945,6 +957,12 @@ func MakeDataDir(ctx *cli.Context) string {
if ctx.Bool(HoleskyFlag.Name) {
return filepath.Join(path, "holesky")
}
if ctx.Bool(GnosisChainFlag.Name) {
return filepath.Join(path, "gnosis")
}
if ctx.Bool(ChiadoFlag.Name) {
return filepath.Join(path, "chiado")
}
return path
}
Fatalf("Cannot determine default data directory, please set manually (--datadir)")
Expand Down Expand Up @@ -1007,6 +1025,10 @@ func setBootstrapNodes(ctx *cli.Context, cfg *p2p.Config) {
urls = params.SepoliaBootnodes
case ctx.Bool(GoerliFlag.Name):
urls = params.GoerliBootnodes
case ctx.Bool(GnosisChainFlag.Name):
urls = params.GnosisBootnodes
case ctx.Bool(ChiadoFlag.Name):
urls = params.ChiadoBootnodes
}
}
cfg.BootstrapNodes = mustParseBootnodes(urls)
Expand Down Expand Up @@ -1434,6 +1456,10 @@ func SetDataDir(ctx *cli.Context, cfg *node.Config) {
cfg.DataDir = filepath.Join(node.DefaultDataDir(), "sepolia")
case ctx.Bool(HoleskyFlag.Name) && cfg.DataDir == node.DefaultDataDir():
cfg.DataDir = filepath.Join(node.DefaultDataDir(), "holesky")
case ctx.Bool(GnosisChainFlag.Name) && cfg.DataDir == node.DefaultDataDir():
cfg.DataDir = filepath.Join(node.DefaultDataDir(), "gnosis")
case ctx.Bool(ChiadoFlag.Name) && cfg.DataDir == node.DefaultDataDir():
cfg.DataDir = filepath.Join(node.DefaultDataDir(), "chiado")
}
}

Expand Down Expand Up @@ -1585,7 +1611,7 @@ func CheckExclusive(ctx *cli.Context, args ...interface{}) {
// SetEthConfig applies eth-related command line flags to the config.
func SetEthConfig(ctx *cli.Context, stack *node.Node, cfg *ethconfig.Config) {
// Avoid conflicting network flags
CheckExclusive(ctx, MainnetFlag, DeveloperFlag, GoerliFlag, SepoliaFlag, HoleskyFlag)
CheckExclusive(ctx, MainnetFlag, DeveloperFlag, GoerliFlag, SepoliaFlag, HoleskyFlag, ChiadoFlag, GnosisChainFlag)
CheckExclusive(ctx, DeveloperFlag, ExternalSignerFlag) // Can't use both ephemeral unlocked and external signer

// Set configurations from CLI flags
Expand Down Expand Up @@ -1754,6 +1780,18 @@ func SetEthConfig(ctx *cli.Context, stack *node.Node, cfg *ethconfig.Config) {
}
cfg.Genesis = core.DefaultGoerliGenesisBlock()
SetDNSDiscoveryDefaults(cfg, params.GoerliGenesisHash)
case ctx.Bool(GnosisChainFlag.Name):
if !ctx.IsSet(NetworkIdFlag.Name) {
cfg.NetworkId = 100
}
cfg.Genesis = core.DefaultGnosisGenesisBlock()
SetDNSDiscoveryDefaults(cfg, params.GnosisGenesisHash)
case ctx.Bool(ChiadoFlag.Name):
if !ctx.IsSet(NetworkIdFlag.Name) {
cfg.NetworkId = 10200
}
cfg.Genesis = core.DefaultChiadoGenesisBlock()
SetDNSDiscoveryDefaults(cfg, params.ChiadoGenesisHash)
case ctx.Bool(DeveloperFlag.Name):
if !ctx.IsSet(NetworkIdFlag.Name) {
cfg.NetworkId = 1337
Expand Down Expand Up @@ -2063,6 +2101,10 @@ func MakeGenesis(ctx *cli.Context) *core.Genesis {
genesis = core.DefaultSepoliaGenesisBlock()
case ctx.Bool(GoerliFlag.Name):
genesis = core.DefaultGoerliGenesisBlock()
case ctx.Bool(GnosisChainFlag.Name):
genesis = core.DefaultGnosisGenesisBlock()
case ctx.Bool(ChiadoFlag.Name):
genesis = core.DefaultChiadoGenesisBlock()
case ctx.Bool(DeveloperFlag.Name):
Fatalf("Developer chains are ephemeral")
}
Expand Down
Loading