mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-24 13:46:43 +00:00
feat: add metric to evm call (#646)
* feat: add metric to evm * feat: bump version
This commit is contained in:
parent
989639a25a
commit
bfa7abcc50
2 changed files with 7 additions and 1 deletions
|
|
@ -20,6 +20,7 @@ import (
|
|||
"fmt"
|
||||
"math"
|
||||
"math/big"
|
||||
"time"
|
||||
|
||||
"github.com/scroll-tech/go-ethereum/common"
|
||||
cmath "github.com/scroll-tech/go-ethereum/common/math"
|
||||
|
|
@ -27,11 +28,14 @@ import (
|
|||
"github.com/scroll-tech/go-ethereum/core/vm"
|
||||
"github.com/scroll-tech/go-ethereum/crypto/codehash"
|
||||
"github.com/scroll-tech/go-ethereum/log"
|
||||
"github.com/scroll-tech/go-ethereum/metrics"
|
||||
"github.com/scroll-tech/go-ethereum/params"
|
||||
)
|
||||
|
||||
var emptyKeccakCodeHash = codehash.EmptyKeccakCodeHash
|
||||
|
||||
var evmCallExecutionTimer = metrics.NewRegisteredTimer("evm/call/execution", nil)
|
||||
|
||||
/*
|
||||
The State Transitioning Model
|
||||
|
||||
|
|
@ -384,7 +388,9 @@ func (st *StateTransition) TransitionDb() (*ExecutionResult, error) {
|
|||
} else {
|
||||
// Increment the nonce for the next transaction
|
||||
st.state.SetNonce(msg.From(), st.state.GetNonce(sender.Address())+1)
|
||||
evmCallStart := time.Now()
|
||||
ret, st.gas, vmerr = st.evm.Call(sender, st.to(), st.data, st.gas, st.value)
|
||||
evmCallExecutionTimer.Update(time.Since(evmCallStart))
|
||||
}
|
||||
|
||||
// no refunds for l1 messages
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ import (
|
|||
const (
|
||||
VersionMajor = 5 // Major version component of the current release
|
||||
VersionMinor = 1 // Minor version component of the current release
|
||||
VersionPatch = 17 // Patch version component of the current release
|
||||
VersionPatch = 18 // Patch version component of the current release
|
||||
VersionMeta = "mainnet" // Version metadata to append to the version string
|
||||
)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue