Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop' into feat/naka-miner-he…
Browse files Browse the repository at this point in the history
…uristics
  • Loading branch information
kantai committed Sep 25, 2024
2 parents 541d13b + 447bb15 commit 251dc3c
Show file tree
Hide file tree
Showing 7 changed files with 760 additions and 32 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/bitcoin-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ jobs:
- tests::signer::v0::partial_tenure_fork
- tests::signer::v0::mine_2_nakamoto_reward_cycles
- tests::signer::v0::signer_set_rollover
- tests::nakamoto_integrations::stack_stx_burn_op_integration_test
- tests::nakamoto_integrations::burn_ops_integration_test
- tests::nakamoto_integrations::check_block_heights
- tests::nakamoto_integrations::clarity_burn_state
- tests::nakamoto_integrations::check_block_times
Expand Down
7 changes: 4 additions & 3 deletions pox-locking/src/events.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,11 @@ fn create_event_info_data_code(
// If a given burn block height is in a prepare phase, then the stacker will be in the _next_ reward cycle, so bump the cycle by 1
// `prepare_offset` is 1 or 0, depending on whether current execution is in a prepare phase or not
//
// "is-in-next-pox-set" == effective-height <= (reward-length - prepare-length)
// "<=" since the txs of the first block of the prepare phase are considered in the pox-set
// "is-in-next-pox-set" == effective-height < (cycle-length - prepare-length)
// "<" since the txs of the first block of the prepare phase are NOT considered in the pox-set,
// the pox-set is locked in the first block of the prepare phase, before the transactions of that block are run.
let pox_set_offset = r#"
(pox-set-offset (if (<=
(pox-set-offset (if (<
(mod (- %height% (var-get first-burnchain-block-height)) (var-get pox-reward-cycle-length))
(- (var-get pox-reward-cycle-length) (var-get pox-prepare-cycle-length))
) u0 u1))
Expand Down
Loading

0 comments on commit 251dc3c

Please sign in to comment.