Increase crosslink catching rate, expect to have equillibrium at 5 block delay (#3333)

pull/3336/head
Rongjian Lan 4 years ago committed by GitHub
parent 3de5809b0b
commit f284e9e0fc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      core/state_transition.go
  2. 4
      node/node_handler.go

@ -245,7 +245,7 @@ func (st *StateTransition) TransitionDb() (ret []byte, usedGas uint64, failed bo
ret, st.gas, vmerr = evm.Call(sender, st.to(), st.data, st.gas, st.value)
}
if vmerr != nil {
utils.Logger().Debug().Err(vmerr).Msg("VM returned with error")
utils.Logger().Info().Err(vmerr).Msg("VM returned with error")
// The only possible consensus-error would be if there wasn't
// sufficient balance to make the transfer happen. The first
// balance transfer may never fail.

@ -212,8 +212,8 @@ func (node *Node) BroadcastCrossLink() {
batchSize := crossLinkBatchSize
diff := curBlock.Number().Uint64() - latestBlockNum
// Increase batch size by 1 for every 100 blocks beyond
batchSize += int(diff) / 100
// Increase batch size by 1 for every 5 blocks behind
batchSize += int(diff) / 5
// Cap at a sane size to avoid overload network
if batchSize > crossLinkBatchSize*2 {

Loading…
Cancel
Save