*: increase GAS for verification

Signed-off-by: Evgeniy Stratonikov <evgeniy@nspcc.ru>
This commit is contained in:
Evgeniy Stratonikov 2021-07-07 16:14:49 +03:00
parent 1853d0c713
commit 451b02122a
4 changed files with 5 additions and 5 deletions

View file

@ -50,7 +50,7 @@ const (
defaultMaxBlockSystemFee = 900000000000 defaultMaxBlockSystemFee = 900000000000
defaultMaxTraceableBlocks = 2102400 // 1 year of 15s blocks defaultMaxTraceableBlocks = 2102400 // 1 year of 15s blocks
defaultMaxTransactionsPerBlock = 512 defaultMaxTransactionsPerBlock = 512
verificationGasLimit = 100000000 // 1 GAS headerVerificationGasLimit = 3_00000000 // 3 GAS
) )
var ( var (
@ -1874,7 +1874,7 @@ func (bc *Blockchain) verifyHeaderWitnesses(currHeader, prevHeader *block.Header
} else { } else {
hash = prevHeader.NextConsensus hash = prevHeader.NextConsensus
} }
return bc.VerifyWitness(hash, currHeader, &currHeader.Script, verificationGasLimit) return bc.VerifyWitness(hash, currHeader, &currHeader.Script, headerVerificationGasLimit)
} }
// GoverningTokenHash returns the governing token (NEO) native contract hash. // GoverningTokenHash returns the governing token (NEO) native contract hash.

View file

@ -23,7 +23,7 @@ const (
defaultExecFeeFactor = interop.DefaultBaseExecFee defaultExecFeeFactor = interop.DefaultBaseExecFee
defaultFeePerByte = 1000 defaultFeePerByte = 1000
defaultMaxVerificationGas = 50000000 defaultMaxVerificationGas = 1_50000000
// DefaultStoragePrice is the price to pay for 1 byte of storage. // DefaultStoragePrice is the price to pay for 1 byte of storage.
DefaultStoragePrice = 100000 DefaultStoragePrice = 100000

View file

@ -156,7 +156,7 @@ func (s *Module) VerifyStateRoot(r *state.MPTRoot) error {
return s.verifyWitness(r) return s.verifyWitness(r)
} }
const maxVerificationGAS = 1_00000000 const maxVerificationGAS = 2_00000000
// verifyWitness verifies state root witness. // verifyWitness verifies state root witness.
func (s *Module) verifyWitness(r *state.MPTRoot) error { func (s *Module) verifyWitness(r *state.MPTRoot) error {

View file

@ -99,7 +99,7 @@ func (p *Pool) Get(h util.Uint256) *payload.Extensible {
return elem.Value.(*payload.Extensible) return elem.Value.(*payload.Extensible)
} }
const extensibleVerifyMaxGAS = 2000000 const extensibleVerifyMaxGAS = 6000000
// RemoveStale removes invalid payloads after block processing. // RemoveStale removes invalid payloads after block processing.
func (p *Pool) RemoveStale(index uint32) { func (p *Pool) RemoveStale(index uint32) {