-
Notifications
You must be signed in to change notification settings - Fork 3
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
transaction: Change bestChainBlockIncluded
to Included
#87
Comments
I'd have no issue with this change since it's providing more information than what we get back at the moment. (fwiw I hope we keep something like |
Well, no, it's not that simple. If you report all the blocks where a transaction is included, then it becomes way more difficult for the JSON-RPC client to determine whether a transaction has a chance of being included in the finalized chain in the future. The JSON-RPC client already has to track the tree of blocks through |
Not sure why it needs to track all forks. The app should only change the view on the transaction being finalized (which is its own event). |
Why do you want to change the |
Because there are still apps outside that care. For Parachains that will also give you faster feedback on what is the status of your transaction (currently we don't set the best before we know that a block was included in the relay chain). The app seeing that the transaction was included in different forks, should not be a big problem for the app? I mean what is the best chain is a "local view" of the light client/full node anyway. Some other node could have a completely different view on what is the best. Currently we only know these apps where you exactly know that this app is using a blockchain and thus sending a transaction. However, for your and my grandmother we probably want to have apps that don't mention "transaction" at all and they are just pressing buttons. These kind of apps will not really need the "included" event, maybe to update some progress bar, but not that much more. |
My take-way from your comment is that you want to make this change for apps that are not end-user apps, that want quick feedback on when a transaction is included because 12 seconds is too long, but also tolerate not being able to precisely know on which forks the transaction is included. Again, what I think should happen is we leave this function as-is, because it is specifically meant to be easy to use, and if you want something more precise you track the transaction "manually" by following the chain from the JSON-RPC client side. |
The server should report the inclusion of a
transaction
in any block its seeing, not only what it assumes to be the best block. Best block is any way a highly opinionated view of the server. There are several factors that can determine on what is the actual best block (e.g. on going disputes etc). Another reason why the server returnIncluded
for every block are parachains. Parachains are determining on what is the best block by checking what is the best block of the relay chain. This means currently it takes at least around 12 seconds to get any kind of feedback on your transaction. While, the transaction is probably already in a block that it just waiting to get included in the relay chain.The most important event for dapps/wallets should be the
finalized
one any way, as it is then clear that the changes are not getting reverted. If we in between reported multiple blocks that included the transaction, shouldn't change anything.The text was updated successfully, but these errors were encountered: