Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

composer: handle new mempool ABCI error codes on transaction submission #1633

Closed
Lilyjjo opened this issue Oct 4, 2024 · 0 comments · Fixed by #1643
Closed

composer: handle new mempool ABCI error codes on transaction submission #1633

Lilyjjo opened this issue Oct 4, 2024 · 0 comments · Fixed by #1643
Assignees
Labels
composer pertaining to composer mempool production-quality necessary features for production quality software

Comments

@Lilyjjo
Copy link
Contributor

Lilyjjo commented Oct 4, 2024

PR #1515 added three new ABCI error codes that affects the composer's nonce resubmission logic. Instead of returning INVALID_NONCE on all error codes, we now also return NONCE_TAKEN, ALREADY_PRESENT, and ACCOUNT_SIZE_LIMIT. The composer should handle these other transaction submission error codes as well.

Error code descriptors:
ALREADY_PRESENT: the exact transaction is already inside of the mempool and doesn't need to be re-sent.
ACCOUNT_SIZE_LIMIT: the parked queue for the account is full, this would indicate that the account associated with the composer isn't having sent transactions qualify for the pending/execution queue. This could be due to a nonce gap or the account lacking funds to cover transaction costs.
NONCE_TAKEN: there is already a transaction for this account with the used nonce inside of the mempool. We don't allow for transaction replacement right now, so a higher nonce should probably be used.

┆Issue Number: ENG-909

@Lilyjjo Lilyjjo added composer pertaining to composer production-quality necessary features for production quality software mempool labels Oct 4, 2024
@Lilyjjo Lilyjjo self-assigned this Oct 8, 2024
github-merge-queue bot pushed a commit that referenced this issue Oct 14, 2024
## Summary
Updates composer to work with the new appside mempool. New ABCI error
codes were added and now nonces can be stacked, so the submission logic
should use the GRPC `pending_nonce()` instead of the RPC
`get_latest_nonce()`.

## Background
New ABCI error codes were added in PR
#1515 which need to be handled
in the composer's submission logic.

New Error codes:
- `NONCE_TAKEN` -> try resubmitting with new top-of-pending. If this is
happening because the composer is out of funds, that is okay as the
composer has it's own fund monitoring logic
- `PARKED_FULL` -> normal error case ok
- `ACCOUNT_SIZE_LIMIT` -> normal error case ok 
- `ALREADY_PRESENT` -> normal error case ok, shouldn't be returned 

## Background
We changed the internals of the mempool which resulted in the users of
the mempool to have changes as well.

## Testing
Smoke tests

## Related Issues
closes #1633

---------

Co-authored-by: quasystaty <ido@astria.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
composer pertaining to composer mempool production-quality necessary features for production quality software
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant