-
Notifications
You must be signed in to change notification settings - Fork 5
Stabilize transaction to version 1
#139
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
Conversation
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
jsdw
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm game to stabilise these; @josepot what do you reckon?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm sorry to be the one disagreeing a bit on this, but my honest opinion is that:
I'm in favour of stabilizing transaction.
However, with regards of transactionWatch: I'm in favour of completely removing it from the spec. The reason being that as @tomaka has said many times:
one of the guiding principles of this new JSON-RPC API is to not do anything magic in the background
I completely agree with that guiding principle, and to me transactionWatch does too much magic in the background for my liking.
Also, there are cases that are not properly covered. For instance: what happens if the consumer receives a bestChainBlockIncluded event and then, right after emitting that event, the "server" realizes that block is no longer considered to be part of the "best blocks", and the server is still figuring out where in the "new best branch" of blocks the tx is located...? Shouldn't the API in this case let the consumer know that the previously emitted event is no longer relevant? What would be the rigth way to communicate that?
IMO it's the responsibility of library authors to come up with their own systems/abstractions to communicate these things to the final consumer. The thing is that this watch does too much magic. The only way of using it effectively is IMO to communicate to the consumer exactly which blocks the server has scrutinized so far... but then, I would argue that this is pointless because the consumer may as well do that on their own... right? Therefore: wouldn't it be best to just remove it?
|
@lexnv we could tweak the PR to just stabilise My view on |
transaction and transactionWatch to version 1transaction to version 1
|
I'm conflicted about |
|
I've changed this PR to stabilize only the From my perspective, I do like the idea of having a Would love to get your thoughts on this 🙏 |
Given that different servers might be at different best blocks, and that the client has no way to know which best block the server has, it doesn't matter at all what the server does in that specific situation. The client expects the server to follow the chain and report the latest status of the transaction. The server is allowed to do less than this, and report the status less quickly/frequently than expected. |
|
This PR is only about stabilising |
This PR enables the `transaction_unstable_broadcast ` and `transaction_unstable_stop` RPC API. Since the API is unstable, we don't need to expose this in the release notes. After merging this, we could validate the API in subxt and stabilize it. Spec PR that stabilizes the API: paritytech/json-rpc-interface-spec#139 cc @paritytech/subxt-team Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
) This PR enables the `transaction_unstable_broadcast ` and `transaction_unstable_stop` RPC API. Since the API is unstable, we don't need to expose this in the release notes. After merging this, we could validate the API in subxt and stabilize it. Spec PR that stabilizes the API: paritytech/json-rpc-interface-spec#139 cc @paritytech/subxt-team Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
This PR stabilizes the following methods:
transaction_unstable_broadcast->transaction_v1_broadcasttransaction_unstable_stop->transaction_v1_stopcc @paritytech/subxt-team @tomaka @josepot