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

fix(consensus): check blockchain version within valid range #3916

Conversation

sdbondi
Copy link
Member

@sdbondi sdbondi commented Mar 14, 2022

Description

  • adds consensus constant for valid block version range
  • adds check in header validator for valid version range

Motivation and Context

Currently the block version is not checked as so may contain an arbitrary version. This PR fixes that by adding this check to the header validators.

How Has This Been Tested?

Added a unit test

@sdbondi sdbondi force-pushed the core-validation-check-block-version-range branch 2 times, most recently from 227beec to 9a6fd83 Compare March 14, 2022 11:43
@sdbondi sdbondi force-pushed the core-validation-check-block-version-range branch from 9a6fd83 to e9181dc Compare March 14, 2022 11:43
@sdbondi sdbondi changed the title fix(consensus): add valid range for blockchain version fix(consensus): check blockchain version within valid range Mar 14, 2022
@aviator-app aviator-app bot merged commit faf23f3 into tari-project:development Mar 15, 2022
@sdbondi sdbondi deleted the core-validation-check-block-version-range branch March 15, 2022 09:57
sdbondi added a commit to sdbondi/tari that referenced this pull request Mar 15, 2022
* development: (118 commits)
  chore: clean up providing seed words from LibWallet (tari-project#3906)
  chore: move tari_script into its own crate (tari-project#3909)
  fix(consensus): check blockchain version within valid range (tari-project#3916)
  ci: fix missing npm deps and add javascript ci (tari-project#3910)
  refactor: use clap as a commands parser (tari-project#3867)
  chore: use git tagged tari_utilities and tari-crypto deps (tari-project#3913)
  fix: aligned tables left (tari-project#3899)
  ci: fix vue build
  v0.29.0
  feat!: add recovery byte to output features (tari-project#3727)
  add ffi ci check (tari-project#3915)
  fix(block-sync): use avg latency to determine slow sync peer for block sync (tari-project#3912)
  fix: fix merge mining proxy pool mining (tari-project#3814)
  revert: remove use of blocking tasks for DHT db (reverts tari-project#3887) (tari-project#3901)
  chore: add license info missing from some crates (tari-project#3892)
  fix(core): correctly filter pruned sync peers for block sync (tari-project#3902)
  ci: revert bors squash merge (tari-project#3900)
  fix: update metadata size calculation to use FixedSet.iter()
  docs(rfc): deep links structure convention - deep links is use (tari-project#3897)
  ci: use squash merge for bors (tari-project#3896)
  ...
sdbondi added a commit to Cifko/tari that referenced this pull request Mar 16, 2022
* development:
  chore: clean up providing seed words from LibWallet (tari-project#3906)
  chore: move tari_script into its own crate (tari-project#3909)
  fix(consensus): check blockchain version within valid range (tari-project#3916)
  ci: fix missing npm deps and add javascript ci (tari-project#3910)
  refactor: use clap as a commands parser (tari-project#3867)
  chore: use git tagged tari_utilities and tari-crypto deps (tari-project#3913)
  fix: aligned tables left (tari-project#3899)
  ci: fix vue build
  v0.29.0
  feat!: add recovery byte to output features (tari-project#3727)
  add ffi ci check (tari-project#3915)
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.

None yet

2 participants