Skip to content

Commit

Permalink
Merge pull request #146 from bnb-chain/develop
Browse files Browse the repository at this point in the history
prepare for v0.4.6 release
  • Loading branch information
owen-reorg authored Aug 22, 2024
2 parents 16cc59f + 91fdcbe commit bbe7e88
Show file tree
Hide file tree
Showing 5 changed files with 364 additions and 13 deletions.
185 changes: 185 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,190 @@
# Changelog

## v0.4.6

This is a minor release for opBNB Mainnet and Testnet.
Upgrading is optional.

### What's Changed
* perf: add DialOptions function for Dial by @constwz in https://github.com/bnb-chain/op-geth/pull/140
* Fix: clear difflayer cache when truncate not triggered by @krish-nr in https://github.com/bnb-chain/op-geth/pull/141
* fix addBundle issue by @redhdx in https://github.com/bnb-chain/op-geth/pull/143

### New Contributors
* @constwz made their first contribution in https://github.com/bnb-chain/op-geth/pull/140

### Docker Images

- ghcr.io/bnb-chain/op-geth:v0.4.6

**Full Changelog**: https://github.com/bnb-chain/op-geth/compare/v0.4.5...v0.4.6

## v0.4.5

This is a hard fork release for the opBNB Mainnet called **Wright**. It will be activated on August 27, 2024, at 6 AM UTC.
All **mainnet** op-geth nodes must upgrade to this release before the hard fork.

The testnet hardfork will be activated on August 15, 2024, at 6 AM UTC.
If you have upgraded your testnet op-geth to version 0.4.4, you can skip this version for the testnet. Otherwise, you can directly upgrade your testnet op-geth to version 0.4.5.

### User Facing Changes

To support gasless transactions on opBNB, the following features have been introduced:

* The base fee is set to 0.
* The bundle feature is supported.
* When the gas price is set to 0, the L1 fee will also be set to 0.

Combined with these features and a sponsor (paymaster), users can send transactions without holding BNB to pay gas fees.

### Changelogs
* perf: speedup pbss trienode read by @will-2012 in https://github.com/bnb-chain/op-geth/pull/122
* pathdb: handle persistent id when using nodebufferlist by @sysvm in https://github.com/bnb-chain/op-geth/pull/121
* feat: support auto recover when pbss meet unclean shutdown by @krish-nr in https://github.com/bnb-chain/op-geth/pull/125
* fix: ignore truncation target range as flush not operated on time by @krish-nr in https://github.com/bnb-chain/op-geth/pull/131
* feature(op-geth): add opbnb gasless solution by @redhdx in https://github.com/bnb-chain/op-geth/pull/130

### Docker Images

- ghcr.io/bnb-chain/op-geth:v0.4.5

**Full Changelog**: https://github.com/bnb-chain/op-geth/compare/v0.4.3...v0.4.5

## v0.4.4

This is a hard fork release for the opBNB Testnet called **Wright**. It will be activated on August 15, 2024, at 6 AM UTC.
All **testnet** nodes must upgrade to this release before the hard fork.

Upgrading for mainnet nodes is optional.

### User Facing Changes

To support gasless transactions on opBNB, the following features have been introduced:

* The base fee is set to 0.
* The bundle feature is supported.
* When the gas price is set to 0, the L1 fee will also be set to 0.

Combined with these features and a sponsor (paymaster), users can send transactions without holding BNB to pay gas fees.

### Changelogs
* perf: speedup pbss trienode read by @will-2012 in https://github.com/bnb-chain/op-geth/pull/122
* pathdb: handle persistent id when using nodebufferlist by @sysvm in https://github.com/bnb-chain/op-geth/pull/121
* feat: support auto recover when pbss meet unclean shutdown by @krish-nr in https://github.com/bnb-chain/op-geth/pull/125
* fix: ignore truncation target range as flush not operated on time by @krish-nr in https://github.com/bnb-chain/op-geth/pull/131
* feature(op-geth): add opbnb gasless solution by @redhdx in https://github.com/bnb-chain/op-geth/pull/130

### Docker Images

- ghcr.io/bnb-chain/op-geth:v0.4.4

**Full Changelog**: https://github.com/bnb-chain/op-geth/compare/v0.4.3...v0.4.4

## 0.4.3

This is a minor release for opBNB Mainnet and Testnet.
Upgrading is optional.

### User Facing Changes

* Conducted several performance improvements for txpool and block execution.(#89, #84, #85, #92)
* Added `--journalFile` flag to enable/disable the journal file feature. #95

### What's Changed
* feat(txpool): improve performance of Reheap by @andyzhang2023 in https://github.com/bnb-chain/op-geth/pull/89
* feat(txpool): improve demotion unexecutable transactions by @andyzhang2023 in https://github.com/bnb-chain/op-geth/pull/84
* opt: do verify and commit concurrently by @joeylichang in https://github.com/bnb-chain/op-geth/pull/92
* improve Pending() of txpool to reduce the latency when miner worker committing transactions by @andyzhang2023 in https://github.com/bnb-chain/op-geth/pull/85
* core/trie: persist TrieJournal to journal file instead of kv database by @sysvm in https://github.com/bnb-chain/op-geth/pull/95
* add some metrics for txpool by @andyzhang2023 in https://github.com/bnb-chain/op-geth/pull/120

## Docker Images

ghcr.io/bnb-chain/op-geth:v0.4.3

**Full Changelog**: https://github.com/bnb-chain/op-geth/compare/v0.4.2...v0.4.3

## 0.4.2

This is the mainnet hardfork release version.

Four hard forks are scheduled to launch on the opBNB Mainnet:
Shanghai/Canyon Time: 2024-06-20 08:00:00 AM UTC
Delta Time: 2024-06-20 08:10:00 AM UTC
Cancun/Ecotone Time: 2024-06-20 08:20:00 AM UTC
Haber Time: 2024-06-20 08:30:00 AM UTC

All mainnet `op-geth` have to be upgraded to this version before 2024-06-20 08:00:00 AM UTC.
The `op-node` also have to be upgraded to v0.4.2 accordingly, check [this](https://github.com/bnb-chain/opbnb/releases/tag/v0.4.2) for more details.

### What's Changed
* fix: adjust flush condition to avoid not flush by @will-2012 in https://github.com/bnb-chain/op-geth/pull/114
* config: Mainnet Shanghai/Canyon/Cancun/Ecotone/Haber fork time by @welkin22 in https://github.com/bnb-chain/op-geth/pull/116

### Docker Images

ghcr.io/bnb-chain/op-geth:v0.4.2

**Full Changelog**: https://github.com/bnb-chain/op-geth/compare/v0.4.1...v0.4.2

## 0.4.1

This is the Haber Hardfork release for opBNB Testnet.

The Haber hardfork will be activated on May 30, 2024, at 6:00 AM UTC.

All testnet nodes must upgrade to this release before the hardfork.
Upgrading for other networks is optional.

### User Facing Changes
* Introduced precompile for secp256r1 curve as [EIP 7212](https://eips.ethereum.org/EIPS/eip-7212). Please refer to this [PR](https://github.com/bnb-chain/op-geth/pull/112) for more details.

### What's Changed
* cmd/dbcmd: add inspect trie tool by @sysvm in https://github.com/bnb-chain/op-geth/pull/103
* fix: cherry-picked from upstream code by @welkin22 in https://github.com/bnb-chain/op-geth/pull/109
* fix: add miss cache code after 4844 merge by @welkin22 in https://github.com/bnb-chain/op-geth/pull/110
* feat: add proof keeper by @will-2012 in https://github.com/bnb-chain/op-geth/pull/90
* feature(op-geth): add precompile for secp256r1 curve after haber hardfork by @redhdx in https://github.com/bnb-chain/op-geth/pull/112

### Docker Images
* ghcr.io/bnb-chain/op-geth:v0.4.1

**Full Changelog**: https://github.com/bnb-chain/op-geth/compare/v0.4.0...v0.4.1

## 0.4.0
This release includes code merging from the upstream version v1.101308.2 to transition Testnet's DA data from calldata to blob format.
Four hard forks are scheduled to launch on the opBNB Testnet:
Snow Time: May-15-2024 06:00 AM +UTC
Shanghai/Canyon Time: May-15-2024 06:10 AM +UTC
Delta Time: May-15-2024 06:20 AM +UTC
Cancun/Ecotone Time: May-15-2024 06:30 AM +UTC

The Shanghai/Canyon fork and Cancun/Ecotone fork involve changes to op-geth.

### User Facing Changes
Nodes on the **Testnet** need to be upgraded to this version before the first hard fork time.
**Note: This is a version prepared for Testnet, Mainnet nodes do not need to upgrade to this version.**

### Breaking Changes
Fast Node Mode (released in version [v0.3.1](https://github.com/bnb-chain/op-geth/releases/tag/v0.3.1)) has become unusable due to conflicts with upstream code.
We are working to resolve this issue and expect it to be fixed in the next version.

### What's Changed
* feature(op-geth): update opBNB qanet config by @redhdx in https://github.com/bnb-chain/op-geth/pull/99
* canyon fork: revert disable create2deployer in canyon fork by @bnoieh in https://github.com/bnb-chain/op-geth/pull/100
* feature(op-geth): add opBNB qanet hard fork config by @redhdx in https://github.com/bnb-chain/op-geth/pull/101
* add precompiled contracts for light client by @KeefeL in https://github.com/bnb-chain/op-geth/pull/102
* feature: add opBNB V5 bootnodes by @redhdx in https://github.com/bnb-chain/op-geth/pull/104
* add bls example by @KeefeL in https://github.com/bnb-chain/op-geth/pull/105
* Merge upstream op-geth v1.101308.2 by @welkin22 in https://github.com/bnb-chain/op-geth/pull/87
* fix: the TrieCommitInterval not taking effect on restart by @welkin22 in https://github.com/bnb-chain/op-geth/pull/106
* config: Testnet 4844 fork time by @welkin22 in https://github.com/bnb-chain/op-geth/pull/107

### Docker Images
ghcr.io/bnb-chain/op-geth:v0.4.0

**Full Changelog**: https://github.com/bnb-chain/op-geth/compare/v0.3.1...v0.4.0

## v0.3.1

This is a minor release for opBNB Mainnet and Testnet.
Expand Down
41 changes: 29 additions & 12 deletions core/txpool/bundlepool/bundlepool.go
Original file line number Diff line number Diff line change
Expand Up @@ -171,20 +171,22 @@ func (p *BundlePool) AddBundle(bundle *types.Bundle, originBundle *types.SendBun
if err != nil {
return err
}
bundle.Price = price

p.mu.Lock()
defer p.mu.Unlock()

if price.Cmp(p.minimalBundleGasPrice()) <= 0 && p.slots+numSlots(bundle) > p.config.GlobalSlots {
return ErrBundleGasPriceLow
}
bundle.Price = price

hash := bundle.Hash()
if _, ok := p.bundles[hash]; ok {
return ErrBundleAlreadyExist
}

if p.slots+numSlots(bundle) > p.config.GlobalSlots {
if !p.drop(bundle) {
return ErrBundleGasPriceLow
}
}

for url, cli := range p.bundleReceiverClients {
cli := cli
url := url
Expand All @@ -199,9 +201,6 @@ func (p *BundlePool) AddBundle(bundle *types.Bundle, originBundle *types.SendBun
bundleDeliverAll.Inc(1)
}

for p.slots+numSlots(bundle) > p.config.GlobalSlots {
p.drop()
}
p.bundles[hash] = bundle
heap.Push(&p.bundleHeap, bundle)
p.slots += numSlots(bundle)
Expand Down Expand Up @@ -397,16 +396,34 @@ func (p *BundlePool) deleteBundle(hash common.Hash) {
}

// drop removes the bundle with the lowest gas price from the pool.
func (p *BundlePool) drop() {
func (p *BundlePool) drop(bundle *types.Bundle) bool {
dropBundles := make([]*types.Bundle, 0, numSlots(bundle))
dropSlots := uint64(0)
for len(p.bundleHeap) > 0 {
if dropSlots >= numSlots(bundle) {
for _, dropBundle := range dropBundles {
p.deleteBundle(dropBundle.Hash())
}
return true
}
// Pop the bundle with the lowest gas price
// the min element in the heap may not exist in the pool as it may be pruned
leastPriceBundleHash := heap.Pop(&p.bundleHeap).(*types.Bundle).Hash()
if _, ok := p.bundles[leastPriceBundleHash]; ok {
p.deleteBundle(leastPriceBundleHash)
break
if leastPriceBundle, ok := p.bundles[leastPriceBundleHash]; ok {
if leastPriceBundle.Price.Cmp(bundle.Price) < 0 {
dropBundles = append(dropBundles, leastPriceBundle)
dropSlots = dropSlots + numSlots(leastPriceBundle)
continue
} else {
heap.Push(&p.bundleHeap, leastPriceBundle)
for _, dropBundle := range dropBundles {
heap.Push(&p.bundleHeap, dropBundle)
}
return false
}
}
}
return false
}

// minimalBundleGasPrice return the lowest gas price from the pool.
Expand Down
Loading

0 comments on commit bbe7e88

Please sign in to comment.