witnet / witnet-rust

Open source Rust implementation of the Witnet decentralized oracle protocol, including full node and wallet backend 👁️🦀
https://docs.witnet.io
GNU General Public License v3.0
179 stars 56 forks source link

A set of fixes and features for wit\2 #2472

Closed drcpu-github closed 3 months ago

drcpu-github commented 4 months ago

The first four commits are part of https://github.com/witnet/witnet-rust/pull/2469.

The latter four commits are all new self-contained patches that introduce a fix or feature, but they build upon each other, so I kept them in the same branch.

drcpu-github commented 3 months ago

Pertaining to above discussions, this is what is currently implemented in the branch up to commit 9ec8d09: 1) All rf stakers are eligible to produce a block 2) Block winner comparison is power, vrf, block hash, in that order 3) If none of the eligible stakers produce a block, they will get slashed proportional to their rank 4) Validation code to make sure no one stakes on a validator with a different withdrawer address 5) A way to switch block times moving from V1_8 to V2_0 6) A bunch of small features and bugfixes

drcpu-github commented 3 months ago

Things to (potentially) still implement (of the top of my head): 1) Multiplication for the rf factor when more than one block is missing 2) Move wit/2 constants to a central file 3) Better ratios for slashing validators

drcpu-github commented 3 months ago

For the sake of an easier review, the block time patch is on https://github.com/witnet/witnet-rust/pull/2473.