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

deps: bump cosmos-sdk v0.46 and evmos v12 #209

Merged
merged 18 commits into from
Aug 21, 2023
Merged

Conversation

LampardNguyen234
Copy link
Collaborator

@LampardNguyen234 LampardNguyen234 commented Aug 15, 2023

Features

  • (cosmos/snapshots)
    • #16060 Support saving and restoring snapshot locally.
  • (cosmos/baseapp)
    • #16290 Add circuit breaker setter in baseapp.
  • (cli)
    • #14051 Add --grpc client option.
    • #13147 Add the --append flag to the sign-batch CLI cmd to combine the messages and sign those txs which are created with --generate-only.
    • #13454 sign-batch CLI can now read multiple transaction files.
    • #13207 Reduce user's password prompts when calling keyring List() function.
    • #13353 Add tx group draft-proposal command for generating group proposal JSONs (skeleton).
    • #13304 Add tx gov draft-proposal command for generating proposal JSONs (skeleton).
    • #12742 Add the prune CLI cmd to manually prune app store history versions based on the pruning options.
    • #11738 Add tx auth multi-sign as alias of tx auth multisign for consistency with multi-send.
    • #11738 Add tx bank multi-send command for bulk send of coins to multiple accounts.
    • #11548 Add Tendermint's inspect command to the tendermint sub-command.
  • (grpc)
    • #13485 Implement a new gRPC query, /cosmos/base/node/v1beta1/config, which provides operator configuration.
    • #11889 Support custom read and write gRPC options in app.toml. See max-recv-msg-size and max-send-msg-size respectively.
    • #11642 Implement ABCIQuery in the Tendermint gRPC service, which proxies ABCI Query requests directly to the application.
  • (cosmos/upgrade)
    • #11551 Update ScheduleUpgrade for chains to schedule an automated upgrade on BeginBlock without having to go though governance.
    • #11116 MsgSoftwareUpgrade and MsgCancelUpgrade have been added to support v1beta2 msgs-based gov proposals.
    • #12603 feat: Move AppModule.BeginBlock and AppModule.EndBlock to extension interfaces
  • (cosmos/authz)
    • #10714 Add support for pruning expired authorizations
  • 1405 Enable paying fee via unclaimed rewards

Improvements

  • (deps)
    • #1635 Update cometbft v0.34.29 with several minor bug fixes and low-severity security-fixes.
    • Bump evmos to v12.1.6-astra-v3
    • Bump IAVL version to v0.19.6.
    • Bump ibc-go to v6.1.1
  • (cosmos/store)
    • #15683 rootmulti.Store.CacheMultiStoreWithVersion now can handle loading archival states that don't persist any of the module stores the current state has.
    • #16067 Add local snapshots management commands.
    • #15152 Remove unmaintained and experimental store/v2alpha1.
    • #14410 rootmulti.Store.loadVersion has validation to check if all the module stores' height is correct, it will error if any module store has incorrect height.
    • #14189 Add config iavl-lazy-loading to enable lazy loading of iavl store, to improve start up time of archive nodes, add method SetLazyLoading to CommitMultiStore interface.
      • A new field has been added to the app.toml. This alllows nodes with larger databases to startup quicker
      # IAVLLazyLoading enable/disable the lazy loading of iavl store.
      # Default is false.
      iavl-lazy-loading = ""
    • #13881 Optimize iteration on nested cached KV stores and other operations in general.
  • (cosmos/gov)
    • #15979 Improve gov error message when failing to convert v1 proposal to v1beta1.
    • #14347 Support v1.Proposal message in v1beta1.Proposal.Content.
  • (cosmos/server)
    • #16061 Add Comet bootstrap command.
  • (cosmos/baseapp)
    • #16193 Add Close method to BaseApp for custom app to cleanup resource in graceful shutdown.
    • #14019 Remove the interface casting to allow other implementations of a CommitMultiStore.
  • (cosmos/simapp)
    • #15305 Add AppStateFnWithExtendedCb with callback function to extend rawState and AppStateRandomizedFnWithState with extra genesisState argument which is the genesis state of the app.
  • (cosmos/distribution)
    • #15462 Add delegator address to the event for withdrawing delegation rewards
  • #13826 Support custom GasConfig configuration for applications.

Bug Fixes

  • Fix barberry security vulnerability.
  • (vesting)
  • (cli)
    • #16312 Allow any addresses in client.ValidatePromptAddress.
    • #14919 Fix never assigned error when write validators.
    • #14799 Fix Evidence CLI query flag parsing (backport #13458)
  • (cosmos/gov)
    • #13051 In SubmitPropsal, when a legacy msg fails it's handler call, wrap the error as ErrInvalidProposalContent (instead of ErrNoProposalHandlerExists).
    • #13918 Fix propagation of message errors when executing a proposal.
  • (cosmos/store)
    • #15717 Upstream error on empty version (this change was present on all version but v0.46).
    • #14798 Copy btree to avoid the problem of modify while iteration.
    • #13516 Fix state listener that was observing writes at wrong time.
    • #13530 Fix app-hash mismatch if upgrade migration commit is interrupted.
    • #13459 Don't let state listener observe the uncommitted writes.
  • (ante)
    • #14448 Return anteEvents when postHandler fail.
  • (cosmos/auth)
    • #12474 Remove condition in GetTxsEvent that disallowed multiple equal signs, which would break event queries with base64 strings (i.e. query by signature).
  • #15243 LatestBlockResponse & BlockByHeightResponse types' field sdk_block was incorrectly cast proposer_address bytes to validator operator address, now to consensus address.
  • #13861 Allow _ characters in tx event queries, i.e. GetTxsEvent.
  • #12548 Prevent signing from wrong key while using multisig.
  • Implement dragonberry security patch.

State Machine Breaking

  • (cosmos/gov)
    • #14214 Fix gov v0.46 migration to v1 votes.
      • Also provide a helper function govv046.Migrate_V0466_To_V0467 for migrating a chain already on v0.46 with versions <=v0.46.6 to the latest v0.46.7 correct state.
    • #11998 Tweak the x/gov ModuleAccountInvariant invariant to ensure deposits are <= total module account balance instead of strictly equal.
  • (cosmos/authz)
    • #11214 Fix Amino JSON encoding of authz and feegrant Msgs to be consistent with other modules.
    • #11060 Support grant with no expire time.
  • (cosmos/staking)
  • (evmos/evm)
    • #1308 Migrate evm and feemarket types
  • (ante)
    • #1405 Enable fees to be deducted from unclaimed staking rewards
  • (ethermint) Remove ethermint dependency and use evmos instead
  • (evmos/vesting)
    • #1596 Add MsgCreateClawbackVestingAccount period validation
    • #1268 Allow usage of vested and unlocked tokens in EVM interactions
    • #1087 Add new MsgUpdateVestingFunder that updates the Funder field of a given clawback vesting account
  • (cosmos/params)
    • Deprecated params module due to ADR-046

API Breaking

  • (cli)
    • #13089 Fix rollback command don't actually delete multistore versions, added method RollbackToVersion to interface CommitMultiStore and added method CommitMultiStore to Application interface.
    • #13089 NewRollbackCmd now takes an appCreator types.AppCreator.
  • (cosmos/gov)
    • #14422 Remove Migrate_V046_6_To_V046_7 function which shouldn't be used for chains which already migrated to 0.46.
    • #10748 Move legacy x/gov api to v1beta1 directory.
    • #10852 Move x/gov/types to x/gov/types/v1beta2.
  • (cosmos/store)
    • #13516 Update State Streaming APIs:
      • Add method ListenCommit to ABCIListener
      • Move ListeningEnabled and AddListener methods to CommitMultiStore
      • Remove CacheWrapWithListeners from CacheWrap and CacheWrapper interfaces
      • Remove listening APIs from the caching layer (it should only listen to the rootmulti.Store)
      • Add three new options to file streaming service constructor.
      • Modify ABCIListener such that any error from any method will always halt the app via panic
    • #13529 Add method LatestVersion to MultiStore interface, add method SetQueryMultiStore to baesapp to support alternative MultiStore implementation for query service.
  • (ante)
    • #11985 The MempoolFeeDecorator has been removed. Instead, the DeductFeeDecorator takes a new argument of type TxFeeChecker, to define custom fee models. If nil is passed to this TxFeeChecker argument, then it will default to checkTxFeeWithValidatorMinGasPrices, which is the exact same behavior as the old MempoolFeeDecorator (i.e. checking fees against validator's own min gas price).
    • #11985 The ExtensionOptionsDecorator takes an argument of type ExtensionOptionChecker. For backwards-compatibility, you can pass nil, which defaults to the old behavior of rejecting all tx extensions.
  • (keyring)
    • #11932 Remove Unsafe* interfaces from keyring package. Please use interface casting if you wish to access those unsafe functions.
  • (cosmos/types)
    • #11881 Rename AccAddressFromHex to AccAddressFromHexUnsafe.
    • #11788 The Int and Uint types have been moved to their own dedicated module, math. Aliases are kept in the SDK's root types package, however, it is encouraged to utilize the new math module. As a result, the Int#ToDec API has been removed.
    • #11689 Make Coins#Sub and Coins#SafeSub consistent with Coins#Add.
    • #10295 Remove store type aliases from /types
  • (codec)
    • #9695 Migrate keys from Info (serialized as amino) -> Record (serialized as proto)
      • Add new codec.Codec argument in:
        • keyring.NewInMemory
        • keyring.New
      • Rename:
        • SavePubKey to SaveOfflineKey.
        • NewMultiInfo, NewLedgerInfo to NewLegacyMultiInfo, newLegacyLedgerInfo respectively. Move them into legacy_info.go.
        • NewOfflineInfo to newLegacyOfflineInfo and move it to migration_test.go.
      • Return:
        *keyring.Record, error in SaveOfflineKey, SaveLedgerKey, SaveMultiSig, Key and KeyByAddress.
        *keyring.Record instead of Info in NewMnemonic and List.
      • Remove algo argument from :
        • SaveOfflineKey
      • Take keyring.Record instead of Info as first argument in:
        • MkConsKeyOutput
        • MkValKeyOutput
        • MkAccKeyOutput
    • #9521 Removed deprecated clientCtx.JSONCodec from client.Context.
    • #9521 Rename EncodingConfig.Marshaler to Codec.
  • (rest)
    • #9594 RESTHandlerFn argument is removed from the gov/NewProposalHandler.
    • #9594 types/rest package moved to testutil/rest.
    • #11797 Remove all RegisterRESTRoutes (previously deprecated)
    • #9594 Remove legacy REST API. Please see the REST Endpoints Migration guide to migrate to the new REST endpoints.


for _, val := range valSet.Validators {
pk, _ := cryptocodec.FromTmPubKeyInterface(val.PubKey)
pkAny, _ := codectypes.NewAnyWithValue(pk)

Check warning

Code scanning / gosec

Returned error is not propagated up the stack.

Returned error is not propagated up the stack.
bondAmt := sdk.DefaultPowerReduction

for _, val := range valSet.Validators {
pk, _ := cryptocodec.FromTmPubKeyInterface(val.PubKey)

Check warning

Code scanning / gosec

Returned error is not propagated up the stack.

Returned error is not propagated up the stack.
@@ -60,17 +66,28 @@
isCheckTx bool,
feemarketGenesis *feemarkettypes.GenesisState,
) *Astra {
privVal := mock.NewPV()
pubKey, _ := privVal.GetPubKey()

Check warning

Code scanning / gosec

Returned error is not propagated up the stack.

Returned error is not propagated up the stack.
@LampardNguyen234
Copy link
Collaborator Author

Protobuf breakage is expected

Copy link
Collaborator

@hoanguyenkh hoanguyenkh left a comment

Choose a reason for hiding this comment

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

LGTM

@LampardNguyen234 LampardNguyen234 merged commit df20608 into astra Aug 21, 2023
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