Skip to content

Commit

Permalink
Merge tag 'v1.4.15' into release/bsc-1.x-fh2.5
Browse files Browse the repository at this point in the history
Via commit 'ec318b9c9789eb91904b9c6fbc5e3a91c64e3d21' due to tag conflicts.

# Conflicts:
#	.github/workflows/pre-release.yml
#	.github/workflows/release.yml
#	CHANGELOG.md
#	README.md
#	params/version.go
  • Loading branch information
maoueh committed Sep 24, 2024
2 parents 6750f1b + ec318b9 commit 864da0e
Show file tree
Hide file tree
Showing 39 changed files with 1,069 additions and 188 deletions.
186 changes: 186 additions & 0 deletions .github/workflows/pre-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,186 @@
name: Pre Release

on:
push:
# Publish `pre-v1.2.3` tags as releases.
tags:
- 'pre-*'

env:
CGO_CFLAGS: "-O -D__BLST_PORTABLE__"
CGO_CFLAGS_ALLOW: "-O -D__BLST_PORTABLE__"

jobs:
build:
name: Build Release
strategy:
matrix:
go-version: [1.21.x]
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout Code
uses: actions/checkout@v3

- name: Install Go
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}

- uses: actions/cache@v3
with:
# In order:
# * Module download cache
# * Build cache (Linux)
# * Build cache (Mac)
# * Build cache (Windows)
path: |
~/go/pkg/mod
~/.cache/go-build
~/Library/Caches/go-build
~\AppData\Local\go-build
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
# ==============================
# Linux/Macos/Windows Build
# ==============================

- name: Build Binary for ${{matrix.os}}
if: matrix.os == 'ubuntu-latest'
run: |
go mod download
wget https://musl.cc/x86_64-linux-musl-cross.tgz
tar -xvf ./x86_64-linux-musl-cross.tgz
GIT_COMMIT=$(git rev-parse HEAD)
GIT_COMMIT_DATE=$(git log -n1 --pretty='format:%cd' --date=format:'%Y%m%d')
GOOS=linux GOARCH=amd64 CGO_ENABLED=1 CC=$(pwd)/x86_64-linux-musl-cross/bin/x86_64-linux-musl-gcc go build -ldflags "-X main.gitCommit=$GIT_COMMIT -X main.gitDate=$GIT_COMMIT_DATE -extldflags=-static" -o ./build/bin/geth -a ./cmd/geth
- name: Build Binary for ${{matrix.os}}
if: matrix.os != 'ubuntu-latest'
run: |
go mod download
make geth
# ==============================
# Cross Compile for ARM
# ==============================

- name: Build Binary for ARM
if: matrix.os == 'ubuntu-latest'
run: |
go mod download
wget https://musl.cc/aarch64-linux-musl-cross.tgz
tar -xvf ./aarch64-linux-musl-cross.tgz
GIT_COMMIT=$(git rev-parse HEAD)
GIT_COMMIT_DATE=$(git log -n1 --pretty='format:%cd' --date=format:'%Y%m%d')
GOOS=linux GOARCH=arm64 CGO_ENABLED=1 CC=$(pwd)/aarch64-linux-musl-cross/bin/aarch64-linux-musl-gcc go build -ldflags "-X main.gitCommit=$GIT_COMMIT -X main.gitDate=$GIT_COMMIT_DATE -extldflags=-static" -o ./build/bin/geth-linux-arm64 -a ./cmd/geth
# ==============================
# Upload artifacts
# ==============================

- name: Upload Linux Build
uses: actions/[email protected]
if: matrix.os == 'ubuntu-latest'
with:
name: linux
path: ./build/bin/geth

- name: Upload MacOS Build
uses: actions/[email protected]
if: matrix.os == 'macos-latest'
with:
name: macos
path: ./build/bin/geth

- name: Upload Windows Build
uses: actions/[email protected]
if: matrix.os == 'windows-latest'
with:
name: windows
path: ./build/bin/geth.exe

- name: Upload ARM-64 Build
uses: actions/[email protected]
if: matrix.os == 'ubuntu-latest'
with:
name: arm64
path: ./build/bin/geth-linux-arm64

release:
name: Release
needs: build
runs-on: ubuntu-latest
steps:
- name: Set Env
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV

- name: Checkout Code
uses: actions/checkout@v3

# ==============================
# Download artifacts
# ==============================

- name: Download Artifacts
uses: actions/[email protected]
with:
name: linux
path: ./linux

- name: Download Artifacts
uses: actions/[email protected]
with:
name: macos
path: ./macos

- name: Download Artifacts
uses: actions/[email protected]
with:
name: windows
path: ./windows

- name: Download Artifacts
uses: actions/[email protected]
with:
name: arm64
path: ./arm64

- name: Download Config File
run: |
. ./.github/release.env
echo "mainnet.zip url: $MAINNET_FILE_URL"
echo "testnet.zip url: $TESTNET_FILE_URL"
curl -L $MAINNET_FILE_URL -o ./mainnet.zip
curl -L $TESTNET_FILE_URL -o ./testnet.zip
# ==============================
# Create release
# ==============================

# Rename assets
- run: |
mv ./linux/geth ./linux/geth_linux
mv ./macos/geth ./macos/geth_macos
mv ./windows/geth.exe ./windows/geth_windows.exe
- name: Create Release
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
tag_name: ${{ env.RELEASE_VERSION}}
release_name: ${{ env.RELEASE_VERSION}}
body: |
versing: ${{ env.RELEASE_VERSION}}
git commit: ${{ github.sha }}
draft: true
prerelease: true
files: |
./mainnet.zip
./testnet.zip
./linux/geth_linux
./macos/geth_macos
./windows/geth_windows.exe
./arm64/geth-linux-arm64
40 changes: 26 additions & 14 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,29 +65,29 @@ jobs:
# CGO_ENABLED=1 GOOS=linux GOARCH=arm64 go build -ldflags "-X main.gitCommit=$GIT_COMMIT -X main.gitDate=$GIT_COMMIT_DATE -extldflags=-static" -o ./build/bin/geth-linux-arm64 -a ./cmd/geth

- name: Upload Linux Build
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4.3.3
if: matrix.os == 'ubuntu-20.04'
with:
name: linux
path: ./build/bin/geth

- name: Upload MacOS Build
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4.3.3
if: matrix.os == 'macos-latest'
with:
name: macos
path: ./build/bin/geth

# - name: Upload Windows Build
# uses: actions/upload-artifact@v3
# uses: actions/upload-artifact@v4.3.3
# if: matrix.os == 'windows-latest'
# with:
# name: windows
# path: ./build/bin/geth.exe

# - name: Upload ARM-64 Build
# uses: actions/upload-artifact@v3
# if: matrix.os == 'ubuntu-20.04'
# uses: actions/upload-artifact@v4.3.3
# if: matrix.os == 'ubuntu-latest'
# with:
# name: arm64
# path: ./build/bin/geth-linux-arm64
Expand All @@ -104,29 +104,39 @@ jobs:
uses: actions/checkout@v3

- name: Download Artifacts
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4.1.7
with:
name: linux
path: ./linux

- name: Download Artifacts
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4.1.7
with:
name: macos
path: ./macos

# - name: Download Artifacts
# uses: actions/download-artifact@v3
# uses: actions/download-artifact@v4.1.7
# with:
# name: windows
# path: ./windows

# - name: Download Artifacts
# uses: actions/download-artifact@v3
# uses: actions/download-artifact@v4.1.7
# with:
# name: arm64
# path: ./arm64

# - name: Download Config File
# run: |
# . ./.github/release.env
# echo "mainnet.zip url: $MAINNET_FILE_URL"
# echo "testnet.zip url: $TESTNET_FILE_URL"
# curl -L $MAINNET_FILE_URL -o ./mainnet.zip
# curl -L $TESTNET_FILE_URL -o ./testnet.zip
# ==============================
# Create release
# ==============================
- name: Generate Change Log
id: changelog
run: |
Expand All @@ -146,19 +156,21 @@ jobs:
- run: ls

- name: Create Release
id: create_release
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
tag_name: ${{ env.RELEASE_VERSION }}
release_name: ${{ env.RELEASE_VERSION }}
tag_name: ${{ env.RELEASE_VERSION}}
release_name: ${{ env.RELEASE_VERSION}}
body: |
${{ env.CHANGELOG }}
draft: false
prerelease: false
files: |
./linux/geth_linux
./macos/geth_macos
# ./arm64/geth-linux-arm64
# ./mainnet.zip
# ./testnet.zip
# ./windows/geth_windows.exe
# ./arm64/geth-linux-arm64
1 change: 1 addition & 0 deletions .nancy-ignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
CVE-2024-34478 # "CWE-754: Improper Check for Unusual or Exceptional Conditions." This vulnerability is BTC only, BSC does not have the issue.
CVE-2024-6104 # "CWE-532: Information Exposure Through Log Files" This is caused by the vulnerabilities [email protected], it is only used in cmd devp2p, impact is limited. will upgrade to v0.7.7 later
CVE-2024-8421 # "CWE-400: Uncontrolled Resource Consumption (Resource Exhaustion)" This vulnerability is caused by issues in the golang.org/x/net package. Even the latest version(v0.29.0) has not yet addressed it, but we will continue to monitor updates closely.
22 changes: 22 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,26 @@
# Changelog
## v1.4.15
### BUGFIX
* [\#2680](https://github.com/bnb-chain/bsc/pull/2680) txpool: apply miner's gasceil to txpool
* [\#2688](https://github.com/bnb-chain/bsc/pull/2688) txpool: set default GasCeil from 30M to 0
* [\#2696](https://github.com/bnb-chain/bsc/pull/2696) miner: limit block size to eth protocol msg size
* [\#2684](https://github.com/bnb-chain/bsc/pull/2684) eth: Add sidecars when available to broadcasted current block

### FEATURE
* [\#2672](https://github.com/bnb-chain/bsc/pull/2672) faucet: with mainnet balance check, 0.002BNB at least
* [\#2678](https://github.com/bnb-chain/bsc/pull/2678) beaconserver: simulated beacon api server for op-stack
* [\#2687](https://github.com/bnb-chain/bsc/pull/2687) faucet: support customized token
* [\#2698](https://github.com/bnb-chain/bsc/pull/2698) faucet: add example for custimized token
* [\#2706](https://github.com/bnb-chain/bsc/pull/2706) faucet: update DIN token faucet support

### IMPROVEMENT
* [\#2677](https://github.com/bnb-chain/bsc/pull/2677) log: add some p2p log
* [\#2679](https://github.com/bnb-chain/bsc/pull/2679) build(deps): bump actions/download-artifact in /.github/workflows
* [\#2662](https://github.com/bnb-chain/bsc/pull/2662) metrics: add some extra feature flags as node stats
* [\#2675](https://github.com/bnb-chain/bsc/pull/2675) fetcher: Sleep after marking block as done when requeuing
* [\#2695](https://github.com/bnb-chain/bsc/pull/2695) CI: nancy ignore CVE-2024-8421
* [\#2689](https://github.com/bnb-chain/bsc/pull/2689) consensus/parlia: wait more time when processing huge blocks

## v1.4.14

### BUGFIX
Expand Down
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ geth:
@echo "Done building."
@echo "Run \"$(GOBIN)/geth\" to launch geth."

#? faucet: Build faucet
faucet:
$(GORUN) build/ci.go install ./cmd/faucet
@echo "Done building faucet"

#? all: Build all packages and executables
all:
$(GORUN) build/ci.go install
Expand Down
Loading

0 comments on commit 864da0e

Please sign in to comment.