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

Outputs are lost in pending transactions #400

Open
Keith-CY opened this issue Aug 13, 2023 · 2 comments
Open

Outputs are lost in pending transactions #400

Keith-CY opened this issue Aug 13, 2023 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@Keith-CY
Copy link
Member

Outputs are missing when the transaction is pending and appear when the transaction is committed.

Pending
image

Committed
image

@Keith-CY Keith-CY added the bug Something isn't working label Aug 13, 2023
@Keith-CY
Copy link
Member Author

Address, capacity are not parsed in the pending transaction
image

@rabbitz
Copy link

rabbitz commented Aug 16, 2023

Related PRs:

nervosnetwork/ckb-explorer#1389
nervosnetwork/ckb-explorer#1406

  1. outputs lost

When creating a new cell output, the cell has not yet been stored in the database because the validation has not passed. Therefore, when storing the associated cell data, the CellDatum primary key cell_output_id is nil, and the database cell_output_id is used to auto-increment and store. However, the auto-incremented cell_output_id conflicts with the old data cell_output_id in the database, resulting in failure to create the output.

https://github.com/nervosnetwork/ckb-explorer/blob/develop/app/jobs/import_transaction_job.rb#L69

  1. unable to decode address

When creating a cell input, you need to find previous_output, and the associated address is saved in previous_output. But cannot find corresponding cell output, maybe the transaction contains the cell output has not been processed, so add current transaction to pending list, and wait for future processing.

https://github.com/nervosnetwork/ckb-explorer/blob/develop/app/jobs/import_transaction_job.rb#L84
https://github.com/nervosnetwork/ckb-explorer/blob/develop/app/jobs/import_transaction_job.rb#L125

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: 🚩Pre Release
Development

No branches or pull requests

5 participants