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

Websocket confirmation topic : Add source_account on receive blocks / open blocks #3538

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

gr0vity-dev
Copy link
Contributor

In response to issue 3523 ( #3523 )
I added the source_account into the websocket confirmation topic.

The source_account is added for each block type. It follows the same logic as "block_info" rpc call.
For "open" and "receive" blocks, we show the nano_address corresponding to the sender account.
Else (for "send", "change" and "epoch") we show "0"

…nd open blocks

Websocket confirmation topic : Add source_account on receive blocks and open blocks
@clemahieu
Copy link
Contributor

The concept for this PR makes sense and I agree it'd be useful to implementations.

The websocket.confirmation_options test fails which needs to be addressed. This seems like a possible race condition in the test that can be fixed.

I think this information is more generally applicable, specifically it's useful in both RPCs and web socket callbacks. Additionally, it seems useful to have a single data item that identifies the counterparty, rather than using two depending if it's a send or a receive.

I've made two changes I think will make this most useful. These changes would deprecate "link_as_account" which is only a translation of the link field to an account number and only works for send blocks, and adds "linked_account" which is the counterparty for any balance-changing transaction, omitted if it is not a balance changing transaction.

https://github.com/nanocurrency/nano-node/tree/websocket_confirmation_source_account

@zhyatt zhyatt added documentation This item indicates the need for or supplies updated or expanded documentation websockets deprecation Indicates functionality is being deprecated labels Nov 1, 2021
@zhyatt zhyatt added this to the V23.0 milestone Nov 1, 2021
@zhyatt zhyatt requested review from clemahieu and thsfs November 1, 2021 17:10
@zhyatt zhyatt modified the milestones: V23.0, V24.0 Nov 2, 2021
@zhyatt
Copy link
Collaborator

zhyatt commented Nov 2, 2021

After discussion, we need to further define the structure for this and will do so soon, but the PR will be merged for a version after V23.0

@qwahzi qwahzi modified the milestones: V24.0, Prioritised Dec 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deprecation Indicates functionality is being deprecated documentation This item indicates the need for or supplies updated or expanded documentation websockets
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants