core/txpool/validation.go — Version Comparison¶
| v1.16.8 | v1.17.3 | |
|---|---|---|
| Branch | etc/v1.16.8-full-node |
etc/v1.17.3-full-node |
| Delta | +2 -2 | +3 -3 |
ETC delta on v1.16.8 (+2 -2)
diff --git a/core/txpool/validation.go b/core/txpool/validation.go
index c1c886f9c..ce372c71a 100644
--- a/core/txpool/validation.go
+++ b/core/txpool/validation.go
@@ -86,7 +86,7 @@ func ValidateTransaction(tx *types.Transaction, head *types.Header, signer types
return fmt.Errorf("%w: type %d rejected, pool not yet in Prague", core.ErrTxTypeNotSupported, tx.Type())
}
// Check whether the init code size has been exceeded
- if rules.IsShanghai && tx.To() == nil && len(tx.Data()) > params.MaxInitCodeSize {
+ if (rules.IsShanghai || rules.IsSpiral) && tx.To() == nil && len(tx.Data()) > params.MaxInitCodeSize {
return fmt.Errorf("%w: code size %v, limit %v", core.ErrMaxInitCodeSizeExceeded, len(tx.Data()), params.MaxInitCodeSize)
}
if rules.IsOsaka && tx.Gas() > params.MaxTxGas {
@@ -122,7 +122,7 @@ func ValidateTransaction(tx *types.Transaction, head *types.Header, signer types
}
// Ensure the transaction has more gas than the bare minimum needed to cover
// the transaction metadata
- intrGas, err := core.IntrinsicGas(tx.Data(), tx.AccessList(), tx.SetCodeAuthorizations(), tx.To() == nil, true, rules.IsIstanbul, rules.IsShanghai)
+ intrGas, err := core.IntrinsicGas(tx.Data(), tx.AccessList(), tx.SetCodeAuthorizations(), tx.To() == nil, true, rules.IsIstanbul, rules.IsShanghai || rules.IsSpiral)
if err != nil {
return err
}
ETC delta on v1.17.3 (+3 -3)
diff --git a/core/txpool/validation.go b/core/txpool/validation.go
index c87bba31a..ae695371a 100644
--- a/core/txpool/validation.go
+++ b/core/txpool/validation.go
@@ -77,8 +77,8 @@ func ValidateTransaction(tx *types.Transaction, head *types.Header, signer types
if !rules.IsBerlin && tx.Type() != types.LegacyTxType {
return fmt.Errorf("%w: type %d rejected, pool not yet in Berlin", core.ErrTxTypeNotSupported, tx.Type())
}
- if !rules.IsLondon && tx.Type() == types.DynamicFeeTxType {
- return fmt.Errorf("%w: type %d rejected, pool not yet in London", core.ErrTxTypeNotSupported, tx.Type())
+ if !rules.IsEIP1559 && tx.Type() == types.DynamicFeeTxType {
+ return fmt.Errorf("%w: type %d rejected, EIP-1559 not active", core.ErrTxTypeNotSupported, tx.Type())
}
if !rules.IsCancun && tx.Type() == types.BlobTxType {
return fmt.Errorf("%w: type %d rejected, pool not yet in Cancun", core.ErrTxTypeNotSupported, tx.Type())
@@ -125,7 +125,7 @@ func ValidateTransaction(tx *types.Transaction, head *types.Header, signer types
}
// Ensure the transaction has more gas than the bare minimum needed to cover
// the transaction metadata
- intrGas, err := core.IntrinsicGas(tx.Data(), tx.AccessList(), tx.SetCodeAuthorizations(), tx.To() == nil, true, rules.IsIstanbul, rules.IsShanghai, rules.IsAmsterdam)
+ intrGas, err := core.IntrinsicGas(tx.Data(), tx.AccessList(), tx.SetCodeAuthorizations(), tx.To() == nil, true, rules.IsIstanbul, rules.IsShanghai || rules.IsSpiral, rules.IsAmsterdam)
if err != nil {
return err
}