@@ -618,34 +618,32 @@ func (c *ChainConfig) Description() string {
618
618
// makes sense for mainnet should be optional at printing to avoid bloating
619
619
// the output for testnets and private networks.
620
620
banner += "Pre-Merge hard forks (block based):\n "
621
- banner += fmt .Sprintf (" - Homestead: #%-8v (https://ethereum.github.io/execution-specs/src/ethereum/forks/homestead/__init__.py.html) \n " , c .HomesteadBlock )
621
+ banner += fmt .Sprintf (" - Homestead: #%-8v\n " , c .HomesteadBlock )
622
622
if c .DAOForkBlock != nil {
623
- banner += fmt .Sprintf (" - DAO Fork: #%-8v (https://ethereum.github.io/execution-specs/src/ethereum/forks/dao_fork/__init__.py.html) \n " , c .DAOForkBlock )
624
- }
625
- banner += fmt .Sprintf (" - Tangerine Whistle (EIP 150): #%-8v (https://ethereum.github.io/execution-specs/src/ethereum/forks/tangerine_whistle/__init__.py.html) \n " , c .EIP150Block )
626
- banner += fmt .Sprintf (" - Spurious Dragon/1 (EIP 155): #%-8v (https://ethereum.github.io/execution-specs/src/ethereum/forks/spurious_dragon/__init__.py.html) \n " , c .EIP155Block )
627
- banner += fmt .Sprintf (" - Spurious Dragon/2 (EIP 158): #%-8v (https://ethereum.github.io/execution-specs/src/ethereum/forks/spurious_dragon/__init__.py.html) \n " , c .EIP155Block )
628
- banner += fmt .Sprintf (" - Byzantium: #%-8v (https://ethereum.github.io/execution-specs/src/ethereum/forks/byzantium/__init__.py.html) \n " , c .ByzantiumBlock )
629
- banner += fmt .Sprintf (" - Constantinople: #%-8v (https://ethereum.github.io/execution-specs/src/ethereum/forks/constantinople/__init__.py.html) \n " , c .ConstantinopleBlock )
630
- banner += fmt .Sprintf (" - Petersburg: #%-8v (https://ethereum.github.io/execution-specs/src/ethereum/forks/constantinople/__init__.py.html) \n " , c .PetersburgBlock )
631
- banner += fmt .Sprintf (" - Istanbul: #%-8v (https://ethereum.github.io/execution-specs/src/ethereum/forks/istanbul/__init__.py.html) \n " , c .IstanbulBlock )
623
+ banner += fmt .Sprintf (" - DAO Fork: #%-8v\n " , c .DAOForkBlock )
624
+ }
625
+ banner += fmt .Sprintf (" - Tangerine Whistle (EIP 150): #%-8v\n " , c .EIP150Block )
626
+ banner += fmt .Sprintf (" - Spurious Dragon/1 (EIP 155): #%-8v\n " , c .EIP155Block )
627
+ banner += fmt .Sprintf (" - Spurious Dragon/2 (EIP 158): #%-8v\n " , c .EIP155Block )
628
+ banner += fmt .Sprintf (" - Byzantium: #%-8v\n " , c .ByzantiumBlock )
629
+ banner += fmt .Sprintf (" - Constantinople: #%-8v\n " , c .ConstantinopleBlock )
630
+ banner += fmt .Sprintf (" - Petersburg: #%-8v\n " , c .PetersburgBlock )
631
+ banner += fmt .Sprintf (" - Istanbul: #%-8v\n " , c .IstanbulBlock )
632
632
if c .MuirGlacierBlock != nil {
633
- banner += fmt .Sprintf (" - Muir Glacier: #%-8v (https://ethereum.github.io/execution-specs/src/ethereum/forks/muir_glacier/__init__.py.html) \n " , c .MuirGlacierBlock )
633
+ banner += fmt .Sprintf (" - Muir Glacier: #%-8v\n " , c .MuirGlacierBlock )
634
634
}
635
- banner += fmt .Sprintf (" - Berlin: #%-8v (https://ethereum.github.io/execution-specs/src/ethereum/forks/berlin/__init__.py.html) \n " , c .BerlinBlock )
636
- banner += fmt .Sprintf (" - London: #%-8v (https://ethereum.github.io/execution-specs/src/ethereum/forks/london/__init__.py.html) \n " , c .LondonBlock )
635
+ banner += fmt .Sprintf (" - Berlin: #%-8v\n " , c .BerlinBlock )
636
+ banner += fmt .Sprintf (" - London: #%-8v\n " , c .LondonBlock )
637
637
if c .ArrowGlacierBlock != nil {
638
- banner += fmt .Sprintf (" - Arrow Glacier: #%-8v (https://ethereum.github.io/execution-specs/src/ethereum/forks/arrow_glacier/__init__.py.html) \n " , c .ArrowGlacierBlock )
638
+ banner += fmt .Sprintf (" - Arrow Glacier: #%-8v\n " , c .ArrowGlacierBlock )
639
639
}
640
640
if c .GrayGlacierBlock != nil {
641
- banner += fmt .Sprintf (" - Gray Glacier: #%-8v (https://ethereum.github.io/execution-specs/src/ethereum/forks/gray_glacier/__init__.py.html) \n " , c .GrayGlacierBlock )
641
+ banner += fmt .Sprintf (" - Gray Glacier: #%-8v\n " , c .GrayGlacierBlock )
642
642
}
643
643
banner += "\n "
644
644
645
645
// Add a special section for the merge as it's non-obvious
646
646
banner += "Merge configured:\n "
647
- banner += " - Hard-fork specification: https://ethereum.github.io/execution-specs/src/ethereum/forks/paris/__init__.py.html\n "
648
- banner += " - Network known to be merged\n "
649
647
banner += fmt .Sprintf (" - Total terminal difficulty: %v\n " , c .TerminalTotalDifficulty )
650
648
if c .MergeNetsplitBlock != nil {
651
649
banner += fmt .Sprintf (" - Merge netsplit block: #%-8v\n " , c .MergeNetsplitBlock )
@@ -655,38 +653,39 @@ func (c *ChainConfig) Description() string {
655
653
// Create a list of forks post-merge
656
654
banner += "Post-Merge hard forks (timestamp based):\n "
657
655
if c .ShanghaiTime != nil {
658
- banner += fmt .Sprintf (" - Shanghai: @%-10v (https://ethereum.github.io/execution-specs/src/ethereum/forks/shanghai/__init__.py.html) \n " , * c .ShanghaiTime )
656
+ banner += fmt .Sprintf (" - Shanghai: @%-10v\n " , * c .ShanghaiTime )
659
657
}
660
658
if c .CancunTime != nil {
661
- banner += fmt .Sprintf (" - Cancun: @%-10v (https://ethereum.github.io/execution-specs/src/ethereum/forks/cancun/__init__.py.html )\n " , * c .CancunTime )
659
+ banner += fmt .Sprintf (" - Cancun: @%-10v blob: (%s )\n " , * c .CancunTime , c . BlobScheduleConfig . Cancun )
662
660
}
663
661
if c .PragueTime != nil {
664
- banner += fmt .Sprintf (" - Prague: @%-10v (https://ethereum.github.io/execution-specs/src/ethereum/forks/prague/__init__.py.html )\n " , * c .PragueTime )
662
+ banner += fmt .Sprintf (" - Prague: @%-10v blob: (%s )\n " , * c .PragueTime , c . BlobScheduleConfig . Prague )
665
663
}
666
664
if c .OsakaTime != nil {
667
- banner += fmt .Sprintf (" - Osaka: @%-10v (https://ethereum.github.io/execution-specs/src/ethereum/forks/osaka/__init__.py.html )\n " , * c .OsakaTime )
665
+ banner += fmt .Sprintf (" - Osaka: @%-10v blob: (%s )\n " , * c .OsakaTime , c . BlobScheduleConfig . Osaka )
668
666
}
669
667
if c .BPO1Time != nil {
670
- banner += fmt .Sprintf (" - BPO1: @%-10v\n " , * c .BPO1Time )
668
+ banner += fmt .Sprintf (" - BPO1: @%-10v blob: (%s) \n " , * c .BPO1Time , c . BlobScheduleConfig . BPO1 )
671
669
}
672
670
if c .BPO2Time != nil {
673
- banner += fmt .Sprintf (" - BPO2: @%-10v\n " , * c .BPO2Time )
671
+ banner += fmt .Sprintf (" - BPO2: @%-10v blob: (%s) \n " , * c .BPO2Time , c . BlobScheduleConfig . BPO2 )
674
672
}
675
673
if c .BPO3Time != nil {
676
- banner += fmt .Sprintf (" - BPO3: @%-10v\n " , * c .BPO3Time )
674
+ banner += fmt .Sprintf (" - BPO3: @%-10v blob: (%s) \n " , * c .BPO3Time , c . BlobScheduleConfig . BPO3 )
677
675
}
678
676
if c .BPO4Time != nil {
679
- banner += fmt .Sprintf (" - BPO4: @%-10v\n " , * c .BPO4Time )
677
+ banner += fmt .Sprintf (" - BPO4: @%-10v blob: (%s) \n " , * c .BPO4Time , c . BlobScheduleConfig . BPO4 )
680
678
}
681
679
if c .BPO5Time != nil {
682
- banner += fmt .Sprintf (" - BPO5: @%-10v\n " , * c .BPO5Time )
680
+ banner += fmt .Sprintf (" - BPO5: @%-10v blob: (%s) \n " , * c .BPO5Time , c . BlobScheduleConfig . BPO5 )
683
681
}
684
682
if c .AmsterdamTime != nil {
685
- banner += fmt .Sprintf (" - Amsterdam: @%-10v\n " , * c .AmsterdamTime )
683
+ banner += fmt .Sprintf (" - Amsterdam: @%-10v blob: (%s) \n " , * c .AmsterdamTime , c . BlobScheduleConfig . Amsterdam )
686
684
}
687
685
if c .VerkleTime != nil {
688
- banner += fmt .Sprintf (" - Verkle: @%-10v\n " , * c .VerkleTime )
686
+ banner += fmt .Sprintf (" - Verkle: @%-10v blob: (%s) \n " , * c .VerkleTime , c . BlobScheduleConfig . Verkle )
689
687
}
688
+ banner += fmt .Sprintf ("\n All fork specifications can be found at https://ethereum.github.io/execution-specs/src/ethereum/forks/\n " )
690
689
return banner
691
690
}
692
691
@@ -697,6 +696,14 @@ type BlobConfig struct {
697
696
UpdateFraction uint64 `json:"baseFeeUpdateFraction"`
698
697
}
699
698
699
+ // String implement fmt.Stringer, returning string format blob config.
700
+ func (bc * BlobConfig ) String () string {
701
+ if bc == nil {
702
+ return "nil"
703
+ }
704
+ return fmt .Sprintf ("target: %d, max: %d, fraction: %d" , bc .Target , bc .Max , bc .UpdateFraction )
705
+ }
706
+
700
707
// BlobScheduleConfig determines target and max number of blobs allow per fork.
701
708
type BlobScheduleConfig struct {
702
709
Cancun * BlobConfig `json:"cancun,omitempty"`
0 commit comments