You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 5, 2025. It is now read-only.
Users should be able to get feedback on their transactions, especially why they are not being sequenced, even if submitted through the public mempool. To this end, we should add a new transaction status API. This can be an extension of the existing tx_submit API or an entirely new module. Either way, it should have an endpoint GET /status/:hash, which returns one of the following responses:
{
"status": "pending"
}
{
"status": "sequenced",
"block": number,"offset": number
}
{
"status": "rejected",
"reason": string
}
{
"status": "unknown"
}
Notes:
the sequenced status is less critical, because this information can be obtained from the query service or block explorer, so it's a nice-to-have for the builder
the rejected status should return the same error that would have been returned from the builder's private submit endpoint, if applicable, but could also return other errors (e.g. transaction was initially accepted but was dropped from the transaction channel due to overflow)
To make this API possible, we will need to add to the state a mapping from transaction hash to status. This mapping would be updated whenever a transaction is rejected (by error return the private submit endpoint, by error when handling transactions on the public mempool event stream, or by getting dropped from the channel) or sequenced (ie appears in a DA proposal linked to a decide event) (nice-to-have).
We will also want to prune this mapping periodically. I think we should use a pruning policy similar to the query service, namely:
set a target amount of space to be used by this mapping (perhaps this could be expressed as a target number of transactions in the mapping)
set a minimum retention (configurable, default to 1 hour?): transactions can be pruned if we exceed target usage as long as they are older than the minimum
set a target retention (configurable, default to 24 hours?): transactions can be pruned if they are older than this even if we are not exceeding target usage
We will need to keep around extra metadata to facilitate pruning, e.g. age of entries in the map.
The text was updated successfully, but these errors were encountered:
Users should be able to get feedback on their transactions, especially why they are not being sequenced, even if submitted through the public mempool. To this end, we should add a new transaction status API. This can be an extension of the existing
tx_submit
API or an entirely new module. Either way, it should have an endpointGET /status/:hash
, which returns one of the following responses:Notes:
sequenced
status is less critical, because this information can be obtained from the query service or block explorer, so it's a nice-to-have for the builderrejected
status should return the same error that would have been returned from the builder's privatesubmit
endpoint, if applicable, but could also return other errors (e.g. transaction was initially accepted but was dropped from the transaction channel due to overflow)To make this API possible, we will need to add to the state a mapping from transaction hash to status. This mapping would be updated whenever a transaction is rejected (by error return the private submit endpoint, by error when handling transactions on the public mempool event stream, or by getting dropped from the channel) or sequenced (ie appears in a DA proposal linked to a decide event) (nice-to-have).
We will also want to prune this mapping periodically. I think we should use a pruning policy similar to the query service, namely:
We will need to keep around extra metadata to facilitate pruning, e.g. age of entries in the map.
The text was updated successfully, but these errors were encountered: