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

Improvement/longer pricing window #616

Merged
merged 10 commits into from
Oct 6, 2024

Conversation

ldmberman
Copy link
Member

No description provided.

@JamesPiechota JamesPiechota force-pushed the feature/packing-difficulty branch from d42664f to 50a0afe Compare September 20, 2024 20:41
@JamesPiechota JamesPiechota force-pushed the improvement/longer-pricing-window branch from 9b16086 to 17e462b Compare September 20, 2024 20:57
@JamesPiechota JamesPiechota changed the base branch from feature/packing-difficulty to master September 20, 2024 20:58
@JamesPiechota JamesPiechota force-pushed the improvement/longer-pricing-window branch from 17e462b to 4c87e07 Compare September 23, 2024 23:59
@@ -582,7 +582,7 @@ repack_no_nif(Args) ->
case unpack(StoredPacking, ChunkOffset, TXRoot,
Chunk, ChunkSize, PackingState, External) of
{ok, Unpacked, _WasAlreadyUnpacked} ->
case pack(RequestedPacking, ChunkOffset, TXRoot, Chunk, PackingState, External) of
case pack(RequestedPacking, ChunkOffset, TXRoot, Unpacked, PackingState, External) of
Copy link
Collaborator

Choose a reason for hiding this comment

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

🙌

Lev Berman added 2 commits October 4, 2024 14:24
- Separate the locked rewards period and the pricing window apart;
- compute the reward history hash iteratively from the previous reward
  history hash.
@ldmberman ldmberman force-pushed the improvement/longer-pricing-window branch 2 times, most recently from eb29d19 to da32de1 Compare October 5, 2024 14:25
@JamesPiechota JamesPiechota force-pushed the improvement/longer-pricing-window branch from da32de1 to 2636b98 Compare October 6, 2024 01:09
@JamesPiechota JamesPiechota force-pushed the improvement/longer-pricing-window branch from 2636b98 to 9f169c0 Compare October 6, 2024 01:13
JamesPiechota and others added 7 commits October 6, 2024 01:14
The reward history that gets cached in #block and returned by /reward_history has
to be long enough to include:
1. The current reward history (i.e. reward_history_length(Height))
2. The reward history that was in use recently
   (i.e. reward_history_length(Height - expected_hashes_length(Height)))
3. The current locked rewards (i.e. locked_rewards_blocks(Height))

This change handles 2 rare but important cases:
1. when a hard fork causes a change in the reward history length
2. when forking off for a testnet which uses a different reward history
   length
@JamesPiechota JamesPiechota force-pushed the improvement/longer-pricing-window branch from 9f169c0 to eab2b96 Compare October 6, 2024 01:17
@JamesPiechota JamesPiechota merged commit b5ccf47 into master Oct 6, 2024
65 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.

2 participants