-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: add x/protocolpool
#23933
base: release/v0.53.x
Are you sure you want to change the base?
chore: add x/protocolpool
#23933
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
gosec found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.
func (am AppModule) BeginBlock(ctx context.Context) error { | ||
sdkCtx := sdk.UnwrapSDKContext(ctx) | ||
|
||
return am.keeper.BeginBlocker(sdkCtx) |
Check warning
Code scanning / CodeQL
Panic in BeginBock or EndBlock consensus methods Warning
path flow from Begin/EndBlock to a panic call
path flow from Begin/EndBlock to a panic call
path flow from Begin/EndBlock to a panic call
path flow from Begin/EndBlock to a panic call
|
GOBIN=/home/runner/work/cosmos-sdk/cosmos-sdk/build go install golang.org/x/vuln/cmd/govulncheck@latest Vulnerability #1: GO-2025-3443 Your code is affected by 1 vulnerability from 1 module. |
GOBIN=/home/runner/work/cosmos-sdk/cosmos-sdk/build go install golang.org/x/vuln/cmd/govulncheck@latest Vulnerability #1: GO-2025-3443 Your code is affected by 1 vulnerability from 1 module. |
GOBIN=/home/runner/work/cosmos-sdk/cosmos-sdk/build go install golang.org/x/vuln/cmd/govulncheck@latest Vulnerability #1: GO-2025-3443 Your code is affected by 1 vulnerability from 1 module. |
GOBIN=/home/runner/work/cosmos-sdk/cosmos-sdk/build go install golang.org/x/vuln/cmd/govulncheck@latest Vulnerability #1: GO-2025-3443 Your code is affected by 1 vulnerability from 1 module. |
GOBIN=/home/runner/work/cosmos-sdk/cosmos-sdk/build go install golang.org/x/vuln/cmd/govulncheck@latest Vulnerability #1: GO-2025-3443 Your code is affected by 1 vulnerability from 1 module. |
GOBIN=/home/runner/work/cosmos-sdk/cosmos-sdk/build go install golang.org/x/vuln/cmd/govulncheck@latest Vulnerability #1: GO-2025-3443 Your code is affected by 1 vulnerability from 1 module. |
if err := k.AllocateTokens(ctx, previousTotalPower, ctx.VoteInfos()); err != nil { | ||
return err | ||
} | ||
if err := k.BeginBlocker(ctx); err != nil { |
Check warning
Code scanning / CodeQL
Panic in BeginBock or EndBlock consensus methods Warning
path flow from Begin/EndBlock to a panic call
path flow from Begin/EndBlock to a panic call
path flow from Begin/EndBlock to a panic call
path flow from Begin/EndBlock to a panic call
// ref https://github.com/cosmos/cosmos-sdk/issues/3095 | ||
height := ctx.BlockHeight() | ||
if height > 1 { | ||
if err := k.AllocateTokens(ctx, previousTotalPower, ctx.VoteInfos()); err != nil { |
Check warning
Code scanning / CodeQL
Panic in BeginBock or EndBlock consensus methods Warning
path flow from Begin/EndBlock to a panic call
path flow from Begin/EndBlock to a panic call
path flow from Begin/EndBlock to a panic call
path flow from Begin/EndBlock to a panic call
|
||
// send whole coins from community pool to x/protocolpool if enabled | ||
if k.externalCommunityPoolEnabled() { | ||
if err := k.sendCommunityPoolToExternalPool(ctx); err != nil { |
Check warning
Code scanning / CodeQL
Panic in BeginBock or EndBlock consensus methods Warning
path flow from Begin/EndBlock to a panic call
path flow from Begin/EndBlock to a panic call
path flow from Begin/EndBlock to a panic call
path flow from Begin/EndBlock to a panic call
|
||
// record the proposer for when we pay out on the next block | ||
consAddr := sdk.ConsAddress(ctx.BlockHeader().ProposerAddress) | ||
return k.SetPreviousProposerConsAddr(ctx, consAddr) |
Check warning
Code scanning / CodeQL
Panic in BeginBock or EndBlock consensus methods Warning
path flow from Begin/EndBlock to a panic call
path flow from Begin/EndBlock to a panic call
path flow from Begin/EndBlock to a panic call
path flow from Begin/EndBlock to a panic call
start := telemetry.Now() | ||
defer telemetry.ModuleMeasureSince(types.ModuleName, start, telemetry.MetricKeyBeginBlocker) | ||
|
||
return k.SetToDistribute(ctx) |
Check warning
Code scanning / CodeQL
Panic in BeginBock or EndBlock consensus methods Warning
path flow from Begin/EndBlock to a panic call
path flow from Begin/EndBlock to a panic call
path flow from Begin/EndBlock to a panic call
path flow from Begin/EndBlock to a panic call
keeping as a draft
TODO: