feat: Add archive_unstable_transactionReceipt for efficient transaction lookup#182
feat: Add archive_unstable_transactionReceipt for efficient transaction lookup#182Nathy-bajo wants to merge 5 commits into
Conversation
|
Happy new year @Nathy-bajo! 🎉 I’m with you on the main points:
That said, I think there are a couple of real issues with this PR as-is: 1) This shouldn’t go into
|
|
@josepot Thank you for the detailed feedback. I’ve reworked the solution as |
|
Would love to hear what use-cases you have in mind for this method? Do you plan to use it for scanning different hashes in the full chain? Would you like to monitor different behaviors that might be too intense to execute from following the tip of the chain? Ultimately, it feels to me that this behavior could be better achived locally by users:
Otherwise, this implementation might add too much pressure on archive nodes to provide a response, which might take a very long time in comparison with the local DB implementation. |
The "run a local script" path is valid for operators who control their own node, but this RPC is specifically for the large class of consumers who don't. |
|
@lexnv please what do you think of the current spec? |
Could this be achieved via To determine the exact block, users can run a When the network was down for more than 1.5 minutes, you could still fallback to using the
IIUC, the relayers should know the block hash from the finality proofs. Then, they should only check for transaction inclusion in the specific block (archive_v1_body should be the most straight forward way to achieve that) |
|
Thanks @lexnv. Quick context: there was prior consensus on adding this method on the polkadot technical fellowship public chat (approved by @bkchr), so the question here is on shape, not on whether it should exist.
Your DoS concern is fair. The revised spec makes the index opt-in via rpc_methods (also resolves @bkchr "nodes don't have this info"), requires a server-side count cap, adds a Also reframed as a query, not a verification, per @bkchr . Trustless inclusion needs finality proofs or a light client. Renamed to findTransaction per your suggestion. |
Where? I can not remember that I ever said this. |
|
|
I would not say that this is a consensus :D |
|
@bkchr Are you saying we don't need this method? |
Fair, dropping the consensus framing. Every concern raised has been addressed in the current spec (opt-in indexing, query-not-verification, location-only response, fork-aware status, bounded pagination, renamed to |
|
Best to get some feedback from @josepot. As you can only use this with full nodes, I don't see that much value in them. Plus it will require that we store extra data per node to have this data available. |
|
@bkchr Light clients can use this method trustlessly even though they can't serve it. The flow: the light client calls Without this method, a light client answering "where did my tx land?" has to scan every block since submission and pull each body, which is exactly the inefficiency this addresses. On the storage cost: it's opt-in. Nodes that don't want to maintain the index don't advertise it in Will wait for @josepot's read too. |
|
@bkchr Your argument in the Polkadot technical fellowship chat was that light clients should also be able to use this method, which the current design supports. |
This doesn't work, because you have no idea what a |
You're right that finality alone doesn't give the light client a header at an arbitrary past block. Two cases where verification still works trustlessly:
Beyond strict light clients, the actual consumers (wallets, indexers, explorers, relayers) already operate in an RPC trust model for everything else. |
|
Hi @josepot, still waiting for your feedback on this please. |


resolves #181
This PR implements
archive_unstable_transactionReceiptto provide efficient, stateless transaction location queries without requiring full block downloads