Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
bdd1f47
update 1.9.25
Frozen Mar 7, 2025
3a7f8a8
update 1.9.25
Frozen Mar 7, 2025
77ee026
update 1.9.25
Frozen Mar 7, 2025
ac3ecbd
update 1.9.25
Frozen Mar 7, 2025
4a7864c
Fixed code
Frozen Mar 7, 2025
3a88164
Fixed StructLog
Frozen Mar 7, 2025
44d5e10
compiled
Frozen Mar 10, 2025
daf7807
BlockContext
Frozen Mar 12, 2025
275090e
Fixed interpreter.
Frozen Mar 13, 2025
0b900a8
Fixed tests partially.
Frozen Mar 15, 2025
cc75c04
Passed unit tests.
Frozen Mar 17, 2025
bb4b8ec
Fixed imports
Frozen Mar 18, 2025
49ab9c0
Removed commented block
Frozen Mar 24, 2025
90d95f9
Fixed StructLog initialization
Frozen Mar 26, 2025
a9cba13
Fixed formatting
Frozen Mar 26, 2025
d406aa2
Removed unused
Frozen Mar 26, 2025
4282af8
Fixed code generation
Frozen Mar 26, 2025
b18ef83
Removed intpool
Frozen Mar 27, 2025
b73c149
Fixed rpc override.go
Frozen Mar 27, 2025
aa80e91
Fixed rpc override_test.go
Frozen Mar 28, 2025
78c844a
refactor blocking connection gater
GheisMohammadi May 18, 2025
bbaddd1
merge default gater into blocking gater to fix multi gater conflicts …
GheisMohammadi May 18, 2025
14e4000
fix gater tests, add data store creation to gater tests
GheisMohammadi May 18, 2025
815001d
refactor p2p host gater initialization, add new blocking gater to p2p…
GheisMohammadi May 18, 2025
1aaa220
new block v4, new header field called BaseFee
Frozen Feb 16, 2025
f76f19b
Fixed config usage.
Frozen Feb 24, 2025
ce81779
Fixed merge error.
Frozen May 27, 2025
d15664d
Opcode for basefee
Frozen May 31, 2025
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
3 changes: 3 additions & 0 deletions block/factory/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
v1 "github.com/harmony-one/harmony/block/v1"
v2 "github.com/harmony-one/harmony/block/v2"
v3 "github.com/harmony-one/harmony/block/v3"
v4 "github.com/harmony-one/harmony/block/v4"
"github.com/harmony-one/harmony/internal/params"
)

Expand All @@ -30,6 +31,8 @@ func NewFactory(chainConfig *params.ChainConfig) Factory {
func (f *factory) NewHeader(epoch *big.Int) *block.Header {
var impl blockif.Header
switch {
case f.chainConfig.IsLondon(epoch):
impl = v4.NewHeader()
case f.chainConfig.IsPreStaking(epoch) || f.chainConfig.IsStaking(epoch):
impl = v3.NewHeader()
case f.chainConfig.IsCrossLink(epoch):
Expand Down
4 changes: 4 additions & 0 deletions block/interface/header.go
Original file line number Diff line number Diff line change
Expand Up @@ -236,4 +236,8 @@ type Header interface {
// SetSlashes sets the RLP-encoded form of slashes
// It stores a copy; the caller may freely modify the original.
SetSlashes(newSlashes []byte)

BaseFee() *big.Int

SetBaseFee(newBaseFee *big.Int)
}
12 changes: 12 additions & 0 deletions block/v0/header.go
Original file line number Diff line number Diff line change
Expand Up @@ -445,3 +445,15 @@ func (h *Header) Copy() blockif.Header {
cpy := *h
return &cpy
}

// BaseFee returns the base fee of the block.
func (h *Header) BaseFee() *big.Int {
return nil
}

// SetBaseFee sets the base fee of the block.
func (h *Header) SetBaseFee(newBaseFee *big.Int) {
h.Logger(utils.Logger()).Warn().
Str("baseFee", newBaseFee.String()).
Msg("cannot store base fee in V0 header")
}
11 changes: 11 additions & 0 deletions block/v1/header.go
Original file line number Diff line number Diff line change
Expand Up @@ -429,3 +429,14 @@ func (h *Header) Copy() blockif.Header {
cpy := *h
return &cpy
}

// BaseFee returns the base fee of the header.
func (h *Header) BaseFee() *big.Int {
return nil
}

// SetBaseFee sets the base fee of the header.
func (h *Header) SetBaseFee(newBaseFee *big.Int) {
h.Logger(utils.Logger()).Error().
Msg("cannot store base fee in V1 header")
}
11 changes: 11 additions & 0 deletions block/v2/header.go
Original file line number Diff line number Diff line change
Expand Up @@ -428,3 +428,14 @@ func (h *Header) Copy() blockif.Header {
cpy := *h
return &cpy
}

// BaseFee returns the base fee of the block.
func (h *Header) BaseFee() *big.Int {
return nil
}

// SetBaseFee sets the base fee of the block.
func (h *Header) SetBaseFee(newBaseFee *big.Int) {
h.Logger(utils.Logger()).Error().
Msg("cannot store base fee in V2 header")
}
12 changes: 12 additions & 0 deletions block/v3/header.go
Original file line number Diff line number Diff line change
Expand Up @@ -422,3 +422,15 @@ func (h *Header) Copy() blockif.Header {
cpy := *h
return &cpy
}

// BaseFee returns the base fee of the header.
func (h *Header) BaseFee() *big.Int {
return nil
}

// SetBaseFee sets the base fee of the header.
func (h *Header) SetBaseFee(newBaseFee *big.Int) {
h.Logger(utils.Logger()).Warn().
Str("baseFee", newBaseFee.String()).
Msg("cannot store BaseFee in V3 header")
}
Loading