Skip to content

Commit f1d92be

Browse files
authored
Merge pull request bnb-chain#123 from binance-chain/develop
[R4R] Prepare for release v1.0.7
2 parents f16d8e0 + c30f17c commit f1d92be

File tree

24 files changed

+429
-83
lines changed

24 files changed

+429
-83
lines changed

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,15 @@
11
# Changelog
2+
## v1.0.7
3+
* [\#120](https://github.com/binance-chain/bsc/pull/120) add health check endpoint
4+
* [\#116](https://github.com/binance-chain/bsc/pull/116) validator only write database state when enough distance
5+
* [\#115](https://github.com/binance-chain/bsc/pull/115) add batch query methods
6+
* [\#112](https://github.com/binance-chain/bsc/pull/112) apply max commit tx time for miner worker to avoid empty block
7+
* [\#101](https://github.com/binance-chain/bsc/pull/101) apply block number limit for the `eth_getLogs` api
8+
* [\#99](https://github.com/binance-chain/bsc/pull/99) enable directbroadcast flag to decrease the block propagation time
9+
* [\#90](https://github.com/binance-chain/bsc/pull/90) add tini in docker image
10+
* [\#84](https://github.com/binance-chain/bsc/pull/84) add jq in docker image
11+
12+
213
## v1.0.6
314
* [\#68](https://github.com/binance-chain/bsc/pull/68) apply mirror sync upgrade on mainnet
415

cmd/faucet/website.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cmd/geth/chaincmd.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@ import (
3939
"github.com/ethereum/go-ethereum/eth/downloader"
4040
"github.com/ethereum/go-ethereum/event"
4141
"github.com/ethereum/go-ethereum/log"
42+
"github.com/ethereum/go-ethereum/metrics"
4243
"github.com/ethereum/go-ethereum/node"
4344
"github.com/ethereum/go-ethereum/p2p/enode"
44-
"github.com/ethereum/go-ethereum/metrics"
4545
"github.com/ethereum/go-ethereum/trie"
4646
"gopkg.in/urfave/cli.v1"
4747
)
@@ -363,7 +363,7 @@ func initNetwork(ctx *cli.Context) error {
363363
defer dump.Close()
364364
dump.Write(out)
365365
}
366-
return nil
366+
return nil
367367
}
368368

369369
func dumpGenesis(ctx *cli.Context) error {

cmd/geth/main.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ var (
130130
utils.MinerExtraDataFlag,
131131
utils.MinerLegacyExtraDataFlag,
132132
utils.MinerRecommitIntervalFlag,
133+
utils.MinerDelayLeftoverFlag,
133134
utils.MinerNoVerfiyFlag,
134135
utils.NATFlag,
135136
utils.NoDiscoverFlag,

cmd/geth/retesteth.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,10 @@ func (e *NoRewardEngine) FinalizeAndAssemble(chain consensus.ChainReader, header
256256
}
257257
}
258258

259+
func (e *NoRewardEngine) Delay(_ consensus.ChainReader, _ *types.Header) *time.Duration {
260+
return nil
261+
}
262+
259263
func (e *NoRewardEngine) Seal(chain consensus.ChainReader, block *types.Block, results chan<- *types.Block, stop <-chan struct{}) error {
260264
return e.inner.Seal(chain, block, results, stop)
261265
}

cmd/geth/usage.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,7 @@ var AppHelpFlagGroups = []flagGroup{
211211
utils.MinerEtherbaseFlag,
212212
utils.MinerExtraDataFlag,
213213
utils.MinerRecommitIntervalFlag,
214+
utils.MinerDelayLeftoverFlag,
214215
utils.MinerNoVerfiyFlag,
215216
},
216217
},

cmd/utils/flags.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -491,6 +491,11 @@ var (
491491
Usage: "Time interval to recreate the block being mined",
492492
Value: eth.DefaultConfig.Miner.Recommit,
493493
}
494+
MinerDelayLeftoverFlag = cli.DurationFlag{
495+
Name: "miner.delayleftover",
496+
Usage: "Time interval to for broadcast block",
497+
Value: eth.DefaultConfig.Miner.DelayLeftOver,
498+
}
494499
MinerNoVerfiyFlag = cli.BoolFlag{
495500
Name: "miner.noverify",
496501
Usage: "Disable remote sealing verification",
@@ -1412,6 +1417,9 @@ func setMiner(ctx *cli.Context, cfg *miner.Config) {
14121417
if ctx.GlobalIsSet(MinerRecommitIntervalFlag.Name) {
14131418
cfg.Recommit = ctx.Duration(MinerRecommitIntervalFlag.Name)
14141419
}
1420+
if ctx.GlobalIsSet(MinerDelayLeftoverFlag.Name) {
1421+
cfg.DelayLeftOver = ctx.Duration(MinerDelayLeftoverFlag.Name)
1422+
}
14151423
if ctx.GlobalIsSet(MinerNoVerfiyFlag.Name) {
14161424
cfg.Noverify = ctx.Bool(MinerNoVerfiyFlag.Name)
14171425
}

consensus/clique/clique.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -582,6 +582,10 @@ func (c *Clique) Authorize(signer common.Address, signFn SignerFn) {
582582
c.signFn = signFn
583583
}
584584

585+
func (c *Clique) Delay(chain consensus.ChainReader, header *types.Header) *time.Duration {
586+
return nil
587+
}
588+
585589
// Seal implements consensus.Engine, attempting to create a sealed block using
586590
// the local signing credentials.
587591
func (c *Clique) Seal(chain consensus.ChainReader, block *types.Block, results chan<- *types.Block, stop <-chan struct{}) error {

consensus/consensus.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ package consensus
1919

2020
import (
2121
"math/big"
22+
"time"
2223

2324
"github.com/ethereum/go-ethereum/common"
2425
"github.com/ethereum/go-ethereum/core/state"
@@ -116,6 +117,9 @@ type Engine interface {
116117
// APIs returns the RPC APIs this consensus engine provides.
117118
APIs(chain ChainReader) []rpc.API
118119

120+
// Delay returns the max duration the miner can commit txs
121+
Delay(chain ChainReader, header *types.Header) *time.Duration
122+
119123
// Close terminates any background threads maintained by the consensus engine.
120124
Close() error
121125
}
@@ -133,4 +137,5 @@ type PoSA interface {
133137

134138
IsSystemTransaction(tx *types.Transaction, header *types.Header) (bool, error)
135139
IsSystemContract(to *common.Address) bool
140+
EnoughDistance(chain ChainReader, header *types.Header) bool
136141
}

consensus/ethash/consensus.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -589,6 +589,10 @@ func (ethash *Ethash) FinalizeAndAssemble(chain consensus.ChainReader, header *t
589589
return types.NewBlock(header, txs, uncles, receipts), receipts, nil
590590
}
591591

592+
func (ethash *Ethash) Delay(_ consensus.ChainReader, _ *types.Header) *time.Duration {
593+
return nil
594+
}
595+
592596
// SealHash returns the hash of a block prior to it being sealed.
593597
func (ethash *Ethash) SealHash(header *types.Header) (hash common.Hash) {
594598
hasher := sha3.NewLegacyKeccak256()

0 commit comments

Comments
 (0)