Skip to content

Commit 7e84843

Browse files
authored
Merge pull request bnb-chain#3170 from bnb-chain/develop
Draft release v1.5.17
2 parents 38d8f62 + a7831f5 commit 7e84843

Some content is hidden

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

42 files changed

+516
-294
lines changed

.github/workflows/docker-release.yml

Lines changed: 99 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -5,47 +5,111 @@ on:
55
# Publish `v1.2.3` tags as releases.
66
tags:
77
- v*
8-
98
env:
10-
IMAGE_NAME: bsc
9+
REGISTRY: ghcr.io
10+
REGISTRY_IMAGE: ${{ github.repository }}
1111

1212
jobs:
13-
# Push image to GitHub Packages.
14-
push:
15-
runs-on: ubuntu-latest
16-
if: github.event_name == 'push'
17-
13+
build:
14+
strategy:
15+
matrix:
16+
include:
17+
- os: ubuntu-24.04
18+
platform_pair: linux-amd64
19+
- os: ubuntu-24.04-arm
20+
platform_pair: linux-arm64
21+
runs-on: ${{ matrix.os }}
1822
steps:
19-
- uses: actions/checkout@v3
2023

21-
- name: Build image
24+
- name: Checkout
25+
uses: actions/checkout@v4
26+
27+
- name: Set up Docker
28+
uses: docker/setup-docker-action@v4
29+
with:
30+
daemon-config: |
31+
{
32+
"features": {
33+
"containerd-snapshotter": true
34+
}
35+
}
36+
37+
- name: Docker meta
38+
id: meta
39+
uses: docker/metadata-action@v5
40+
with:
41+
images: |
42+
${{ env.REGISTRY }}/${{ env.REGISTRY_IMAGE }}
43+
labels: |
44+
org.opencontainers.image.licenses=LGPL-3.0,GPL-3.0
45+
46+
- name: Set up Docker Buildx
47+
uses: docker/setup-buildx-action@v3
48+
49+
- name: Login to GitHub Container Registry
50+
uses: docker/login-action@v3
51+
with:
52+
registry: ${{ env.REGISTRY }}
53+
username: ${{ github.actor }}
54+
password: ${{ secrets.PACKAGE_TOKEN }}
55+
56+
- name: Build and push
57+
id: build
58+
uses: docker/build-push-action@v6
59+
with:
60+
outputs: type=image,push-by-digest=true,name-canonical=true,push=true
61+
tags: ${{ env.REGISTRY }}/${{ env.REGISTRY_IMAGE }}
62+
labels: ${{ steps.meta.outputs.labels }}
63+
64+
- name: Export digest
2265
run: |
23-
docker build . \
24-
--label "org.opencontainers.image.source=${{ secrets.IMAGE_SOURCE }}" \
25-
--label "org.opencontainers.image.revision=$(git rev-parse HEAD)" \
26-
--label "org.opencontainers.image.version=$(git describe --tags --abbrev=0)" \
27-
--label "org.opencontainers.image.licenses=LGPL-3.0,GPL-3.0" \
28-
-f ./Dockerfile -t "${IMAGE_NAME}"
66+
mkdir -p ${{ runner.temp }}/digests
67+
digest="${{ steps.build.outputs.digest }}"
68+
touch "${{ runner.temp }}/digests/${digest#sha256:}"
69+
70+
- name: Upload digest
71+
uses: actions/upload-artifact@v4
72+
with:
73+
name: digests-${{ matrix.platform_pair }}
74+
path: ${{ runner.temp }}/digests/*
75+
if-no-files-found: error
76+
retention-days: 1
77+
merge:
78+
runs-on: ubuntu-latest
79+
needs:
80+
- build
81+
steps:
82+
- name: Download digests
83+
uses: actions/download-artifact@v4
84+
with:
85+
path: ${{ runner.temp }}/digests
86+
pattern: digests-*
87+
merge-multiple: true
2988

30-
- name: Log into registry
31-
run: echo "${{ secrets.PACKAGE_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
89+
- name: Login to GitHub Container Registry
90+
uses: docker/login-action@v3
91+
with:
92+
registry: ${{ env.REGISTRY }}
93+
username: ${{ github.actor }}
94+
password: ${{ secrets.PACKAGE_TOKEN }}
95+
96+
- name: Set up Docker Buildx
97+
uses: docker/setup-buildx-action@v3
98+
99+
- name: Docker meta
100+
id: meta
101+
uses: docker/metadata-action@v5
102+
with:
103+
images: ${{ env.REGISTRY }}/${{ env.REGISTRY_IMAGE }}
104+
tags: |
105+
type=semver,pattern={{version}}
106+
107+
- name: Create manifest list and push
108+
working-directory: ${{ runner.temp }}/digests
109+
run: |
110+
docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
111+
$(printf '${{ env.REGISTRY }}/${{ env.REGISTRY_IMAGE }}@sha256:%s ' *)
32112
33-
- name: Push image
113+
- name: Inspect image
34114
run: |
35-
IMAGE_ID=ghcr.io/${{ github.repository }}
36-
37-
# Change all uppercase to lowercase
38-
IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]')
39-
# Strip git ref prefix from version
40-
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
41-
# Strip "v" prefix from tag name
42-
[[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//')
43-
# Use Docker `latest` tag convention
44-
[ "$VERSION" == "master" ] && VERSION=latest
45-
echo IMAGE_ID=$IMAGE_ID
46-
echo VERSION=$VERSION
47-
docker tag $IMAGE_NAME $IMAGE_ID:$VERSION
48-
docker tag $IMAGE_NAME $IMAGE_ID:latest
49-
docker push $IMAGE_ID:$VERSION
50-
docker push $IMAGE_ID:latest
51-
115+
docker buildx imagetools inspect ${{ env.REGISTRY }}/${{ env.REGISTRY_IMAGE }}:${{ steps.meta.outputs.version }}

CHANGELOG.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,25 @@
11
# Changelog
2+
## v1.5.17
3+
### FEATURE
4+
[\#3141](https://github.com/bnb-chain/bsc/pull/3141) feat: support to disable txindexer;
5+
6+
### BUGFIX
7+
[\#3157](https://github.com/bnb-chain/bsc/pull/3157) build(deps): bump github.com/pion/interceptor from 0.1.37 to 0.1.39
8+
[\#3167](https://github.com/bnb-chain/bsc/pull/3167) eth: not begin to sync during processing broadcasted blocks or hash
9+
10+
### IMPROVEMENT
11+
[\#3140](https://github.com/bnb-chain/bsc/pull/3140) feat: remove gc restriction for large mem;
12+
[\#3135](https://github.com/bnb-chain/bsc/pull/3135) miner: simplify code for simulating bids
13+
[\#3151](https://github.com/bnb-chain/bsc/pull/3151) cmd/jsutils: add new builders for chapel net
14+
[\#3111](https://github.com/bnb-chain/bsc/pull/3111) config: default config values if not set in config.toml
15+
[\#3137](https://github.com/bnb-chain/bsc/pull/3137) Docker arm64 runners
16+
[\#3156](https://github.com/bnb-chain/bsc/pull/3156) vm: implement contract pool
17+
[\#3166](https://github.com/bnb-chain/bsc/pull/3166) chore: remove unused file
18+
[\#3164](https://github.com/bnb-chain/bsc/pull/3164) cmd/jsutils: add builders and improve output for getMevStatus
19+
[\#3139](https://github.com/bnb-chain/bsc/pull/3139) miner/worker: broadcast mined block immediately before wroten into db
20+
[\#3160](https://github.com/bnb-chain/bsc/pull/3160) miner: add more metrics for mev
21+
[\#3145](https://github.com/bnb-chain/bsc/pull/3145) miner: prefetch states for bids simulating
22+
223
## v1.5.16
324
### FEATURE
425
[\#3130](https://github.com/bnb-chain/bsc/pull/3130) config: update BSC Mainnet hardfork time: Maxwell

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ ENV CGO_CFLAGS_ALLOW="-O -D__BLST_PORTABLE__"
2020
RUN cd /go-ethereum && go run build/ci.go install -static ./cmd/geth
2121

2222
# Pull Geth into a second stage deploy alpine container
23-
FROM alpine:3.17
23+
FROM alpine:3.21
2424

2525
ARG BSC_USER=bsc
2626
ARG BSC_USER_UID=1000

cmd/geth/chaincmd.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ var (
6464
utils.OverridePassedForkTime,
6565
utils.OverrideLorentz,
6666
utils.OverrideMaxwell,
67+
utils.OverrideFermi,
6768
utils.OverrideVerkle,
6869
utils.MultiDataBaseFlag,
6970
}, utils.DatabaseFlags),
@@ -283,6 +284,10 @@ func initGenesis(ctx *cli.Context) error {
283284
v := ctx.Uint64(utils.OverrideMaxwell.Name)
284285
overrides.OverrideMaxwell = &v
285286
}
287+
if ctx.IsSet(utils.OverrideFermi.Name) {
288+
v := ctx.Uint64(utils.OverrideFermi.Name)
289+
overrides.OverrideFermi = &v
290+
}
286291
if ctx.IsSet(utils.OverrideVerkle.Name) {
287292
v := ctx.Uint64(utils.OverrideVerkle.Name)
288293
overrides.OverrideVerkle = &v

cmd/geth/config.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,10 @@ func makeFullNode(ctx *cli.Context) (*node.Node, ethapi.Backend) {
216216
v := ctx.Uint64(utils.OverrideMaxwell.Name)
217217
cfg.Eth.OverrideMaxwell = &v
218218
}
219+
if ctx.IsSet(utils.OverrideFermi.Name) {
220+
v := ctx.Uint64(utils.OverrideFermi.Name)
221+
cfg.Eth.OverrideFermi = &v
222+
}
219223
if ctx.IsSet(utils.OverrideVerkle.Name) {
220224
v := ctx.Uint64(utils.OverrideVerkle.Name)
221225
cfg.Eth.OverrideVerkle = &v

cmd/geth/main.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ var (
7676
utils.OverridePassedForkTime,
7777
utils.OverrideLorentz,
7878
utils.OverrideMaxwell,
79+
utils.OverrideFermi,
7980
utils.OverrideVerkle,
8081
utils.OverrideFullImmutabilityThreshold,
8182
utils.OverrideMinBlocksForBlobRequests,

cmd/jsutils/getchainstatus.js

Lines changed: 24 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -247,17 +247,25 @@ const builderMap = new Map([
247247
["0xb49f86586a840AB9920D2f340a85586E50FD30a2", "inblock eu"],
248248
["0x0F6D8b72F3687de6f2824903a83B3ba13c0e88A0", "inblock us"],
249249
// nodereal
250-
["0x79102dB16781ddDfF63F301C9Be557Fd1Dd48fA0", "nodereal ap x"],
250+
["0x79102dB16781ddDfF63F301C9Be557Fd1Dd48fA0", "nodereal ap"],
251251
["0xd0d56b330a0dea077208b96910ce452fd77e1b6f", "nodereal eu"],
252252
["0x4f24ce4cd03a6503de97cf139af2c26347930b99", "nodereal us"],
253253
// xzbuilder
254254
["0x812720cb4639550D7BDb1d8F2be463F4a9663762", "xzbuilder"],
255255

256256
// Chapel
257257
["0x627fE6AFA2E84e461CB7AE7C2c46e8adf9a954a2", "txboost"],
258-
["0x5EC60f73f938e36400ec3CC3Ff4d7a7703F7c005", "nodereal ap y"],
259-
// ["0x4827b423D03a349b7519Dda537e9A28d31ecBB48", "puissant y"],
260-
["0x0eAbBdE133fbF3c5eB2BEE6F7c8210deEAA0f7db", "blockrazor"],
258+
["0x5EC60f73f938e36400ec3CC3Ff4d7a7703F7c005", "nodereal ap"],
259+
["0x6C98EB21139F6E12db5b78a4AeD4d8eBA147FB7b", "nodereal eu"],
260+
// ["0x79102dB16781ddDfF63F301C9Be557Fd1Dd48fA0", "nodereal us"],
261+
["0x4827b423D03a349b7519Dda537e9A28d31ecBB48", "club48 ap"],
262+
["0x48B2665E5E9a343409199D70F7495c8aB660BB48", "club48 eu"],
263+
["0x48B4bBEbF0655557A461e91B8905b85864B8BB48", "club48 us"],
264+
["0x0eAbBdE133fbF3c5eB2BEE6F7c8210deEAA0f7db", "blockrazor ap"],
265+
["0x95c8436143c82Ea4d3529A3ed8DDa9998F6daC5F", "blockrazor eu"],
266+
["0xb71Ba9e570ee20E983De1d5aE01baf5dCB4e4299", "blockrazor us"],
267+
["0x7b3ee856c98b1bb3689ef7f90477df2927fcbdb6", "trustnet"],
268+
["0xA8caEc0D68a90Ac971EA1aDEFA1747447e1f9871", "blockroute"],
261269
]);
262270

263271
// 1.cmd: "GetMaxTxCountInBlockRange", usage:
@@ -749,16 +757,7 @@ async function getEip7623() {
749757
async function getMevStatus() {
750758
let counts = {
751759
local: 0,
752-
blockrazor: 0,
753-
puissant: 0,
754-
blockroute: 0,
755-
jetbldr: 0,
756-
txboost: 0,
757-
blockbus: 0,
758-
darwin: 0,
759-
inblock: 0,
760-
nodereal: 0,
761-
xzbuilder: 0,
760+
...Object.fromEntries([...new Set(builderMap.values())].map(builder => [builder, 0]))
762761
};
763762

764763
// Get the latest block number
@@ -813,11 +812,7 @@ async function getMevStatus() {
813812
for (const txData of txResults) {
814813
if (builderMap.has(txData.to)) {
815814
const builder = builderMap.get(txData.to);
816-
const builderKey = Object.keys(counts).find(key => builder.includes(key));
817-
818-
if (builderKey) {
819-
counts[builderKey]++;
820-
}
815+
counts[builder]++;
821816

822817
mevBlock = true;
823818
console.log(
@@ -844,10 +839,16 @@ async function getMevStatus() {
844839
console.log(`Range: [${startBlock}, ${endBlock}]`);
845840
console.log(`Total Blocks: ${total}`);
846841
console.log("\nBuilder Distribution:");
847-
Object.entries(counts).forEach(([key, value]) => {
848-
const ratio = (value *100 / total).toFixed(2);
849-
console.log(`${key.padEnd(10)}: ${value.toString().padStart(3)} blocks (${ratio}%)`);
850-
});
842+
const localRatio = (counts.local * 100 / total).toFixed(2);
843+
console.log(`${"local".padEnd(maxBuilderLength)}: ${counts.local.toString().padStart(3)} blocks (${localRatio}%)`);
844+
845+
Object.entries(counts)
846+
.filter(([key, value]) => key !== "local" && value > 0)
847+
.sort(([a], [b]) => a.localeCompare(b))
848+
.forEach(([key, value]) => {
849+
const ratio = (value * 100 / total).toFixed(2);
850+
console.log(`${key.padEnd(maxBuilderLength)}: ${value.toString().padStart(3)} blocks (${ratio}%)`);
851+
});
851852
}
852853

853854
// 11.cmd: "getLargeTxs", usage:

cmd/utils/flags.go

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -311,6 +311,11 @@ var (
311311
Usage: "Manually specify the Maxwell fork timestamp, overriding the bundled setting",
312312
Category: flags.EthCategory,
313313
}
314+
OverrideFermi = &cli.Uint64Flag{
315+
Name: "override.fermi",
316+
Usage: "Manually specify the Fermi fork timestamp, overriding the bundled setting",
317+
Category: flags.EthCategory,
318+
}
314319
OverrideVerkle = &cli.Uint64Flag{
315320
Name: "override.verkle",
316321
Usage: "Manually specify the Verkle fork timestamp, overriding the bundled setting",
@@ -826,6 +831,7 @@ var (
826831
Value: strings.Join(node.DefaultConfig.GraphQLVirtualHosts, ","),
827832
Category: flags.APICategory,
828833
}
834+
829835
WSEnabledFlag = &cli.BoolFlag{
830836
Name: "ws",
831837
Usage: "Enable the WS-RPC server",
@@ -2025,12 +2031,17 @@ func SetEthConfig(ctx *cli.Context, stack *node.Node, cfg *ethconfig.Config) {
20252031
ctx.Set(CacheFlag.Name, strconv.Itoa(allowance))
20262032
}
20272033
}
2028-
// Ensure Go's GC ignores the database cache for trigger percentage
2029-
cache := ctx.Int(CacheFlag.Name)
2030-
gogc := math.Max(20, math.Min(100, 100/(float64(cache)/1024)))
2034+
// if the total memory is greater than 64GB, skip the GC trigger sanitization
2035+
if err == nil && int(mem.Total/1024/1024) > 64000 {
2036+
log.Info("Skipping Go's GC trigger sanitization", "total", mem.Total/1024/1024)
2037+
} else {
2038+
// Ensure Go's GC ignores the database cache for trigger percentage
2039+
cache := ctx.Int(CacheFlag.Name)
2040+
gogc := math.Max(20, math.Min(100, 100/(float64(cache)/1024)))
20312041

2032-
log.Debug("Sanitizing Go's GC trigger", "percent", int(gogc))
2033-
godebug.SetGCPercent(int(gogc))
2042+
log.Info("Sanitizing Go's GC trigger", "percent", int(gogc))
2043+
godebug.SetGCPercent(int(gogc))
2044+
}
20342045

20352046
if ctx.IsSet(SyncTargetFlag.Name) {
20362047
cfg.SyncMode = ethconfig.FullSync // dev sync target forces full sync
@@ -2491,7 +2502,7 @@ func parseMiningFeatures(ctx *cli.Context, cfg *ethconfig.Config) string {
24912502
return ""
24922503
}
24932504
var features []string
2494-
if cfg.Miner.Mev.Enabled {
2505+
if cfg.Miner.Mev.Enabled != nil && *cfg.Miner.Mev.Enabled {
24952506
features = append(features, "MEV")
24962507
}
24972508
if cfg.Miner.VoteEnable {

consensus/misc/eip4844/eip4844.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ func CalcExcessBlobGas(config *params.ChainConfig, parent *types.Header, headTim
8383
func CalcBlobFee(config *params.ChainConfig, header *types.Header) *big.Int {
8484
var frac uint64
8585
switch config.LatestFork(header.Time) {
86-
case forks.Maxwell, forks.Lorentz, forks.Prague:
86+
case forks.Fermi, forks.Maxwell, forks.Lorentz, forks.Prague:
8787
frac = config.BlobScheduleConfig.Prague.UpdateFraction
8888
case forks.Cancun:
8989
frac = config.BlobScheduleConfig.Cancun.UpdateFraction

0 commit comments

Comments
 (0)