Skip to content

Commit 5f13e10

Browse files
authored
Merge pull request bnb-chain#2876 from bnb-chain/develop
Draft release v1.5.5
2 parents 33226b8 + dbd2973 commit 5f13e10

File tree

301 files changed

+9126
-5440
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

301 files changed

+9126
-5440
lines changed

.golangci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@
33
run:
44
timeout: 20m
55
tests: true
6-
# default is true. Enables skipping of directories:
7-
# vendor$, third_party$, testdata$, examples$, Godeps$, builtin$
8-
skip-dirs-use-default: true
96

107
output:
118
format: colored-line-number
@@ -57,6 +54,9 @@ linters-settings:
5754
exclude: [""]
5855

5956
issues:
57+
# default is true. Enables skipping of directories:
58+
# vendor$, third_party$, testdata$, examples$, Godeps$, builtin$
59+
exclude-dirs-use-default: true
6060
exclude-files:
6161
- core/genesis_alloc.go
6262
exclude-rules:

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
before_install:
2626
- export DOCKER_CLI_EXPERIMENTAL=enabled
2727
script:
28-
- go run build/ci.go dockerx -platform "linux/amd64,linux/arm64,linux/riscv64" -upload ethereum/client-go
28+
- go run build/ci.go dockerx -platform "linux/amd64,linux/arm64,linux/riscv64" -hub ethereum/client-go -upload
2929

3030
# This builder does the Linux Azure uploads
3131
- stage: build

CHANGELOG.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,20 @@
11
# Changelog
2+
## v1.5.5
3+
v1.5.5 mainly did a upstream code sync, it catches up to Geth of date around 5th-Feb-2025 to sync the latest Praque hard fork changes, see: https://github.com/bnb-chain/bsc/pull/2856
4+
5+
Besides the code sync, there are a few improvement PRs of BSC:
6+
### IMPROVEMENT
7+
* [\#2846](https://github.com/bnb-chain/bsc/pull/2846) tracing: pass *tracing.Hooks around instead of vm.Config
8+
* [\#2850](https://github.com/bnb-chain/bsc/pull/2850) metric: revert default expensive metrics in blockchain
9+
* [\#2851](https://github.com/bnb-chain/bsc/pull/2851) eth/tracers: fix call nil OnSystemTxFixIntrinsicGas
10+
* [\#2862](https://github.com/bnb-chain/bsc/pull/2862) cmd/jsutils/getchainstatus.js: add GetEip7623
11+
* [\#2867](https://github.com/bnb-chain/bsc/pull/2867) p2p: lowered log lvl for failed enr request
12+
13+
## v1.5.4
14+
### BUGFIX
15+
* [\#2874](https://github.com/bnb-chain/bsc/pull/2874) crypto: add IsOnCurve check
16+
17+
218
## v1.5.3
319
### BUGFIX
420
* [\#2827](https://github.com/bnb-chain/bsc/pull/2827) triedb/pathdb: fix nil field for stateSet

README.md

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -205,19 +205,18 @@ you'd expect.
205205

206206
HTTP based JSON-RPC API options:
207207

208-
* `--http` Enable the HTTP-RPC server
209-
* `--http.addr` HTTP-RPC server listening interface (default: `localhost`)
210-
* `--http.port` HTTP-RPC server listening port (default: `8545`)
211-
* `--http.api` API's offered over the HTTP-RPC interface (default: `eth,net,web3`)
212-
* `--http.corsdomain` Comma separated list of domains from which to accept cross origin requests (browser enforced)
213-
* `--ws` Enable the WS-RPC server
214-
* `--ws.addr` WS-RPC server listening interface (default: `localhost`)
215-
* `--ws.port` WS-RPC server listening port (default: `8546`)
216-
* `--ws.api` API's offered over the WS-RPC interface (default: `eth,net,web3`)
217-
* `--ws.origins` Origins from which to accept WebSocket requests
218-
* `--ipcdisable` Disable the IPC-RPC server
219-
* `--ipcapi` API's offered over the IPC-RPC interface (default: `admin,debug,eth,miner,net,personal,txpool,web3`)
220-
* `--ipcpath` Filename for IPC socket/pipe within the datadir (explicit paths escape it)
208+
* `--http` Enable the HTTP-RPC server
209+
* `--http.addr` HTTP-RPC server listening interface (default: `localhost`)
210+
* `--http.port` HTTP-RPC server listening port (default: `8545`)
211+
* `--http.api` API's offered over the HTTP-RPC interface (default: `eth,net,web3`)
212+
* `--http.corsdomain` Comma separated list of domains from which to accept cross-origin requests (browser enforced)
213+
* `--ws` Enable the WS-RPC server
214+
* `--ws.addr` WS-RPC server listening interface (default: `localhost`)
215+
* `--ws.port` WS-RPC server listening port (default: `8546`)
216+
* `--ws.api` API's offered over the WS-RPC interface (default: `eth,net,web3`)
217+
* `--ws.origins` Origins from which to accept WebSocket requests
218+
* `--ipcdisable` Disable the IPC-RPC server
219+
* `--ipcpath` Filename for IPC socket/pipe within the datadir (explicit paths escape it)
221220

222221
You'll need to use your own programming environments' capabilities (libraries, tools, etc) to
223222
connect via HTTP, WS or IPC to a `geth` node configured with the above flags and you'll

accounts/abi/bind/bind_test.go

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2140,19 +2140,13 @@ func TestGolangBindings(t *testing.T) {
21402140
t.Fatalf("failed to replace tendermint dependency to bnb-chain source: %v\n%s", err, out)
21412141
}
21422142

2143-
replacer = exec.Command(gocmd, "mod", "edit", "-x", "-require", "github.com/cometbft/cometbft@v0.0.0", "-replace", "github.com/cometbft/cometbft=github.com/bnb-chain/greenfield-tendermint@v0.0.0-20230417032003-4cda1f296fb2") // Repo root
2143+
replacer = exec.Command(gocmd, "mod", "edit", "-x", "-require", "github.com/cometbft/cometbft@v0.0.0", "-replace", "github.com/cometbft/cometbft=github.com/bnb-chain/greenfield-cometbft@v1.3.1") // Repo root
21442144
replacer.Dir = pkg
21452145
if out, err := replacer.CombinedOutput(); err != nil {
21462146
t.Fatalf("failed to replace cometbft dependency to bnb-chain source: %v\n%s", err, out)
21472147
}
21482148

2149-
replacer = exec.Command(gocmd, "mod", "edit", "-x", "-require", "github.com/syndtr/goleveldb@v1.0.1", "-replace", "github.com/syndtr/goleveldb=github.com/syndtr/goleveldb@v1.0.1-0.20210819022825-2ae1ddf74ef7")
2150-
replacer.Dir = pkg
2151-
if out, err := replacer.CombinedOutput(); err != nil {
2152-
t.Fatalf("failed to replace cometbft dependency to bnb-chain source: %v\n%s", err, out)
2153-
}
2154-
2155-
tidier := exec.Command(gocmd, "mod", "tidy", "-compat=1.21")
2149+
tidier := exec.Command(gocmd, "mod", "tidy")
21562150
tidier.Dir = pkg
21572151
if out, err := tidier.CombinedOutput(); err != nil {
21582152
t.Fatalf("failed to tidy Go module file: %v\n%s", err, out)

accounts/abi/bind/util.go

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,18 @@ import (
3030
// WaitMined waits for tx to be mined on the blockchain.
3131
// It stops waiting when the context is canceled.
3232
func WaitMined(ctx context.Context, b DeployBackend, tx *types.Transaction) (*types.Receipt, error) {
33+
return WaitMinedHash(ctx, b, tx.Hash())
34+
}
35+
36+
// WaitMinedHash waits for a transaction with the provided hash to be mined on the blockchain.
37+
// It stops waiting when the context is canceled.
38+
func WaitMinedHash(ctx context.Context, b DeployBackend, hash common.Hash) (*types.Receipt, error) {
3339
queryTicker := time.NewTicker(time.Second)
3440
defer queryTicker.Stop()
3541

36-
logger := log.New("hash", tx.Hash())
42+
logger := log.New("hash", hash)
3743
for {
38-
receipt, err := b.TransactionReceipt(ctx, tx.Hash())
44+
receipt, err := b.TransactionReceipt(ctx, hash)
3945
if err == nil {
4046
return receipt, nil
4147
}
@@ -61,7 +67,13 @@ func WaitDeployed(ctx context.Context, b DeployBackend, tx *types.Transaction) (
6167
if tx.To() != nil {
6268
return common.Address{}, errors.New("tx is not contract creation")
6369
}
64-
receipt, err := WaitMined(ctx, b, tx)
70+
return WaitDeployedHash(ctx, b, tx.Hash())
71+
}
72+
73+
// WaitDeployedHash waits for a contract deployment transaction with the provided hash and returns the on-chain
74+
// contract address when it is mined. It stops waiting when ctx is canceled.
75+
func WaitDeployedHash(ctx context.Context, b DeployBackend, hash common.Hash) (common.Address, error) {
76+
receipt, err := WaitMinedHash(ctx, b, hash)
6577
if err != nil {
6678
return common.Address{}, err
6779
}

accounts/accounts.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,9 @@ const (
215215
// of starting any background processes such as automatic key derivation.
216216
WalletOpened
217217

218-
// WalletDropped
218+
// WalletDropped is fired when a wallet is removed or disconnected, either via USB
219+
// or due to a filesystem event in the keystore. This event indicates that the wallet
220+
// is no longer available for operations.
219221
WalletDropped
220222
)
221223

accounts/usbwallet/hub.go

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -73,26 +73,22 @@ func NewLedgerHub() (*Hub, error) {
7373
return newHub(LedgerScheme, 0x2c97, []uint16{
7474

7575
// Device definitions taken from
76-
// https://github.com/LedgerHQ/ledger-live/blob/38012bc8899e0f07149ea9cfe7e64b2c146bc92b/libs/ledgerjs/packages/devices/src/index.ts
76+
// https://github.com/LedgerHQ/ledger-live/blob/595cb73b7e6622dbbcfc11867082ddc886f1bf01/libs/ledgerjs/packages/devices/src/index.ts
7777

7878
// Original product IDs
7979
0x0000, /* Ledger Blue */
8080
0x0001, /* Ledger Nano S */
8181
0x0004, /* Ledger Nano X */
8282
0x0005, /* Ledger Nano S Plus */
8383
0x0006, /* Ledger Nano FTS */
84-
85-
0x0015, /* HID + U2F + WebUSB Ledger Blue */
86-
0x1015, /* HID + U2F + WebUSB Ledger Nano S */
87-
0x4015, /* HID + U2F + WebUSB Ledger Nano X */
88-
0x5015, /* HID + U2F + WebUSB Ledger Nano S Plus */
89-
0x6015, /* HID + U2F + WebUSB Ledger Nano FTS */
90-
91-
0x0011, /* HID + WebUSB Ledger Blue */
92-
0x1011, /* HID + WebUSB Ledger Nano S */
93-
0x4011, /* HID + WebUSB Ledger Nano X */
94-
0x5011, /* HID + WebUSB Ledger Nano S Plus */
95-
0x6011, /* HID + WebUSB Ledger Nano FTS */
84+
0x0007, /* Ledger Flex */
85+
86+
0x0000, /* WebUSB Ledger Blue */
87+
0x1000, /* WebUSB Ledger Nano S */
88+
0x4000, /* WebUSB Ledger Nano X */
89+
0x5000, /* WebUSB Ledger Nano S Plus */
90+
0x6000, /* WebUSB Ledger Nano FTS */
91+
0x7000, /* WebUSB Ledger Flex */
9692
}, 0xffa0, 0, newLedgerDriver)
9793
}
9894

@@ -185,8 +181,11 @@ func (hub *Hub) refreshWallets() {
185181

186182
for _, info := range infos {
187183
for _, id := range hub.productIDs {
184+
// We check both the raw ProductID (legacy) and just the upper byte, as Ledger
185+
// uses `MMII`, encoding a model (MM) and an interface bitfield (II)
186+
mmOnly := info.ProductID & 0xff00
188187
// Windows and Macos use UsageID matching, Linux uses Interface matching
189-
if info.ProductID == id && (info.UsagePage == hub.usageID || info.Interface == hub.endpointID) {
188+
if (info.ProductID == id || mmOnly == id) && (info.UsagePage == hub.usageID || info.Interface == hub.endpointID) {
190189
devices = append(devices, info)
191190
break
192191
}

0 commit comments

Comments
 (0)