modifications to the stakebase tx vin[0] required adding a stakebase
field to Vin and VinPrevOut structs as well as updating the
rpc documentation for the affected calls.
This improves the help text for stakedifficulty field of the
getmininginfo RPC to clarify it is the value for the next block.
Also, update the JSON-RPC docs entry to include the field which should
have been done previously.
This renames the chaincfg parameter for the vote choice which represents
an abstaining vote to be named IsAbstain instead of IsIgnore since that
more accurately describes its intent and behavior.
It also updates the RPC server choice result field for isignore to be
named isabstain to match and bumps the major version accordingly.
Finally, it renames other internal variables which make use of the
choice to include the word abstain as well for clarity and renames a
couple of other internal variables.
Propagate version and bits on the getstakeversions call. Now we can
interrogate all raw vote version/bits data in addition to cooked values.
Diff is mostly mechanical exporting the Version:Bits tuple.
The getstakeversioninfo command returns vote and stake versions tally
for N intervals. It does always start with the current top of the chain
and counts backwards.
With this change we can keep the version and the bits in blockNode.
This is used to fix an oversight where we weren't strictly enforcing
the vote version. This also adds tests that validate quorum-1, quorum,
75%-1 and 75% rules during tallying.
Also adjust getvoteinfo totals to only return the specified vote version
totals.
Port BIP0009 over from btcd. The following is an overview of the
changes:
- Add new configuration options to the chaincfg package which allows the
rule deployments to be defined per chain
- Implement code to calculate the threshold state as required by voting
- Use threshold state caches that are stored to the database in order
to accelerate startup time
- Remove caches that are invalid due to definition changes in the
params including additions, deletions, and changes to existing
entries
- Verify that PoW and PoS majorities have been reached.
- Add tests for new error type
- Add tests for threshold state
- Deployments are per stake version.
- Add human readable vote/choice infrastructure.
- Add RPC command to interrogate vote status (getvoteinfo).
Change the block connected and disconnected notifications to include
the entire block header.
Do not notify the previous block's regular tree transactions if the
newly attached block voted to approve them. Instead, notify the
regular transactions from the newly attached block. It is up to the
client to check the vote bits in the header to decide how to handle
the previous block's regular transactions.
Every websocket client now has an associated transaction filter that
is used to determine whether or not a processed transaction is (or
might be) relevant to the client. A new RPC, loadtxfilter, has been
added to load, reload, or add to this filter.
Redo the entire rescan RPC to scan over previously-processed blocks
using the same transaction filter (rather than specifying which
addresses and outpoints to watch for in the rescan request).
Fixes#433.
Bump block version and add stake version to wire. Currently
StakeVersions are unused and once the enforcement logic goes in the
versions will bump again.
This fixes#435
This RPC is essentially a reimplementation of the wire protocol
getheaders and headers messages and is planned on being used by the
wallet to fetch block headers during startup sync.
Contains the following upstream commits:
- d4852101d4
- This commit has already been independently applied so it is mostly a
NOOP
- f389742b39
In addition, gofmt -s has been run again to simplify the new additions
to Decred and and all simplifications are included in the merge commit.
Contains the following upstream commits:
- 365b1bd156
- Previously cherry-picked so it is a NOOP
- b691a222d5
- Reverted because Decred uses a different signature algorithm
- c7eaee6020
In addition to the normal required changes for syncing, the following
changes have been made in order to facilitate integration into Decred:
- Rework the code which extracts stake submission outputs a bit to be a
little more efficient and to better fit with the code being merged
The createrawssrtx could not produce correctly formed revocations.
The code has been corrected to call the correct internal API. A
new 'fee' option was added to the JSON command to add a fee to the
revocation.
Two new commands were added to the daemon RPC server. They are:
ticketvwap: Calculate the volume weighted average price of tickets.
txfeeinfo: Get the transaction fee information for regular transactions
in blocks, the mempool, and a height range
The previous "ticketfeeinfo" command logic was also refactored for
portability.
The new RPC command estimatestakediff was added. It estimates the
minimum, maximum, and expected next stake difficulty. The caller can
also estimate a new difficulty given a passed number of tickets to be
mined in the remaining difficulty period.
* Add ticketfeeinfo command
The new RPC command ticketfeeinfo has been added. It provides
statistical information about ticket fees per kilobyte for the
mempool, recent blocks, and recent difficulty windows.
Ticket commitments (address and amount) are not properly displayed
by getrawtransaction verbose requests. Now they are part of the
pkScript JSON object.
New JSON handling has been added for the following wallet commands:
accountaddressindex
accountfetchaddresses
accountsyncaddressindex
getwalletinfo
getmasterpubkey has been modified to take an account argument.
The new daemon command livetickets has been added. This command dumps
the hashes for all the live tickets in the live ticket stake database.
The new daemon command existsaddresses has been added. This command
takes a JSON array of addresses represented as strings and returns a
bitset indicating whether or not the addresses are used on the block
chain or mempool.
A new RPC function has been added to the daemon to quickly check for
the existence of transactions in the mempool. It handles raw encoded
hex containing transaction hashes and outputs a raw encoded hex of
bit flags. This makes the output size as small as possible while
speeding up the JSON encoding/decoding of the data.
The JSON framework has been modified to enable two new RPC calls,
existsliveticket and getstakeinfo. existsliveticket handling has
been added to the daemon RPC. It checks for the existence of a ticket
in the live ticket stake database given a hash.