Repository navigation
feat: ADR-004 (Nakamoto Bonus) - #10
Conversation
| c := sdk.UnwrapSDKContext(ctx) | ||
|
|
||
| // dynamically adjust the nakamoto bonus coefficient first. | ||
| if err := k.AdjustEta(c); err != nil { |
Check warning
Code scanning / CodeQL
Panic in BeginBock or EndBlock consensus methods
| if ctx.BlockHeight() > 1 { | ||
| if err := k.AllocateTokens(ctx, previousTotalPower, ctx.VoteInfos()); err != nil { | ||
| if c.BlockHeight() > 1 { | ||
| if err := k.AllocateTokens(ctx, previousTotalPower, c.VoteInfos()); err != nil { |
Check warning
Code scanning / CodeQL
Panic in BeginBock or EndBlock consensus methods
| func (am AppModule) BeginBlock(ctx context.Context) error { | ||
| c := sdk.UnwrapSDKContext(ctx) | ||
| return BeginBlocker(c, am.keeper) | ||
| return am.keeper.BeginBlocker(c) |
Check warning
Code scanning / CodeQL
Panic in BeginBock or EndBlock consensus methods
This comment has been minimized.
This comment has been minimized.
|
Does this PR replace atomone-hub/atomone#182? |
julienrbrt
left a comment
There was a problem hiding this comment.
nice work! first walk-trough, i'll check the tests more carefully later today/tomorrow
…at/nakamoto-bonus # Conflicts: # Makefile # api/cosmos/distribution/v1beta1/distribution.pulsar.go # x/distribution/types/query.pb.go
13d1ae5 to
f64aa85
Compare
… if the feature is enabled
Co-authored-by: Thomas <thomas.bruyelle@gmail.com>
…at/nakamoto-bonus # Conflicts: # CHANGELOG.md # tests/integration/distribution/keeper/msg_server_test.go # x/distribution/README.md # x/distribution/migrations/v3/json_test.go # x/distribution/types/distribution.pb.go # x/distribution/types/events.go # x/distribution/types/params_test.go
|
I think this looks good, aside from the switch to what do you guys think, should we merge this and do the epochs switch in an independent PR or have the epochs switch be a PR that is merged here and then merge everything altogether? |
IMHO, we could merge this one and then create a PR for the epochs module changes, since this one is already approved and reviewed. |
implementation of https://github.com/atomone-hub/atomone/blob/main/docs/architecture/adr-004-nakamoto-bonus.md