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

Allow for using block_api.get_block API #61

Merged
merged 8 commits into from
Feb 19, 2024
Merged

Conversation

eonwarped
Copy link
Contributor

@eonwarped eonwarped commented Feb 12, 2024

Prepares for eventual deprecation of condenser_api.get_block.

  • Handle new output format (inner block parameter)
  • Handles HIVE/HBD nai assets used in transfer op and commentOptions op
  • Reformatting beneficiaries in commentOptions to match old API

Moves a few configurable options to config:

  • hashVerificationNode - string or false, default value is false. Whether to tail a different hive engine API and check for hash match before committing a block to the DB. Example of a valid value to enable this feature would be "https://api.hive-engine.com/rpc/blockchain"
  • streamerOptions.antiForkBufferMaxSize - int, default value is 2. The number of blocks to check ahead to confirm same fork before sending block for processing
  • streamerOptions.maxQps - int, default value is 1. Max queries to send at a time per node in config
  • streamerOptions.lookaheadBufferSize - int, default value is 5. Number of blocks to fetch at a time using all nodes in config. Note that if any node in the config is unresponsive it can cause the block fetching to stall.
  • streamerOptions.useBlockApi - boolean, default value is false. Whether to use block_api get_block as opposed to condenser_api.get_block which is deprecated.

Also

  • Minor fixes to debuggability (hash verification mode)

@eonwarped eonwarped changed the base branch from main to qa February 13, 2024 14:48
plugins/Blockchain.js Outdated Show resolved Hide resolved
plugins/Blockchain.js Outdated Show resolved Hide resolved
plugins/Blockchain.js Outdated Show resolved Hide resolved
Copy link
Contributor

@bt-cryptomancer bt-cryptomancer left a comment

Choose a reason for hiding this comment

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

It looks like you've changed the enableHashVerification setting to hashVerificationNode, but forgot to make the corresponding update to config.example.json.

Also, can you please document on the PR what each of the new streamerConfig settings is for, and confirm that the default values you've selected are good values for production use (so node operators can simply copy the example when upgrading)?

@eonwarped
Copy link
Contributor Author

It looks like you've changed the enableHashVerification setting to hashVerificationNode, but forgot to make the corresponding update to config.example.json.

Also, can you please document on the PR what each of the new streamerConfig settings is for, and confirm that the default values you've selected are good values for production use (so node operators can simply copy the example when upgrading)?

Done with config. Updating PR.

Copy link
Contributor

@bt-cryptomancer bt-cryptomancer left a comment

Choose a reason for hiding this comment

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

Thanks, looks good now.

@bt-cryptomancer bt-cryptomancer merged commit fdd05ec into qa Feb 19, 2024
8 checks passed
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.

3 participants