From 4855f19261af0f7f33a0916495bbc35420ca99a3 Mon Sep 17 00:00:00 2001 From: Daniel Liu Date: Tue, 19 Nov 2024 14:19:57 +0800 Subject: [PATCH] core: fix preCheck for RandomizeSMC after EIP-1559 --- core/state_transition.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/state_transition.go b/core/state_transition.go index 257950622f28..90401eb817a5 100644 --- a/core/state_transition.go +++ b/core/state_transition.go @@ -267,7 +267,7 @@ func (st *StateTransition) preCheck() error { } // This will panic if baseFee is nil, but basefee presence is verified // as part of header validation. - if st.gasFeeCap.Cmp(st.evm.Context.BaseFee) < 0 { + if (msg.To() == nil || *msg.To() != common.RandomizeSMCBinary) && st.gasFeeCap.Cmp(st.evm.Context.BaseFee) < 0 { return fmt.Errorf("%w: address %v, maxFeePerGas: %s baseFee: %s", ErrFeeCapTooLow, msg.From().Hex(), st.gasFeeCap, st.evm.Context.BaseFee) }