Compare commits

...

9 Commits

Author SHA1 Message Date
dylanhuang
7822e9e2a1 Merge pull request #324 from binance-chain/release_v1.1.0
Release v1.1.0 stable version
2021-07-26 14:10:10 +08:00
j75689
7c2cca285b release v1.1.0 2021-07-26 12:51:46 +08:00
zjubfd
6ce2cef425 Merge pull request #282 from binance-chain/discord_link
[R4R]update discord link
2021-06-10 15:42:55 +08:00
fudongbai
1bde62fe87 update discord link 2021-06-10 14:00:06 +08:00
zjubfd
3a87f6256a Merge pull request #280 from binance-chain/discord_link
[R4R]update discord link
2021-06-10 10:34:28 +08:00
fudongbai
72dfda0e88 update discord link 2021-06-10 10:19:17 +08:00
zjubfd
b67a129e5b Merge pull request #227 from binance-chain/cache_write_policy
[R4R]use more aggressive write cache policy
2021-05-24 16:28:11 +08:00
fudongbai
571a317092 fix ungraceful shutdown issue 2021-05-19 11:46:46 +08:00
fudongbai
1f3e0606ee use more aggressive write cache policy 2021-05-17 19:32:39 +08:00
6 changed files with 24 additions and 10 deletions

View File

@@ -1,6 +1,11 @@
# Changelog
## v1.1.0
*[\#282](https://github.com/binance-chain/bsc/pull/282) update discord link
*[\#280](https://github.com/binance-chain/bsc/pull/280) update discord link
*[\#227](https://github.com/binance-chain/bsc/pull/227) use more aggressive write cache policy
## v1.1.0-beta
*[\#152](https://github.com/binance-chain/bsc/pull/152) upgrade to go-ethereum 1.10.3
## v1.0.7-hf.2

View File

@@ -7,7 +7,7 @@ Binance Smart Chain starts its development based on go-ethereum fork. So you may
[![API Reference](
https://camo.githubusercontent.com/915b7be44ada53c290eb157634330494ebe3e30a/68747470733a2f2f676f646f632e6f72672f6769746875622e636f6d2f676f6c616e672f6764646f3f7374617475732e737667
)](https://pkg.go.dev/github.com/ethereum/go-ethereum?tab=doc)
[![Discord](https://img.shields.io/badge/discord-join%20chat-blue.svg)](https://discord.gg/T3Ka4V4N)
[![Discord](https://img.shields.io/badge/discord-join%20chat-blue.svg)](https://discord.gg/5Z3C3SdxDw)
But from that baseline of EVM compatible, Binance Smart Chain introduces a system of 21 validators with Proof of Staked Authority (PoSA) consensus that can support short block time and lower fees. The most bonded validator candidates of staking will become validators and produce blocks. The double-sign detection and other slashing logic guarantee security, stability, and chain finality.
@@ -203,7 +203,7 @@ from anyone on the internet, and are grateful for even the smallest of fixes!
If you'd like to contribute to bsc, please fork, fix, commit and send a pull request
for the maintainers to review and merge into the main code base. If you wish to submit
more complex changes though, please check up with the core devs first on [our discord channel](https://discord.com/invite/T3Ka4V4N)
more complex changes though, please check up with the core devs first on [our discord channel](https://discord.gg/5Z3C3SdxDw)
to ensure those changes are in line with the general philosophy of the project and/or get
some early feedback which can make both your efforts much lighter as well as our review
and merge procedures quick and simple.

View File

@@ -868,7 +868,7 @@ func (p *Parlia) EnoughDistance(chain consensus.ChainReader, header *types.Heade
if err != nil {
return true
}
return snap.enoughDistance(p.val)
return snap.enoughDistance(p.val, header)
}
// CalcDifficulty is the difficulty adjustment algorithm. It returns the difficulty

View File

@@ -244,17 +244,23 @@ func (s *Snapshot) inturn(validator common.Address) bool {
return validators[offset] == validator
}
func (s *Snapshot) enoughDistance(validator common.Address) bool {
func (s *Snapshot) enoughDistance(validator common.Address, header *types.Header) bool {
idx := s.indexOfVal(validator)
if idx < 0 {
return true
}
validatorNum := int64(len(s.validators()))
if validatorNum == 1 {
return true
}
if validator == header.Coinbase {
return false
}
offset := (int64(s.Number) + 1) % int64(validatorNum)
if int64(idx) >= offset {
return int64(idx)-offset >= validatorNum/2
return int64(idx)-offset >= validatorNum-2
} else {
return validatorNum+int64(idx)-offset >= validatorNum/2
return validatorNum+int64(idx)-offset >= validatorNum-2
}
}

View File

@@ -574,6 +574,9 @@ func (s *Ethereum) Stop() error {
close(s.closeBloomHandler)
s.txPool.Stop()
s.miner.Stop()
s.miner.Close()
// TODO this is a hotfix for https://github.com/ethereum/go-ethereum/issues/22892, need a better solution
time.Sleep(5 * time.Second)
s.blockchain.Stop()
s.engine.Close()
rawdb.PopUncleanShutdownMarker(s.chainDb)

View File

@@ -21,10 +21,10 @@ import (
)
const (
VersionMajor = 1 // Major version component of the current release
VersionMinor = 1 // Minor version component of the current release
VersionPatch = 0 // Patch version component of the current release
VersionMeta = "beta" // Version metadata to append to the version string
VersionMajor = 1 // Major version component of the current release
VersionMinor = 1 // Minor version component of the current release
VersionPatch = 0 // Patch version component of the current release
VersionMeta = "" // Version metadata to append to the version string
)
// Version holds the textual version string.