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

archive db has blocks with no parent_id #6433

Closed
deepthiskumar opened this issue Oct 20, 2020 · 0 comments · Fixed by #6470
Closed

archive db has blocks with no parent_id #6433

deepthiskumar opened this issue Oct 20, 2020 · 0 comments · Fixed by #6470
Assignees
Labels
Milestone

Comments

@deepthiskumar
Copy link
Member

deepthiskumar commented Oct 20, 2020

  1. Seeing entries in the blocks table with null values in the parent_id column. The archive node failed to add the parents of such blocks because of another issue (see the next point). I think we should make parent_id a NOT NULL field. For genesis block make parent_id point to the genesis blocks id (self-pointer)
  2. Seeing the following error when adding some blocks:
     error: "Request to <postgres://postgres:_@hard-fork-archive-node-postgresql:5432/archive> failed: ERROR: duplicate key
    value violates unique constraint \"blocks_internal_commands_pkey\"\nDETAIL: Key (block_id, internal_command_id)=(119,
    59) already exists.\n Query: \"INSERT INTO blocks_internal_commands (block_id, internal_command_id, sequence_no, 
    secondary_sequence_no) VALUES ($1, $2, $3, $4)\"."
    
    

internal_command_ids could be duplicated within a block.
For example: Two different fee transfers with the same fee and same receiver; one in a fee-transfer transaction and the other in a coinbase transaction as it was in this case or two different fee transfers with the same fee and same receiver but in different fee-transfer transactions (possible when a block occupies slots in two trees of a scan state)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants