forked from TrueCloudLab/neoneo-go
Merge pull request #2055 from nspcc-dev/fix-gas-limits
Tune fixed GAS limits
This commit is contained in:
commit
21e05f5779
4 changed files with 6 additions and 6 deletions
|
@ -50,7 +50,7 @@ const (
|
|||
defaultMaxBlockSystemFee = 900000000000
|
||||
defaultMaxTraceableBlocks = 2102400 // 1 year of 15s blocks
|
||||
defaultMaxTransactionsPerBlock = 512
|
||||
verificationGasLimit = 100000000 // 1 GAS
|
||||
headerVerificationGasLimit = 3_00000000 // 3 GAS
|
||||
)
|
||||
|
||||
var (
|
||||
|
@ -1874,7 +1874,7 @@ func (bc *Blockchain) verifyHeaderWitnesses(currHeader, prevHeader *block.Header
|
|||
} else {
|
||||
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.
|
||||
|
|
|
@ -23,12 +23,12 @@ const (
|
|||
|
||||
defaultExecFeeFactor = interop.DefaultBaseExecFee
|
||||
defaultFeePerByte = 1000
|
||||
defaultMaxVerificationGas = 50000000
|
||||
defaultMaxVerificationGas = 1_50000000
|
||||
// DefaultStoragePrice is the price to pay for 1 byte of storage.
|
||||
DefaultStoragePrice = 100000
|
||||
|
||||
// maxExecFeeFactor is the maximum allowed execution fee factor.
|
||||
maxExecFeeFactor = 1000
|
||||
maxExecFeeFactor = 100
|
||||
// maxFeePerByte is the maximum allowed fee per byte value.
|
||||
maxFeePerByte = 100_000_000
|
||||
// maxStoragePrice is the maximum allowed price for a byte of storage.
|
||||
|
|
|
@ -156,7 +156,7 @@ func (s *Module) VerifyStateRoot(r *state.MPTRoot) error {
|
|||
return s.verifyWitness(r)
|
||||
}
|
||||
|
||||
const maxVerificationGAS = 1_00000000
|
||||
const maxVerificationGAS = 2_00000000
|
||||
|
||||
// verifyWitness verifies state root witness.
|
||||
func (s *Module) verifyWitness(r *state.MPTRoot) error {
|
||||
|
|
|
@ -99,7 +99,7 @@ func (p *Pool) Get(h util.Uint256) *payload.Extensible {
|
|||
return elem.Value.(*payload.Extensible)
|
||||
}
|
||||
|
||||
const extensibleVerifyMaxGAS = 2000000
|
||||
const extensibleVerifyMaxGAS = 6000000
|
||||
|
||||
// RemoveStale removes invalid payloads after block processing.
|
||||
func (p *Pool) RemoveStale(index uint32) {
|
||||
|
|
Loading…
Reference in a new issue