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 Fix 4424 - non determinism in deposits #4435

Merged
merged 3 commits into from
Nov 23, 2021
Merged

Bug Fix 4424 - non determinism in deposits #4435

merged 3 commits into from
Nov 23, 2021

Conversation

ze97286
Copy link
Contributor

@ze97286 ze97286 commented Nov 23, 2021

close #4424

Explanation: banking engine got a number of asset actions for the same ethereum transactions. The asset actions are stored in a map by a unique identifier. When the asset action is first seen it will finalise the action (in this case the deposit). Nodes iterate over the map and process the asset actions sequentially - this leads to non-determinism - in this case, the each node have taken a different asset action and finalised a different deposit which lead to all nodes having different hash.

A good example to this in action is here: https://jenkins.ops.vega.xyz/blue/organizations/jenkins/system-tests%2Fsystem-tests/detail/system-tests/936/pipeline/384

log for node0: https://jenkins.ops.vega.xyz/blue/rest/organizations/jenkins/pipelines/system-tests/pipelines/LNL-create-restore/runs/922/nodes/386/steps/426/log/?start=0
log for node1: https://jenkins.ops.vega.xyz/blue/rest/organizations/jenkins/pipelines/system-tests/pipelines/system-tests/runs/936/nodes/386/steps/427/log/?start=0
log for node2: https://jenkins.ops.vega.xyz/blue/rest/organizations/jenkins/pipelines/system-tests/pipelines/LNL-create-restore/runs/922/nodes/385/steps/428/log/?start=0

It can be seen that the loss of consensus follows the error of "chain event reference a transaction already processed".

@ze97286 ze97286 requested a review from a team as a code owner November 23, 2021 11:10
@github-actions
Copy link

Build Error! No Linked Issue found. Please link an issue or mention it in the body using #<issue_id>

@github-actions
Copy link

Build Error! No Linked Issue found. Please link an issue or mention it in the body using #<issue_id>

@ze97286 ze97286 changed the title add debugging for deposits Bug Fix 4424 - non determinism in deposits Nov 23, 2021
@github-actions
Copy link

Build Error! No Linked Issue found. Please link an issue or mention it in the body using #<issue_id>

@EVODelavega EVODelavega merged commit de4e1ee into develop Nov 23, 2021
@EVODelavega EVODelavega deleted the bugfix/4424 branch November 23, 2021 15:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Invalid snapshot state with banking.deposits
3 participants