Skip to content

Index more block data #1253

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

Merged
merged 1 commit into from
Feb 16, 2022
Merged

Index more block data #1253

merged 1 commit into from
Feb 16, 2022

Conversation

nymkappa
Copy link
Member

@nymkappa nymkappa commented Feb 16, 2022

This PR adds the following fields to the blocks table. Also, block indexing save this new data in the database.

  • version: integer unsigned
  • bits: integer unsigned
  • nonce: bigint unsigned
  • merkle_root: varchar(65)
  • previous_block_hash: varchar(65)

It also set proper data type for existing fiels:

  • height: int(11) => integer unsigned
  • tx_count: int(11) => smallint unsigned
  • size: int(11) => integer unsigned
  • weight: int(11) => integer unsigned
  • difficulty: bigint(20) => double

Database schema is incremented to version 6. If you have trouble running the migration, let me know, or if you don't mind loosing currently indexed data:

  • Drop blocks table
  • Drop pools table
  • Set state.schema_version = 2
  • Re-start node backend

@cla-bot cla-bot bot added the cla-signed label Feb 16, 2022
@nymkappa nymkappa requested review from softsimon and wiz February 16, 2022 06:22
@nymkappa nymkappa marked this pull request as ready for review February 16, 2022 06:23
@wiz
Copy link
Member

wiz commented Feb 16, 2022

Screen Shot 2022-02-16 at 15 32 44

Copy link
Member

@wiz wiz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested ACK @ v2.4.0-dev [0c1fa2b]

Copy link
Member

@softsimon softsimon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK

@wiz wiz merged commit e2e3546 into mempool:master Feb 16, 2022
@nymkappa nymkappa deleted the feature/index-more-data branch February 17, 2022 13:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy