-
Notifications
You must be signed in to change notification settings - Fork 4
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
Support upcoming DCP-0006 changes #7
Merged
Merged
Conversation
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
Since that version removed http logging, a custom request logger is introduced.
This moves the script_version attribute from the operation into the account metadata where it more naturally belongs. This eases parsing and makes it less likely to use the wrong script version along with an account.
This makes it so that the config file can specify the data and log dirs.
This makes the error point to the correct height.
This adds initial support for treasurybases for the new treasury work.
This changed the representation of accounts for some of the construction API types.
This changes the internal Op to carry the txhash of the transaction to avoid having to recalculate it repeatedly.
This switches the Rosetta implementation to fill the CoinChange information in blocks.
This switches the conversion from Rosetta to Decred transactions to read prevout information from metadata to the recently introduced CoinChange field in operations.
This modifies the tests for the block related functions to assert the generated CoinChange field is correct.
This modifies the /construct/metadata endpoint to return a fee estimation for the passed transaction. This is required so that clients can correctly build a valid tx.
This empties the operation's status field during a call to /construct/preprocess. This is needed because the check:construct rosetta-cli test expects empty status on this endpoint.
This changes the CombineTxSigs function so that input signatures assumed to be in the compact format are converted into the proper DER-encoded signatures that can redeem P2PKH outputs.
This adds a sample rosetta-cli config file that is usable for simnet runs of dcrros plus a sample dcrros config file that is usable with the standard dcrd/contrib/dcr_tmux_simnet_setup.sh environment.
This adds support to converting treasury txs (tbases, tadds and tspends) to Rosetta. The treasury account is represented by a special hard-coded address that does not correspond to any valid, standard v0 script addresses.
The treasury balance is tracked by a special account, identified in dcrros as "*treasury". This changes the /account/balance implementation to return the correct balance when that account is requested.
davecgh
reviewed
Oct 1, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Rebased on top of #6
This adds support on dcrros for identifying and handling the new transaction types introduced by DCP-0006: treasury base, add and spend transactions.
Assuming DCP-0006 passes, the treasury funds will now be handled as a special treasury account state by the consensus rules, instead of using the standard utxo model. This means these funds won't live in a standard output/address, which has implications for how balances are tracked in dcrros.
This PR changes the block processing functions to identify the treasury transactions and account for treasury funds in a hard-coded
TreasuryAccountAddress
, currently set to"*treasury"
.