Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
275b981
miner: optimize clear up logic for envs
buddh0 Apr 18, 2025
e812c99
BEP-524: Short Block Interval Phase Two: 0.75 seconds (#3019)
buddh0 Apr 18, 2025
c6ef049
Revert "miner: limit block size to eth protocol msg size (#2696)" (#3…
buddh0 Apr 21, 2025
a781930
chore: fix some comments (#3038)
dropbigfish Apr 21, 2025
4dbbf25
feat: add json-rpc-api.md (#3041)
zlacfzy Apr 23, 2025
e1c61c6
params: double FullImmutabilityThreshold for BEP-520
buddh0 Apr 23, 2025
1432933
params: double FullImmutabilityThreshold for BEP-524
buddh0 Apr 23, 2025
a6a7624
rpc/json-rpc-api.md: add eth_simulateV1 (#3046)
zlacfzy Apr 24, 2025
beecac5
ethclient: add BlobBaseFee method (#31290)
islishude Mar 1, 2025
e5b424e
eth/tracers: fix omitempty for memory and storage (#31289)
s1na Mar 4, 2025
98fc6ca
accounts/abi: improve unpack performance (#31387)
MariusVanDerWijden Mar 14, 2025
b0197e3
log: fix SetDefault for custom loggers (#31368)
StephenButtolph Mar 14, 2025
d95bad1
ethclient: Add EstimateGasAtBlock[Hash] to estimate against a specifi…
PlasmaPower Mar 18, 2025
b27dda1
core/types: reduce allocs in transaction signing (#31258)
MariusVanDerWijden Mar 19, 2025
c32bb98
core/txpool/legacypool: reject gapped tx from delegated account (#31430)
rjl493456442 Mar 20, 2025
d9e608a
internal/ethapi: return code 3 from call/estimateGas even if a revert…
jwasinger Mar 23, 2025
66efb9f
internal/ethapi: exclude 7702 authorities from result in eth_createAc…
sashabeton Mar 25, 2025
a5d39a4
accounts/abi: include access-list in gas estimation (#31394)
protolambda Mar 26, 2025
f55f838
internal/ethapi: CreateAccessList with stateOverrides (#31497)
georgehao Mar 27, 2025
8708564
core/txpool/legacypool: fix data race in checkDelegationLimit (#31475)
rekyyang Mar 28, 2025
15edffc
eth/protocols/eth: improve over/underflow handling in `GetBlockHeade…
antonis19 Apr 3, 2025
8bdd48f
core, eth, node: use sync write option in pebble (#31519)
rjl493456442 Apr 3, 2025
9b60724
core/vm: optimize push2 opcode (#31267)
MariusVanDerWijden Apr 8, 2025
1a70203
internal/debug: add debug_setMemoryLimit (#31441)
georgehao Apr 22, 2025
9e5d766
ethclient: allow passing AuthorizationList to calls (#31198) (#3048)
buddh0 Apr 24, 2025
d14f05e
ethclient: fix testStatusFunctions
buddh0 Apr 24, 2025
e2ed06e
miner: fix memory leak caused by no discard env (#3050)
buddh0 Apr 24, 2025
9110432
miner: fix init for bidsToSim
buddh0 Apr 25, 2025
2cd4e7a
eth/protocols/bsc: adjust vote reception limit (#3057)
buddh0 Apr 25, 2025
b6ae4ff
Merge pull request #3049 from buddh0/upstream-pick-prs
zzzckck Apr 28, 2025
d924a81
Feature: StakeHub Contract Interface Implementation (#3045)
MatusKysel Apr 28, 2025
61cb07c
bsc: add new block fetching mechanism; (#3040)
galaio Apr 29, 2025
21f6888
p2p: support new msg broadcast features; (#3043)
galaio Apr 30, 2025
bb50509
ethclient/gethclient: add deduplication and max keys limit to GetProo…
MatusKysel May 6, 2025
3ca5cbf
rpc: add method name length limit and configurable message size limit…
MatusKysel May 6, 2025
c94d20e
release: prepare for release v1.5.12 (#3069)
zzzckck May 6, 2025
1895c1f
chore: renaming for evn and some optmization; (#3070)
galaio May 6, 2025
d2a2c40
evn: add support for node id removal (#3073)
MatusKysel May 8, 2025
9933742
chore: support more evn configuration in tool; (#3072)
galaio May 8, 2025
ff97c48
config: apply two default miner option (#3075)
zzzckck May 9, 2025
24bfb45
performance: track large tx execution cost (#3077)
zzzckck May 12, 2025
eaebb81
jsutils: add tool GetLargeTxs (#3074)
zzzckck May 12, 2025
25da4b0
metrics: optimize mev metrics (#3082)
zzzckck May 12, 2025
33cc103
miner: reset recommit timer on new block (#3081)
zzzckck May 12, 2025
70945db
refactor: use slices.Contains to simplify code (#3062)
hardlydearly May 12, 2025
01c3c07
evn: improve node ID management with better error handling (#3083)
MatusKysel May 12, 2025
a2370d7
metrics: add more monitor metrics for EVN; (#3084)
galaio May 12, 2025
454470f
chore: remove accidentally committed geth executable (#3080)
abicky May 12, 2025
9f4b966
p2p: fix bscExt checking logic;
galaio May 13, 2025
1a72a96
bsc2: fix block sidecar fetching issue; (#3087)
galaio May 14, 2025
d173fee
core/vote: change waiting blocks for voting since start mining (#3088)
buddh0 May 14, 2025
9fb2090
core/systemcontracts: remove lorentz/rialto (#3089)
buddh0 May 15, 2025
7561889
chore: update maxwell contrats addresses (#3090)
MatusKysel May 15, 2025
1a054c4
chore: fix several occasional issues for EVN; (#3091)
galaio May 15, 2025
75b208c
miner: fix goroutine leak (#3085)
ironbeer May 15, 2025
a6f09de
config: update BSC Testnet hardfork time: Maxwell (#3096)
zzzckck May 16, 2025
c4d82c3
release: prepare for release v1.5.13 (#3095)
zzzckck May 16, 2025
e01c338
Merge pull request #3094 from bnb-chain/develop
alex-10072 May 16, 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
43 changes: 43 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,47 @@
# Changelog
## v1.5.13
### FEATURE
[\#3019](https://github.com/bnb-chain/bsc/pull/3019) BEP-524: Short Block Interval Phase Two: 0.75 seconds
[\#3044](https://github.com/bnb-chain/bsc/pull/3044) params: double FullImmutabilityThreshold for BEP-520 & BEP-524
[\#3045](https://github.com/bnb-chain/bsc/pull/3045) Feature: StakeHub Contract Interface Implementation
[\#3040](https://github.com/bnb-chain/bsc/pull/3040) bsc: add new block fetching mechanism
[\#3043](https://github.com/bnb-chain/bsc/pull/3043) p2p: support new msg broadcast features
[\#3070](https://github.com/bnb-chain/bsc/pull/3070) chore: renaming for evn and some optmization
[\#3073](https://github.com/bnb-chain/bsc/pull/3073) evn: add support for node id removal
[\#3072](https://github.com/bnb-chain/bsc/pull/3072) config: support more evn configuration in tool
[\#3075](https://github.com/bnb-chain/bsc/pull/3075) config: apply two default miner option
[\#3083](https://github.com/bnb-chain/bsc/pull/3083) evn: improve node ID management with better error handling
[\#3084](https://github.com/bnb-chain/bsc/pull/3084) metrics: add more monitor metrics for EVN
[\#3087](https://github.com/bnb-chain/bsc/pull/3087) bsc2: fix block sidecar fetching issue
[\#3090](https://github.com/bnb-chain/bsc/pull/3090) chore: update maxwell contrats addresses
[\#3091](https://github.com/bnb-chain/bsc/pull/3091) chore: fix several occasional issues for EVN
[\#3049](https://github.com/bnb-chain/bsc/pull/3049) upstream: pick bugfix and feature from latest geth v1.5.9
[\#3096](https://github.com/bnb-chain/bsc/pull/3096) config: update BSC Testnet hardfork time: Maxwell

### BUGFIX
[\#3050](https://github.com/bnb-chain/bsc/pull/3050) miner: fix memory leak caused by no discard env
[\#3061](https://github.com/bnb-chain/bsc/pull/3061) p2p: fix bscExt checking logic

### IMPROVEMENT
[\#3034](https://github.com/bnb-chain/bsc/pull/3034) miner: optimize clear up logic for envs
[\#3039](https://github.com/bnb-chain/bsc/pull/3039) Revert "miner: limit block size to eth protocol msg size (#2696)"
[\#3041](https://github.com/bnb-chain/bsc/pull/3041) feat: add json-rpc-api.md
[\#3057](https://github.com/bnb-chain/bsc/pull/3057) eth/protocols/bsc: adjust vote reception limit
[\#3067](https://github.com/bnb-chain/bsc/pull/3067) ethclient/gethclient: add deduplication and max keys limit to GetProof
[\#3063](https://github.com/bnb-chain/bsc/pull/3063) rpc: add method name length limit and configurable message size limit
[\#3077](https://github.com/bnb-chain/bsc/pull/3077) performance: track large tx execution cost
[\#3074](https://github.com/bnb-chain/bsc/pull/3074) jsutils: add tool GetLargeTxs
[\#3082](https://github.com/bnb-chain/bsc/pull/3082) metrics: optimize mev metrics
[\#3081](https://github.com/bnb-chain/bsc/pull/3081) miner: reset recommit timer on new block
[\#3062](https://github.com/bnb-chain/bsc/pull/3062) refactor: use slices.Contains to simplify code
[\#3088](https://github.com/bnb-chain/bsc/pull/3088) core/vote: change waiting blocks for voting since start mining
[\#3089](https://github.com/bnb-chain/bsc/pull/3089) core/systemcontracts: remove lorentz/rialto
[\#3085](https://github.com/bnb-chain/bsc/pull/0000) miner: fix goroutine leak

## v1.5.12
### BUGFIX
[\#3057](https://github.com/bnb-chain/bsc/pull/3057) eth/protocols/bsc: adjust vote reception limit

## v1.5.11
### FEATURE
[\#3008](https://github.com/bnb-chain/bsc/pull/3008) params: add MaxwellTime
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

The goal of BNB Smart Chain is to bring programmability and interoperability to BNB Beacon Chain. In order to embrace the existing popular community and advanced technology, it will bring huge benefits by staying compatible with all the existing smart contracts on Ethereum and Ethereum tooling. And to achieve that, the easiest solution is to develop based on go-ethereum fork, as we respect the great work of Ethereum very much.

BNB Smart Chain starts its development based on go-ethereum fork. So you may see many toolings, binaries and also docs are based on Ethereum ones, such as the name geth.
BNB Smart Chain starts its development based on go-ethereum fork. So you may see many toolings, binaries and also docs are based on Ethereum ones, such as the name "geth".

[![API Reference](
https://pkg.go.dev/badge/github.com/ethereum/go-ethereum
Expand Down Expand Up @@ -194,8 +194,8 @@ $ geth --your-favourite-flags dumpconfig

As a developer, sooner rather than later you'll want to start interacting with `geth` and the
BSC network via your own programs and not manually through the console. To aid
this, `geth` has built-in support for a JSON-RPC based APIs ([standard APIs](https://ethereum.github.io/execution-apis/api-documentation/)
and [`geth` specific APIs](https://geth.ethereum.org/docs/interacting-with-geth/rpc)).
this, `geth` has built-in support for a JSON-RPC based APIs ([standard APIs](https://ethereum.github.io/execution-apis/api-documentation/),
[`geth` specific APIs](https://geth.ethereum.org/docs/interacting-with-geth/rpc), and [BSC's JSON-RPC API Reference](rpc/json-rpc-api.md)).
These can be exposed via HTTP, WebSockets and IPC (UNIX sockets on UNIX based
platforms, and named pipes on Windows).

Expand Down
33 changes: 20 additions & 13 deletions accounts/abi/argument.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,18 +77,18 @@ func (arguments Arguments) isTuple() bool {
}

// Unpack performs the operation hexdata -> Go format.
func (arguments Arguments) Unpack(data []byte) ([]interface{}, error) {
func (arguments Arguments) Unpack(data []byte) ([]any, error) {
if len(data) == 0 {
if len(arguments.NonIndexed()) != 0 {
return nil, errors.New("abi: attempting to unmarshal an empty string while arguments are expected")
}
return make([]interface{}, 0), nil
return make([]any, 0), nil
}
return arguments.UnpackValues(data)
}

// UnpackIntoMap performs the operation hexdata -> mapping of argument name to argument value.
func (arguments Arguments) UnpackIntoMap(v map[string]interface{}, data []byte) error {
func (arguments Arguments) UnpackIntoMap(v map[string]any, data []byte) error {
// Make sure map is not nil
if v == nil {
return errors.New("abi: cannot unpack into a nil map")
Expand All @@ -110,7 +110,7 @@ func (arguments Arguments) UnpackIntoMap(v map[string]interface{}, data []byte)
}

// Copy performs the operation go format -> provided struct.
func (arguments Arguments) Copy(v interface{}, values []interface{}) error {
func (arguments Arguments) Copy(v any, values []any) error {
// make sure the passed value is arguments pointer
if reflect.Ptr != reflect.ValueOf(v).Kind() {
return fmt.Errorf("abi: Unpack(non-pointer %T)", v)
Expand All @@ -128,7 +128,7 @@ func (arguments Arguments) Copy(v interface{}, values []interface{}) error {
}

// copyAtomic copies ( hexdata -> go ) a single value
func (arguments Arguments) copyAtomic(v interface{}, marshalledValues interface{}) error {
func (arguments Arguments) copyAtomic(v any, marshalledValues any) error {
dst := reflect.ValueOf(v).Elem()
src := reflect.ValueOf(marshalledValues)

Expand All @@ -139,7 +139,7 @@ func (arguments Arguments) copyAtomic(v interface{}, marshalledValues interface{
}

// copyTuple copies a batch of values from marshalledValues to v.
func (arguments Arguments) copyTuple(v interface{}, marshalledValues []interface{}) error {
func (arguments Arguments) copyTuple(v any, marshalledValues []any) error {
value := reflect.ValueOf(v).Elem()
nonIndexedArgs := arguments.NonIndexed()

Expand Down Expand Up @@ -181,11 +181,17 @@ func (arguments Arguments) copyTuple(v interface{}, marshalledValues []interface
// UnpackValues can be used to unpack ABI-encoded hexdata according to the ABI-specification,
// without supplying a struct to unpack into. Instead, this method returns a list containing the
// values. An atomic argument will be a list with one element.
func (arguments Arguments) UnpackValues(data []byte) ([]interface{}, error) {
nonIndexedArgs := arguments.NonIndexed()
retval := make([]interface{}, 0, len(nonIndexedArgs))
virtualArgs := 0
for index, arg := range nonIndexedArgs {
func (arguments Arguments) UnpackValues(data []byte) ([]any, error) {
var (
retval = make([]any, 0)
virtualArgs = 0
index = 0
)

for _, arg := range arguments {
if arg.Indexed {
continue
}
marshalledValue, err := toGoType((index+virtualArgs)*32, arg.Type, data)
if err != nil {
return nil, err
Expand All @@ -208,18 +214,19 @@ func (arguments Arguments) UnpackValues(data []byte) ([]interface{}, error) {
virtualArgs += getTypeSize(arg.Type)/32 - 1
}
retval = append(retval, marshalledValue)
index++
}
return retval, nil
}

// PackValues performs the operation Go format -> Hexdata.
// It is the semantic opposite of UnpackValues.
func (arguments Arguments) PackValues(args []interface{}) ([]byte, error) {
func (arguments Arguments) PackValues(args []any) ([]byte, error) {
return arguments.Pack(args...)
}

// Pack performs the operation Go format -> Hexdata.
func (arguments Arguments) Pack(args ...interface{}) ([]byte, error) {
func (arguments Arguments) Pack(args ...any) ([]byte, error) {
// Make sure arguments match up and pack them
abiArgs := arguments
if len(args) != len(abiArgs) {
Expand Down
15 changes: 8 additions & 7 deletions accounts/abi/bind/base.go
Original file line number Diff line number Diff line change
Expand Up @@ -366,13 +366,14 @@ func (c *BoundContract) estimateGasLimit(opts *TransactOpts, contract *common.Ad
}
}
msg := ethereum.CallMsg{
From: opts.From,
To: contract,
GasPrice: gasPrice,
GasTipCap: gasTipCap,
GasFeeCap: gasFeeCap,
Value: value,
Data: input,
From: opts.From,
To: contract,
GasPrice: gasPrice,
GasTipCap: gasTipCap,
GasFeeCap: gasFeeCap,
Value: value,
Data: input,
AccessList: opts.AccessList,
}
return c.transactor.EstimateGas(ensureContext(opts.Context), msg)
}
Expand Down
40 changes: 40 additions & 0 deletions accounts/abi/unpack_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,46 @@ import (
"github.com/stretchr/testify/require"
)

func BenchmarkUnpack(b *testing.B) {
testCases := []struct {
def string
packed string
}{
{
def: `[{"type": "uint32"}]`,
packed: "0000000000000000000000000000000000000000000000000000000000000001",
},
{
def: `[{"type": "uint32[]"}]`,
packed: "0000000000000000000000000000000000000000000000000000000000000020" +
"0000000000000000000000000000000000000000000000000000000000000002" +
"0000000000000000000000000000000000000000000000000000000000000001" +
"0000000000000000000000000000000000000000000000000000000000000002",
},
}
for i, test := range testCases {
b.Run(strconv.Itoa(i), func(b *testing.B) {
def := fmt.Sprintf(`[{ "name" : "method", "type": "function", "outputs": %s}]`, test.def)
abi, err := JSON(strings.NewReader(def))
if err != nil {
b.Fatalf("invalid ABI definition %s: %v", def, err)
}
encb, err := hex.DecodeString(test.packed)
if err != nil {
b.Fatalf("invalid hex %s: %v", test.packed, err)
}

b.ResetTimer()

var result any
for range b.N {
result, _ = abi.Unpack("method", encb)
}
_ = result
})
}
}

// TestUnpack tests the general pack/unpack tests in packing_test.go
func TestUnpack(t *testing.T) {
t.Parallel()
Expand Down
Loading
Loading