Skip to content

Align txpool error message "ReplacementNotAllowed" with geth's "replacement transaction underpriced" #10226

@jmadibekov

Description

@jmadibekov

When a replacement transaction doesn't meet the required price bump, Nethermind returns ReplacementNotAllowed while geth returns replacement transaction underpriced.

This was discovered while running taiko-client integration tests against both execution clients (more details on NethermindEth/surge-taiko-mono#245). We had to add a workaround to check for different error messages depending on which client is being used:

if os.Getenv("L2_NODE") == "l2_nmc" {
    s.Equal("ReplacementNotAllowed", err.Error())
} else {
    s.Equal("replacement transaction underpriced", err.Error())
}

It would be nice if Nethermind returned the same error message as geth for this case.

Where the difference comes from

Geth

In geth, the error is defined in core/txpool/errors.go:

// ErrReplaceUnderpriced is returned if a transaction is attempted to be replaced
// with a different one without the required price bump.
ErrReplaceUnderpriced = errors.New("replacement transaction underpriced")

Nethermind

In Nethermind, the result is defined in Nethermind.TxPool/AcceptTxResult.cs:

/// <summary>
/// Transaction is not allowed to replace the one already in the pool. Fee bump is too low or some requirements are not fulfilled
/// </summary>
public static readonly AcceptTxResult ReplacementNotAllowed = new(11, nameof(ReplacementNotAllowed));

Metadata

Metadata

Assignees

Labels

taikorelated to the taiko alethia rollup

Type

No fields configured for Task.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions