fix(consensus): restore BCH ASERT fractional polynomial #21
No reviewers
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
pool
post-quantum
question
third-party
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
ignotusnemo/parano1d!21
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/asert-fractional-polynomial"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Preserve the v1 mainnet ASERT rule and stage the exact BCH
CalculateASERTfractional polynomial for the next consensus upgrade.The v1 implementation divides the quadratic term by
65536, while both divisions in the cubic term make that term zero for everyu16fractional value. This differs from the BCH reference by up to about 15.2% near the upper fractional boundary.This change:
u128intermediates;ASERT_BCH_ACTIVATION_HEIGHTasNone, leaving production activation disabled;Closes #20.
Protocol impact
There is no current mainnet consensus change. With activation set to
None,next_targetuses the existing v1 rule at every height.A future v2 consensus release can set one announced activation height. Headers below it will continue to use the legacy rule, while the corrected BCH rule will apply at and above it.
Proof, wire format, storage format, wallet and network messages are unchanged.
Verification
cargo fmt --all -- --checkcargo test --release -p noid_chain --locked(347 passed, 1 ignored; 5 integration tests and 1 doc test passed)Thanks. The BCH correction and regression vectors are correct. I will extend this PR with the legacy rule and an explicitly disabled v2 activation before merge. This will keep the existing mainnet history and current behavior unchanged while leaving the corrected rule ready for the common v2 activation height.