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

isTreasuryActive #1817

Merged
merged 6 commits into from
Apr 27, 2021
Merged

isTreasuryActive #1817

merged 6 commits into from
Apr 27, 2021

Conversation

chappjc
Copy link
Member

@chappjc chappjc commented Apr 23, 2021

Record treasury active heights for mainnet and testnet, and
correctly pass the treasuryActive bool to various functions.

txhelpers.TreasuryHeightMainnet and TreasuryHeightTestnet3.
Simnet treasury is assumed active at genesis.

Put treasury parameters on the /parameters page.

Make a Treasury transactions section on the /block page.

Also add a "Fee Rate" column to the regular transactions section,
show rates in atoms/B.

On the /tx page, label treasury inputs and outputs:

  • Treasury Spend has a special input.
  • Treasury Add has a special output.
  • Treasurybase has special inputs and outputs.

Give timeouts for {search,send}rawtransaction RPCs

dcrpg: Also remove legacy pg db upgrades.

@chappjc
Copy link
Member Author

chappjc commented Apr 24, 2021

Block with a TAdd and Treasurybase:

image

Treasury Add with special output paying to treasury:

image

Treasury Spend with special input spending from treasury:

image

Treasurybase with generated coins input and output paying to treasury:

image

another http://127.0.0.1:8777/tx/77b75705997fafc8a394c8b5a164c48fd2dfc5a8416e89729f7e455ae5a85064

@chappjc
Copy link
Member Author

chappjc commented Apr 24, 2021

Fee rates shown for regular txns:

image

@chappjc
Copy link
Member Author

chappjc commented Apr 24, 2021

Treasury parameters (testnet):

image

Record treasury active heights for mainnet and testnet, and
correctly pass the treasuryActive bool to various functions.

txhelpers.TreasuryHeightMainnet and TreasuryHeightTestnet3.
Simnet treasury is assumed active at genesis.

Put treasury parameters on the /parameters page.

Make a Treasury transactions section on the /block page.

Also add a "Fee Rate" column to the regular transactions section,
show rates in atoms/B.

On the /tx page, label treasury inputs and outputs:
- Treasury Spend has a special input.
- Treasury Add has a special output.
- Treasurybase has special inputs and outputs.

Give timeouts for {search,send}rawtransaction RPCs

dcrpg: Also remove legacy pg db upgrades.

lib/pg up to 1.10.1

moar treasury
@chappjc
Copy link
Member Author

chappjc commented Apr 26, 2021

Running on testnet.dcrdata.org since last night.

@chappjc
Copy link
Member Author

chappjc commented Apr 26, 2021

Next step to support a new treasury page is new PG queries or even a new treasury table to fill out a treasury page with the three types of txns:

  • treasuryadd burns coins and credits the treasury account.
  • treasuryspend creates coins and debits the treasury account.
  • treasurybase is analogous to a coinbase in that it credits the treasury without spending/burning any coins, instead creating them out of thin air like coinbases

collect and store todo here: https://github.com/decred/dcrdata/pull/1817/files#diff-1256fb31f67b81d11af39cef8f5f93723821756f546f2b939b77d96280d5615aR3942

Also, the votes with a 4th output are used to authorize treasury spends so we should consider how to decode and track these types of votes and/or their treasury decision.

txhelpers/txhelpers.go Outdated Show resolved Hide resolved
@chappjc chappjc marked this pull request as ready for review April 27, 2021 17:06
@chappjc chappjc merged commit 5d6d511 into decred:master Apr 27, 2021
@chappjc chappjc deleted the treasury-types branch April 27, 2021 17:07
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.

1 participant