From c8cc91963f6c643f6db87378450d94c114229f24 Mon Sep 17 00:00:00 2001 From: Eric <45141191+zlacfzy@users.noreply.github.com> Date: Wed, 28 Feb 2024 15:15:46 +0800 Subject: [PATCH 1/3] eth/gasprice: fix percentile validation in eth_feeHistory (#2242) --- eth/gasprice/feehistory.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eth/gasprice/feehistory.go b/eth/gasprice/feehistory.go index 226991b24..d657eb6d9 100644 --- a/eth/gasprice/feehistory.go +++ b/eth/gasprice/feehistory.go @@ -227,8 +227,8 @@ func (oracle *Oracle) FeeHistory(ctx context.Context, blocks uint64, unresolvedL if p < 0 || p > 100 { return common.Big0, nil, nil, nil, fmt.Errorf("%w: %f", errInvalidPercentile, p) } - if i > 0 && p < rewardPercentiles[i-1] { - return common.Big0, nil, nil, nil, fmt.Errorf("%w: #%d:%f > #%d:%f", errInvalidPercentile, i-1, rewardPercentiles[i-1], i, p) + if i > 0 && p <= rewardPercentiles[i-1] { + return common.Big0, nil, nil, nil, fmt.Errorf("%w: #%d:%f >= #%d:%f", errInvalidPercentile, i-1, rewardPercentiles[i-1], i, p) } } var ( From a18ed24b9d5a6804d26dab8764dbc0cfbfe16192 Mon Sep 17 00:00:00 2001 From: buddh0 Date: Wed, 6 Mar 2024 10:13:41 +0800 Subject: [PATCH 2/3] core: skip checking state root existence when do snapsync by fast node --- core/blockchain.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/blockchain.go b/core/blockchain.go index 839ef1772..514116998 100644 --- a/core/blockchain.go +++ b/core/blockchain.go @@ -406,7 +406,7 @@ func NewBlockChain(db ethdb.Database, cacheConfig *CacheConfig, genesis *Genesis // Make sure the state associated with the block is available, or log out // if there is no available state, waiting for state sync. head := bc.CurrentBlock() - if !bc.HasState(head.Root) { + if !bc.NoTries() && !bc.HasState(head.Root) { if head.Number.Uint64() == 0 { // The genesis state is missing, which is only possible in the path-based // scheme. This situation occurs when the initial state sync is not finished @@ -1011,7 +1011,7 @@ func (bc *BlockChain) SnapSyncCommitHead(hash common.Hash) error { return err } } - if !bc.HasState(root) { + if !bc.NoTries() && !bc.HasState(root) { return fmt.Errorf("non existent state [%x..]", root[:4]) } // If all checks out, manually set the head block. From 1487e46f3061d3437c38f69616d0e85297bf3aca Mon Sep 17 00:00:00 2001 From: zzzckck <152148891+zzzckck@users.noreply.github.com> Date: Mon, 11 Mar 2024 15:48:41 +0800 Subject: [PATCH 3/3] release: prepare for release v1.4.1-alpha (#2270) --- CHANGELOG.md | 11 +++++++++++ params/version.go | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ffe07a36c..2a55bf4fa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,15 @@ # Changelog +## v1.4.1 +FEATURE +NA + +BUGFIX +* [\#2258](https://github.com/bnb-chain/bsc/pull/2258) core: skip checking state root existence when do snapsync by fast node +* [\#2252](https://github.com/bnb-chain/bsc/pull/2252) fix: add missing args of `bls account generate-proof` cmd (#2252) + +IMPROVEMENT +NA + ## v1.4.0 #### RPC [internal/ethapi: implement eth_getBlockReceipts (#27702)](https://github.com/bnb-chain/bsc/commit/f1801a9feda8f81532c92077d2c9a8b785fd699b) diff --git a/params/version.go b/params/version.go index 4907e0683..07ea25bcb 100644 --- a/params/version.go +++ b/params/version.go @@ -23,7 +23,7 @@ import ( const ( VersionMajor = 1 // Major version component of the current release VersionMinor = 4 // Minor version component of the current release - VersionPatch = 0 // Patch version component of the current release + VersionPatch = 1 // Patch version component of the current release VersionMeta = "" // Version metadata to append to the version string )