Skip to content
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

min amount per deposit #4

Closed
wants to merge 38 commits into from

Conversation

adam-hanna
Copy link
Contributor

@adam-hanna adam-hanna commented Aug 29, 2024

Please go the the Preview tab and select the appropriate sub-template:

Cherry picking from https://github.com/informalsystems/cosmos-sdk/tree/masa/backport-18146-min-amount-per-deposit (related PR)

  • Production code - for types fix, feat, and refactor.
  • Docs - for documentation changes.
  • Others - for changes that do not affect production code.

@adam-hanna adam-hanna force-pushed the adam-hanna/gov/min-amount-per-deposit branch from eeeb1a7 to 8630c2f Compare August 30, 2024 19:15
types/coin.go Outdated
Comment on lines 337 to 345
for denom, cL := range uniqCoins { //#nosec
comboCoin := Coin{Denom: denom, Amount: NewInt(0)}
for _, c := range cL {
comboCoin = comboCoin.Add(c)
}
if !comboCoin.IsZero() {
coalesced = append(coalesced, comboCoin)
}
}

Check warning

Code scanning / CodeQL

Iteration over map Warning

Iteration over map may be a possible source of non-determinism
errors/abci.go Outdated

import (
"fmt"
"reflect"

Check notice

Code scanning / CodeQL

Sensitive package import Note

Certain system packages contain functions which may be a possible source of non-determinism
errors/errors.go Outdated

import (
"fmt"
"reflect"

Check notice

Code scanning / CodeQL

Sensitive package import Note

Certain system packages contain functions which may be a possible source of non-determinism
import (
"fmt"
"io"
"runtime"

Check notice

Code scanning / CodeQL

Sensitive package import Note

Certain system packages contain functions which may be a possible source of non-determinism
x/gov/types/keys.go Fixed Show fixed Hide fixed
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
descriptorpb "google.golang.org/protobuf/types/descriptorpb"
reflect "reflect"

Check notice

Code scanning / CodeQL

Sensitive package import Note

Certain system packages contain functions which may be a possible source of non-determinism
protoiface "google.golang.org/protobuf/runtime/protoiface"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
io "io"
reflect "reflect"

Check notice

Code scanning / CodeQL

Sensitive package import Note

Certain system packages contain functions which may be a possible source of non-determinism
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
anypb "google.golang.org/protobuf/types/known/anypb"
io "io"
reflect "reflect"

Check notice

Code scanning / CodeQL

Sensitive package import Note

Certain system packages contain functions which may be a possible source of non-determinism
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
descriptorpb "google.golang.org/protobuf/types/descriptorpb"
io "io"
reflect "reflect"

Check notice

Code scanning / CodeQL

Sensitive package import Note

Certain system packages contain functions which may be a possible source of non-determinism
protoiface "google.golang.org/protobuf/runtime/protoiface"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
io "io"
reflect "reflect"

Check notice

Code scanning / CodeQL

Sensitive package import Note

Certain system packages contain functions which may be a possible source of non-determinism
api/atomone/base/v1beta1/coin.pulsar.go Fixed Show fixed Hide fixed
api/atomone/gov/module/v1/module.pulsar.go Fixed Show fixed Hide fixed
api/atomone/gov/v1/genesis.pulsar.go Fixed Show fixed Hide fixed
Copy link

@github-advanced-security github-advanced-security bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CodeQL found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.

protoiface "google.golang.org/protobuf/runtime/protoiface"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
io "io"
reflect "reflect"

Check notice

Code scanning / CodeQL

Sensitive package import Note

Certain system packages contain functions which may be a possible source of non-determinism
anypb "google.golang.org/protobuf/types/known/anypb"
timestamppb "google.golang.org/protobuf/types/known/timestamppb"
io "io"
reflect "reflect"

Check notice

Code scanning / CodeQL

Sensitive package import Note

Certain system packages contain functions which may be a possible source of non-determinism
protoiface "google.golang.org/protobuf/runtime/protoiface"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
io "io"
reflect "reflect"

Check notice

Code scanning / CodeQL

Sensitive package import Note

Certain system packages contain functions which may be a possible source of non-determinism
protoiface "google.golang.org/protobuf/runtime/protoiface"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
io "io"
reflect "reflect"

Check notice

Code scanning / CodeQL

Sensitive package import Note

Certain system packages contain functions which may be a possible source of non-determinism
protoiface "google.golang.org/protobuf/runtime/protoiface"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
io "io"
reflect "reflect"

Check notice

Code scanning / CodeQL

Sensitive package import Note

Certain system packages contain functions which may be a possible source of non-determinism
protoiface "google.golang.org/protobuf/runtime/protoiface"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
io "io"
reflect "reflect"

Check notice

Code scanning / CodeQL

Sensitive package import Note

Certain system packages contain functions which may be a possible source of non-determinism
@adam-hanna adam-hanna marked this pull request as ready for review September 11, 2024 18:39
@adam-hanna
Copy link
Contributor Author

There are ALOT of linting issues, which I will slowly chip away at

@giunatale
Copy link
Collaborator

giunatale commented Sep 12, 2024

I think the entire Cosmos SDK codebase was merged here by mistake, while the idea was to cherry pick the x/gov modifications. A hint is the over 2000 files part of the PR most of which are additions. Just pointing it out fyi before it becomes even harder to revert without losing work done.

Should also rebase onto main since we switched over having x/gov own types

@adam-hanna
Copy link
Contributor Author

I think the entire Cosmos SDK codebase was merged here by mistake, while the idea was to cherry pick the x/gov modifications. A hint is the over 2000 files part of the PR most of which are additions. Just pointing it out fyi before it becomes even harder to revert without losing work done.

Should also rebase onto main since we switched over having x/gov own types

This was the minimal import of the cosmos-sdk that it took to cherry pick that commit. I know it's hard to believe but I started with the commit and simply kept importing packages/modules until I could build

@giunatale
Copy link
Collaborator

This was the minimal import of the cosmos-sdk that it took to cherry pick that commit. I know it's hard to believe but I started with the commit and simply kept importing packages/modules until I could build

If you look at the PR https://github.com/cosmos/cosmos-sdk/pull/19312/files this is what it touches
image
and in reality the changes in proto for staking and the change in bank can be discarded, so the PR is focused on x/gov. I don't think you really have to merge the whole sdk into the atomone app. Only the x/gov forked module needs to be updated (and the e2e tests I believe)

@adam-hanna adam-hanna force-pushed the adam-hanna/gov/min-amount-per-deposit branch from 2db779d to 2957c95 Compare September 12, 2024 17:47
@adam-hanna adam-hanna closed this Sep 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants