Skip to content
This repository has been archived by the owner on Jan 3, 2023. It is now read-only.

Decouple the block reward logic and make it configurable #239

Open
adlrocha opened this issue Aug 25, 2022 · 0 comments
Open

Decouple the block reward logic and make it configurable #239

adlrocha opened this issue Aug 25, 2022 · 0 comments

Comments

@adlrocha
Copy link
Collaborator

We currently use a flat reward logic in Eudico, where the validator that signs the block gets the full reward:

func applyMiningRewards(ctx context.Context, vmi vm.Interface, em stmgr.ExecMonitor, b store.BlockMessages, epoch abi.ChainEpoch, ts *types.TipSet, value abi.TokenAmount) error {

This makes sense for longest-chain protocols, but in other consensus algorithms (like BFT) where the block validation is "collaborative", we should support other reward strategies. Having a configurable block reward also enables subnets to choose the incentive system that better suits them.

I propose to implement an interface for the block reward, and pass the desired reward scheme as an argument in subnets and consensus algorithms.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant