decred / dcrstakepool

Stakepool for Decred.
Other
73 stars 75 forks source link

block approval policy #199

Open chappjc opened 7 years ago

chappjc commented 7 years ago

A stake pool will need some kind of policy definition and enforcement framework. Policy refers to accepting or rejecting blocks based on some kind of criteria (e.g. spending certain funds, miner misbehavior, etc.).

To vote according to policy, stakepoold will need a bunch of additional information and the ability to analyze a block to decide up or down.

jolan commented 6 years ago

It would be nice to at least have this implemented even as a proof-of-concept since there are a few scenarios in which it might need to be deployed.

Right now stakepoold invokes a generatevote RPC which generates and signs the vote and returns in.

It would be better if stakepoold generated the votes locally then sent them all over gRPC to a 'signvotes' method that would sign and return all the tickets use the gRPC method signtransaction per @jrick below. This should lower the time-to-vote even more.

Then you could implement a generic 'miner creating blocks that aren't the latest PoW version' policy as a PoC.

jrick commented 6 years ago

did you mean a "signvotes" method?

https://github.com/decred/dcrwallet/blob/master/rpc/documentation/api.md#signtransaction should work just fine for this. Nothing special about votes that they need to be signed differently.

jolan commented 6 years ago

Yes & thanks, I edited my comment appropriately.