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

rosetta-cli check:data failures #83

Closed
qiwu7 opened this issue Oct 10, 2020 · 9 comments · Fixed by #98
Closed

rosetta-cli check:data failures #83

qiwu7 opened this issue Oct 10, 2020 · 9 comments · Fixed by #98
Assignees

Comments

@qiwu7
Copy link

qiwu7 commented Oct 10, 2020

getting duplicated transaction hash error while trying to sync from 50000 to 120010

Error: unable to process blocks: unable to process block: unable to store transaction hash: duplicate transaction hash: duplicate transaction bafy2bzacea5ljsf44bxpfjvekhrjy3tu2sivajg7zeuxk7wvqc6rrps2tmssi found in block 0171a0e4022016e66e66ffe5a99520283fa5fa3a963470163c31db7804f55163cf14e903d7a0:50003: unable to add block to storage 0171a0e4022016e66e66ffe5a99520283fa5fa3a963470163c31db7804f55163cf14e903d7a0:50003: unable to sync to 120010
@qiwu7
Copy link
Author

qiwu7 commented Oct 10, 2020

If I query block 41281, I am getting 7393 duplicated transaction with this hsh bafy2bzacedrjokkpqbvaxza2v65km2lcsq5l6e3wx4j66r66ker5fs4p5orbq. It seems that we are including the same transaction multiple times. But if the 2 transactions are different but are having same transaction hash (message id) then it's a even worse issue. But please do some investigation and fix as needed.

{
    "network_identifier": {
        "blockchain": "Filecoin",
        "network": "{{testnet_network}}"
    },
    "block_identifier": {
        "index": 41281
    }
}

@raynaudoe
Copy link
Collaborator

raynaudoe commented Oct 10, 2020

I'll look into it as soon any of our nodes gets synced.
But from the look of it maybe it's related to something on traces, there's no way the proxy deliberately includes the same transaction more than once:
https://github.com/Zondax/rosetta-filecoin-proxy/blob/c301d038f6421073982e8ef993bacda8ce486d7e/rosetta/services/block.go#L203-L202

@arajasek
Copy link

41281 is the epoch when our first "upgrade" would be computed, which involved a lot of irregular transitions. These transitions don't actually live on chain as any messages, but we provided a way to include them in ExecutionTraces. Sounds like we need to modify the way we include them so that the tx hashes are not duplicated. This should be easy to do, it doesn't impact consensus.

@jleni jleni added the ExternalDep External dependency label Oct 12, 2020
@jleni
Copy link
Member

jleni commented Oct 12, 2020

Ok, I will mark the issue as an external dependency. This is something not related to the proxy itself.

@qiwu7
Copy link
Author

qiwu7 commented Oct 12, 2020

@arajasek @jleni tipSet at 41281 is just an example. There are other blocks that contains dup transactions. For instance 50003 also includes duplicated transactions. I was not able to test every single block though.

@jleni
Copy link
Member

jleni commented Oct 13, 2020

Related to filecoin-project/lotus#4350

@raynaudoe
Copy link
Collaborator

I'll add some code to avoid including this "fake" transactions, hopefully checking if Msg.Nonce == math.MaxUint64 will be enough?
We also have to make sure that no one uses that nonce in a "real" transaction.

@jleni
Copy link
Member

jleni commented Oct 13, 2020

@raynaudoe Lotus changed this (Msg.Nonce == math.MaxUint64) in the PR. This will not work anymore, please check here filecoin-project/lotus#4350

@raynaudoe
Copy link
Collaborator

ok, I guess that filtering by address (builtin0.BurntFundsActorAddr and builtin.ReserveAddress) would be an option. I remember that both of those addresses had reconciliation issues on a previous rosetta-cli check run.

@qiwu7 qiwu7 added the P0 label Oct 14, 2020
@jleni jleni linked a pull request Oct 14, 2020 that will close this issue
@jleni jleni self-assigned this Oct 14, 2020
@jleni jleni removed the ExternalDep External dependency label Oct 14, 2020
@jleni jleni closed this as completed in #98 Oct 14, 2020
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 a pull request may close this issue.

4 participants