Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

release v1.1.6 #591

Merged
merged 5 commits into from
Nov 29, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .github/generate_change_log.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ while read line; do
if [[ $line == *"$version_prefix"* ]] && [ $start == 1 ]; then
break;
fi
if [ $start == 1 ] && [[ $line != "" ]]; then
if [ $start == 1 ]; then
CHANGE_LOG+="$line\n"
fi
done < ${change_log_file}
Expand Down
183 changes: 183 additions & 0 deletions .github/workflows/pre-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,183 @@
name: Pre Release

on:
push:
tags:
- 'pre-*'

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

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

- uses: actions/cache@v2
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
%LocalAppData%\go-build
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-

# ==============================
# Linux/Macos/Windows Build
# ==============================

- name: Build Binary for ${{matrix.os}}
run: make geth

# ==============================
# Upload artifacts
# ==============================

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

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

- name: Upload Windows Build
uses: actions/upload-artifact@v2
if: matrix.os == 'windows-2019'
with:
name: windows
path: ./build/bin/geth.exe

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

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

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

- name: Download Artifacts
uses: actions/download-artifact@v2
with:
name: linux
path: ./linux

- name: Download Artifacts
uses: actions/download-artifact@v2
with:
name: macos
path: ./macos

- name: Download Artifacts
uses: actions/download-artifact@v2
with:
name: windows
path: ./windows

- 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: Create Release
id: create_release
uses: actions/create-release@latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
body: |
versing: ${{ env.RELEASE_VERSION}}
git commit: ${{ github.sha }}
draft: true
prerelease: true

# Check downloaded files
- run: ls

- name: Upload Release Asset - Linux
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: ./linux/geth
asset_name: geth_linux
asset_content_type: application/octet-stream

- name: Upload Release Asset - MacOS
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: ./macos/geth
asset_name: geth_mac
asset_content_type: application/octet-stream

- name: Upload Release Asset - Windows
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: ./windows/geth.exe
asset_name: geth_windows.exe
asset_content_type: application/octet-stream

- name: Upload Release Asset - MAINNET.ZIP
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: ./mainnet.zip
asset_name: mainnet.zip
asset_content_type: application/zip

- name: Upload Release Asset - TESTNET.ZIP
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: ./testnet.zip
asset_name: testnet.zip
asset_content_type: application/zip
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ jobs:
os: [ubuntu-18.04, macos-11, windows-2019]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout Code
uses: actions/checkout@v2

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

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

- uses: actions/cache@v2
with:
# In order:
Expand Down
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,15 @@
# Changelog

## v1.1.6
BUGFIX
* [\#582](https://github.com/binance-chain/bsc/pull/582) the DoS vulnerabilities fixed in go-ethereum v1.10.9

IMPROVEMENT
* [\#578](https://github.com/binance-chain/bsc/pull/578) reduce memory allocation and upgrade snappy version

FEATURES
* [\#570](https://github.com/binance-chain/bsc/pull/570) reannounce local pending transactions

## v1.1.5
BUGFIX
* [\#509](https://github.com/binance-chain/bsc/pull/509) fix graceful shutdown bug
Expand Down
1 change: 1 addition & 0 deletions cmd/geth/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ var (
utils.TxPoolAccountQueueFlag,
utils.TxPoolGlobalQueueFlag,
utils.TxPoolLifetimeFlag,
utils.TxPoolReannounceTimeFlag,
utils.SyncModeFlag,
utils.ExitWhenSyncedFlag,
utils.GCModeFlag,
Expand Down
1 change: 1 addition & 0 deletions cmd/geth/usage.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ var AppHelpFlagGroups = []flags.FlagGroup{
utils.TxPoolAccountQueueFlag,
utils.TxPoolGlobalQueueFlag,
utils.TxPoolLifetimeFlag,
utils.TxPoolReannounceTimeFlag,
},
},
{
Expand Down
8 changes: 8 additions & 0 deletions cmd/utils/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -398,6 +398,11 @@ var (
Usage: "Maximum amount of time non-executable transaction are queued",
Value: ethconfig.Defaults.TxPool.Lifetime,
}
TxPoolReannounceTimeFlag = cli.DurationFlag{
Name: "txpool.reannouncetime",
Usage: "Duration for announcing local pending transactions again (default = 10 years, minimum = 1 minute)",
Value: ethconfig.Defaults.TxPool.ReannounceTime,
}
// Performance tuning settings
CacheFlag = cli.IntFlag{
Name: "cache",
Expand Down Expand Up @@ -1410,6 +1415,9 @@ func setTxPool(ctx *cli.Context, cfg *core.TxPoolConfig) {
if ctx.GlobalIsSet(TxPoolLifetimeFlag.Name) {
cfg.Lifetime = ctx.GlobalDuration(TxPoolLifetimeFlag.Name)
}
if ctx.GlobalIsSet(TxPoolReannounceTimeFlag.Name) {
cfg.ReannounceTime = ctx.GlobalDuration(TxPoolReannounceTimeFlag.Name)
}
}

func setEthash(ctx *cli.Context, cfg *ethconfig.Config) {
Expand Down
3 changes: 3 additions & 0 deletions core/events.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ import (
// NewTxsEvent is posted when a batch of transactions enter the transaction pool.
type NewTxsEvent struct{ Txs []*types.Transaction }

// ReannoTxsEvent is posted when a batch of local pending transactions exceed a specified duration.
type ReannoTxsEvent struct{ Txs []*types.Transaction }

// NewMinedBlockEvent is posted when a block has been imported.
type NewMinedBlockEvent struct{ Block *types.Block }

Expand Down
Loading