Skip to content

Commit a49dd78

Browse files
Merge branch 'master' into bump-avalanchego
2 parents 3b06e8c + b182d9e commit a49dd78

File tree

4 files changed

+9
-12
lines changed

4 files changed

+9
-12
lines changed

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Release
33
on:
44
push:
55
tags:
6-
- 'v[0-9]+.[0-9]+.[0-9]+'
6+
- '*'
77

88
jobs:
99
release:

core/blockchain.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1356,9 +1356,9 @@ func (bc *BlockChain) insertBlock(block *types.Block, writes bool) error {
13561356
storageUpdateTimer.Inc(statedb.StorageUpdates.Milliseconds()) // Storage updates are complete, we can mark them
13571357
accountHashTimer.Inc(statedb.AccountHashes.Milliseconds()) // Account hashes are complete, we can mark them
13581358
storageHashTimer.Inc(statedb.StorageHashes.Milliseconds()) // Storage hashes are complete, we can mark them
1359-
additionalTrieProc := statedb.AccountHashes + statedb.StorageHashes + statedb.AccountUpdates + statedb.StorageUpdates - trieproc
1360-
blockStateValidationTimer.Inc((time.Since(substart) - additionalTrieProc).Milliseconds())
1361-
blockTrieOpsTimer.Inc((trieproc + additionalTrieProc).Milliseconds())
1359+
validationTrieProcTime := statedb.AccountHashes + statedb.StorageHashes + statedb.AccountUpdates + statedb.StorageUpdates - trieproc
1360+
blockStateValidationTimer.Inc((time.Since(substart) - validationTrieProcTime).Milliseconds())
1361+
blockTrieOpsTimer.Inc((trieproc + validationTrieProcTime).Milliseconds())
13621362

13631363
// If [writes] are disabled, skip [writeBlockWithState] so that we do not write the block
13641364
// or the state trie to disk.

plugin/evm/block.go

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -202,12 +202,6 @@ func (b *Block) ShouldVerifyWithContext(context.Context) (bool, error) {
202202

203203
// VerifyWithContext implements the block.WithVerifyContext interface
204204
func (b *Block) VerifyWithContext(ctx context.Context, proposerVMBlockCtx *block.Context) error {
205-
if proposerVMBlockCtx != nil {
206-
log.Debug("Verifying block with context", "block", b.ID(), "height", b.Height())
207-
} else {
208-
log.Debug("Verifying block without context", "block", b.ID(), "height", b.Height())
209-
}
210-
211205
return b.verify(&precompileconfig.ProposerPredicateContext{
212206
PrecompilePredicateContext: precompileconfig.PrecompilePredicateContext{
213207
SnowCtx: b.vm.ctx,
@@ -220,6 +214,11 @@ func (b *Block) VerifyWithContext(ctx context.Context, proposerVMBlockCtx *block
220214
// Enforces that the predicates are valid within [predicateContext].
221215
// Writes the block details to disk and the state to the trie manager iff writes=true.
222216
func (b *Block) verify(predicateContext *precompileconfig.ProposerPredicateContext, writes bool) error {
217+
if predicateContext.ProposerVMBlockCtx != nil {
218+
log.Debug("Verifying block with context", "block", b.ID(), "height", b.Height())
219+
} else {
220+
log.Debug("Verifying block without context", "block", b.ID(), "height", b.Height())
221+
}
223222
if err := b.syntacticVerify(); err != nil {
224223
return fmt.Errorf("syntactic block verification failed: %w", err)
225224
}

plugin/evm/config.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ const (
4747
defaultPopulateMissingTriesParallelism = 1024
4848
defaultStateSyncServerTrieCache = 64 // MB
4949
defaultAcceptedCacheSize = 32 // blocks
50-
defaultWarpAPIEnabled = true
5150

5251
// defaultStateSyncMinBlocks is the minimum number of blocks the blockchain
5352
// should be ahead of local last accepted to perform state sync.
@@ -225,7 +224,6 @@ func (c *Config) SetDefaults() {
225224
c.RPCGasCap = defaultRpcGasCap
226225
c.RPCTxFeeCap = defaultRpcTxFeeCap
227226
c.MetricsExpensiveEnabled = defaultMetricsExpensiveEnabled
228-
c.WarpAPIEnabled = defaultWarpAPIEnabled
229227

230228
c.TxPoolJournal = core.DefaultTxPoolConfig.Journal
231229
c.TxPoolRejournal = Duration{core.DefaultTxPoolConfig.Rejournal}

0 commit comments

Comments
 (0)