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

[Bug]: Incorrect account recorded in transfer #9793

Closed
ze97286 opened this issue Oct 16, 2023 · 0 comments · Fixed by #9794
Closed

[Bug]: Incorrect account recorded in transfer #9793

ze97286 opened this issue Oct 16, 2023 · 0 comments · Fixed by #9794
Assignees
Labels

Comments

@ze97286
Copy link
Contributor

ze97286 commented Oct 16, 2023

Problem encountered

in was observed in the database that we have global insurance account with incorrect owner field (0x0). This incorrect account is created by datanode upon getting a transfer with a to/from account that don't yet exist, or more accurately don't exist in the format that datanode is looking for them. In this specific example, the transfer reports the to account of global insurance with "0000000000000000000000000000000000000000000000000000000000000000", which comes to represent the network owner, however it is not escaped as network owner (which would be recorded in the db as party 0x3) but rather as is ie a party 0x0. This leads to multiple global insurance (in this example) accounts in the database for the same asset.

Observed behaviour

See above.

Expected behaviour

In this case where vega core reports a transfer with a from/to "0000000000000000000000000000000000000000000000000000000000000000" they should be translated to network owner. There are 2 other types of edge cases that will not work with this:

  1. in a recurring transfer with dispatch metric, the to of the transfer doesn't imply which accounts it's actually going to be dispatched to
  2. in governance transfer to/from market account, the to/from are actually markets rather than party which is not interpreted correctly by datanode.

That said, I don't think it matters much. In both of the cases above, datanode may save some account id along with the transfer which is used for filtering transfers transactions so it may just be fine.

Steps to reproduce

1. Submit `xyz` transaction
2. With this payload
3. Query `abc` API
4. Observe the error

Software version

v0.73.0-preview.16

Failing test

No response

Jenkins run

No response

Configuration used

No response

Relevant log output

No response

@ze97286 ze97286 added the bug label Oct 16, 2023
@ze97286 ze97286 assigned gordsport and ze97286 and unassigned gordsport Oct 16, 2023
@vega-issues vega-issues moved this to Waiting Review in Core Kanban Oct 16, 2023
@vega-issues vega-issues moved this from Waiting Review to Approved in Core Kanban Oct 16, 2023
@github-project-automation github-project-automation bot moved this from Approved to Merged in Core Kanban Oct 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants