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

PoX Updates: .pox-info contract for native information getters #2538

Closed
kantai opened this issue Mar 23, 2021 · 9 comments
Closed

PoX Updates: .pox-info contract for native information getters #2538

kantai opened this issue Mar 23, 2021 · 9 comments
Labels
PoX Proof-of-Transfer Related stacks-2.1

Comments

@kantai
Copy link
Member

kantai commented Mar 23, 2021

As part of Stacks 2.1, we should add an extension contract for obtain PoX information that must be implemented as native functions:

  • Getter for address lock information
  • Getter for whether an address is able to "early unlock"
  • Getter for current cycle reward set information
@kantai kantai added PoX Proof-of-Transfer Related stacks-2.1 labels Mar 23, 2021
@project-bot project-bot bot added this to New Issues in Stacks Blockchain Board Mar 23, 2021
@jcnelson
Copy link
Member

Adding to this:

We need these things to figure out what the BTC-denominated price of STX is on-chain.

Drilling down into "address lock information" and "current reward cycle set information", what do you think of these?

  • Getter for how many PoX addresses a Stacker clinched
  • Getter for how much a Stacker has been paid in BTC so far in this cycle
  • Getter for how many reward slots a Stacker will receive this cycle
  • Getter for how many reward slots a Stacker has been paid out to this cycle (including instances where no BTC was paid)

@aulneau
Copy link
Contributor

aulneau commented Mar 28, 2021

Something that might be nice would be some getters for delegate information. Right now it's pretty hard and a manual process to get data around pools that use contracts to call the pox contract. I have to manually know of and fetch data for each contract. If there is some way to make this clearer from the pox extension contract itself, that'd be fantastic!

@hstove
Copy link
Contributor

hstove commented May 6, 2021

Another request would be:

  • Getter for how much a Stacker was paid in BTC in a particular block

@jcnelson jcnelson added this to To do in Stacks 2.1 May 17, 2021
@hstove
Copy link
Contributor

hstove commented Jun 6, 2021

For this feature:

Getter for how much a Stacker has been paid in BTC so far in this cycle

It would be great to also allow cycle to be a parameter, so you could query for past cycles

@jcnelson
Copy link
Member

Added already: stx-get-account

@jcnelson
Copy link
Member

Regarding the getter for address lock information, this is the interface @lgalabru proposed:

What's our take on adding a pox key to get-block-info?, such as (get-block-info? pox <block-id>) returns a tuple (list 2 { recipient: principal, total-transfered: uint })?

@jcnelson jcnelson moved this from To do to In progress in Stacks 2.1 Apr 15, 2022
@jcnelson
Copy link
Member

jcnelson commented May 2, 2022

Split this issue into things we can put into .pox-info, and things that must live in get-block-info?.

@jcnelson jcnelson moved this from In progress to To do in Stacks 2.1 May 23, 2022
@jcnelson
Copy link
Member

Insofar as the minimum viable changes for .pox-2, simply exposing all of the contract state via getters should be sufficient. Querying data that is not in .pox-2 like the reward addresses should be a separate issue.

@jcnelson jcnelson moved this from To do to In progress in Stacks 2.1 Jun 9, 2022
@jcnelson jcnelson moved this from In progress to Review in progress in Stacks 2.1 Jun 9, 2022
@pavitthrap
Copy link
Contributor

Request to make current-pox-reward-cycle and burn-height-to-reward-cycle non private for the work in #3035

@jcnelson jcnelson moved this from Review in progress to Done in Stacks 2.1 Jul 11, 2022
@jcnelson jcnelson closed this as completed Aug 3, 2022
Stacks Blockchain Board automation moved this from New Issues to Done Aug 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PoX Proof-of-Transfer Related stacks-2.1
Development

No branches or pull requests

5 participants