decouple negative chain selection from base fee lower bound validation

Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
This commit is contained in:
vyzo
2020-09-07 22:44:12 +02:00
committed by Jakub Sztandera
parent 97fddc45d9
commit 172ff846fd
2 changed files with 6 additions and 2 deletions
+2 -2
View File
@@ -83,7 +83,7 @@ const (
// this is *temporary* mutilation until we have implemented uncapped miner penalties -- it will go
// away in the next fork.
var allowNegativeChains = true
var strictBaseFeeValidation = false
func init() {
// if the republish interval is too short compared to the pubsub timecache, adjust it
@@ -393,7 +393,7 @@ func (mp *MessagePool) verifyMsgBeforeAdd(m *types.SignedMessage, curTs *types.T
// Note that for local messages, we always add them so that they can be accepted and republished
// automatically.
publish := local
if !allowNegativeChains && len(curTs.Blocks()) > 0 {
if strictBaseFeeValidation && len(curTs.Blocks()) > 0 {
baseFee := curTs.Blocks()[0].ParentBaseFee
baseFeeLowerBound := types.BigDiv(baseFee, baseFeeLowerBoundFactor)
if m.Message.GasFeeCap.LessThan(baseFeeLowerBound) {
+4
View File
@@ -18,6 +18,10 @@ import (
var bigBlockGasLimit = big.NewInt(build.BlockGasLimit)
// this is *temporary* mutilation until we have implemented uncapped miner penalties -- it will go
// away in the next fork.
var allowNegativeChains = true
const MaxBlocks = 15
type msgChain struct {