From 55e2e277bf62fb3b68d48e12453b4ca9754306be Mon Sep 17 00:00:00 2001 From: Marius van der Wijden Date: Thu, 26 Sep 2024 14:40:56 +0200 Subject: [PATCH] core: fix a bug in state transition --- core/state_transition.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/core/state_transition.go b/core/state_transition.go index 95ca92f290..bd9ba179e1 100644 --- a/core/state_transition.go +++ b/core/state_transition.go @@ -441,6 +441,11 @@ func (st *StateTransition) TransitionDb() (*ExecutionResult, error) { // - reset transient storage(eip 1153) st.state.Prepare(rules, msg.From, st.evm.Context.Coinbase, msg.To, vm.ActivePrecompiles(rules), msg.AccessList) + if !contractCreation { + // Increment the nonce for the next transaction + st.state.SetNonce(msg.From, st.state.GetNonce(sender.Address())+1) + } + var ( ret []byte vmerr error // vm errors do not effect consensus and are therefore not assigned to err