-
Notifications
You must be signed in to change notification settings - Fork 681
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: use cur burn block to fetch reward cycle info
- Loading branch information
Showing
9 changed files
with
298 additions
and
106 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
;; PoX mainnet constants | ||
;; Min/max number of reward cycles uSTX can be locked for | ||
(define-constant MIN-POX-REWARD-CYCLES u1) | ||
(define-constant MAX-POX-REWARD-CYCLES u12) | ||
|
||
;; Default length of the PoX registration window, in burnchain blocks. | ||
(define-constant REGISTRATION-WINDOW-LENGTH u250) | ||
|
||
;; Default length of the PoX reward cycle, in burnchain blocks. | ||
(define-constant REWARD-CYCLE-LENGTH u1000) | ||
|
||
;; Valid values for burnchain address versions. | ||
;; TODO: These correspond to address hash modes in Stacks 2.0, | ||
;; but they should just be Bitcoin version bytes: we don't | ||
;; need to constrain PoX recipient addresses the way that | ||
;; we constrain other kinds of Bitcoin addresses | ||
(define-constant ADDRESS-VERSION-P2PKH 0x00) | ||
(define-constant ADDRESS-VERSION-P2SH 0x01) | ||
(define-constant ADDRESS-VERSION-P2WPKH 0x02) | ||
(define-constant ADDRESS-VERSION-P2WSH 0x03) | ||
|
||
;; Stacking thresholds | ||
(define-constant STACKING-THRESHOLD-25 u20000) | ||
(define-constant STACKING-THRESHOLD-100 u5000) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
;; PoX testnet constants | ||
;; Min/max number of reward cycles uSTX can be locked for | ||
(define-constant MIN-POX-REWARD-CYCLES u1) | ||
(define-constant MAX-POX-REWARD-CYCLES u12) | ||
|
||
;; Default length of the PoX registration window, in burnchain blocks. | ||
(define-constant REGISTRATION-WINDOW-LENGTH u30) | ||
|
||
;; Default length of the PoX reward cycle, in burnchain blocks. | ||
(define-constant REWARD-CYCLE-LENGTH u120) | ||
|
||
|
||
;; Valid values for burnchain address versions. | ||
;; TODO: These correspond to address hash modes in Stacks 2.0, | ||
;; but they should just be Bitcoin version bytes: we don't | ||
;; need to constrain PoX recipient addresses the way that | ||
;; we constrain other kinds of Bitcoin addresses | ||
(define-constant ADDRESS-VERSION-P2PKH 0x00) | ||
(define-constant ADDRESS-VERSION-P2SH 0x01) | ||
(define-constant ADDRESS-VERSION-P2WPKH 0x02) | ||
(define-constant ADDRESS-VERSION-P2WSH 0x03) | ||
|
||
;; Stacking thresholds | ||
(define-constant STACKING-THRESHOLD-25 u480) | ||
(define-constant STACKING-THRESHOLD-100 u120) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.