Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into faddat/give-the-proto…
Browse files Browse the repository at this point in the history
…-annotation
  • Loading branch information
faddat committed Oct 10, 2024
2 parents a74379b + db971ee commit 2c05f1e
Show file tree
Hide file tree
Showing 75 changed files with 2,912 additions and 2,127 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/check-broken-links.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:

- name: Link Checker
id: lychee
uses: lycheeverse/lychee-action@v1.10.0
uses: lycheeverse/lychee-action@v2.0.0
with:
args: --exclude-loopback --verbose --no-progress --max-concurrency 1 './**/*.md' './**/*.html'
env:
Expand Down
10 changes: 6 additions & 4 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
version: 2

project_name: osmosisd

env:
Expand Down Expand Up @@ -108,9 +110,9 @@ builds:
- -mod=readonly
- -trimpath
ldflags:
- -X github.com/cosmos/cosmos-sdk/version.Name=osmosis
- -X github.com/cosmos/cosmos-sdk/version.AppName=osmosisd
- -X github.com/cosmos/cosmos-sdk/version.Version={{ .Version }}
- -X github.com/cosmos/cosmos-sdk/version.Name=osmosis
- -X github.com/cosmos/cosmos-sdk/version.AppName=osmosisd
- -X github.com/cosmos/cosmos-sdk/version.Version={{ .Version }}
- -X github.com/cosmos/cosmos-sdk/version.Commit={{ .Commit }}
- -X github.com/cosmos/cosmos-sdk/version.BuildTags=netgo,ledger,muslc,osusergo
- -w -s
Expand Down Expand Up @@ -159,7 +161,7 @@ checksum:

# Docs: https://goreleaser.com/customization/changelog/
changelog:
skip: true
disable: true

# Docs: https://goreleaser.com/customization/release/
release:
Expand Down
2 changes: 1 addition & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"OSMOSIS_E2E_SKIP_UPGRADE": "false",
"OSMOSIS_E2E_SKIP_CLEANUP": "true",
"OSMOSIS_E2E_SKIP_STATE_SYNC": "true",
"OSMOSIS_E2E_UPGRADE_VERSION": "v26",
"OSMOSIS_E2E_UPGRADE_VERSION": "v27",
"OSMOSIS_E2E_DEBUG_LOG": "false",
},
"preLaunchTask": "e2e-setup"
Expand Down
31 changes: 27 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,34 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## Unreleased

### Bug Fixes
### State Breaking

* [#8682](https://github.com/osmosis-labs/osmosis/pull/8682) chore: bump cosmwasm-optimizer
* [#8734](https://github.com/osmosis-labs/osmosis/pull/8734) chore: update cosmwasm vm

### Config


### State Compatible

* [#8600](https://github.com/osmosis-labs/osmosis/pull/8600) Add missing protobuf definitions to be able to decode old block messages
* [#8754](https://github.com/osmosis-labs/osmosis/pull/8754) Add missing proto files for indexing
* [#8563](https://github.com/osmosis-labs/osmosis/pull/8563) Add additional queries in x/gauges
* [#8726](https://github.com/osmosis-labs/osmosis/pull/8726) fix: multiple temp directories on command executions
* [#8731](https://github.com/osmosis-labs/osmosis/pull/8731) fix: in place testnet logs
* [#8728](https://github.com/osmosis-labs/osmosis/pull/8728) fix unsupported sign-mode issue
* [#8743](https://github.com/osmosis-labs/osmosis/pull/8743) chore: bump sdk and cometbft

### State Machine Breaking

* [#8732](https://github.com/osmosis-labs/osmosis/pull/8732) fix: iterate delegations continue instead of erroring

## v26.0.1

### State Machine Breaking

* [#8732](https://github.com/osmosis-labs/osmosis/pull/8732) fix: iterate delegations continue instead of erroring

## v26.0.0

### State Breaking

Expand Down Expand Up @@ -77,8 +102,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
* [#8543](https://github.com/osmosis-labs/osmosis/pull/8543) Add OTEL wiring and new configs in app.toml
* [#8566](https://github.com/osmosis-labs/osmosis/pull/8566) Minor speedup to CalcExitCFMM shares
* [#8665](https://github.com/osmosis-labs/osmosis/pull/8665) fix: smart account signing checktx error
* [#8563](https://github.com/osmosis-labs/osmosis/pull/8563) Add additional queries in x/gauges


## v25.2.1
* [#8546](https://github.com/osmosis-labs/osmosis/pull/8546) feat: reduce commit timeout to 500ms to enable faster blocks, and timeout propose to 1.8s
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ LEDGER_ENABLED ?= true
SDK_PACK := $(shell go list -m github.com/cosmos/cosmos-sdk | sed 's/ /\@/g')
BUILDDIR ?= $(CURDIR)/build
DOCKER := $(shell which docker)
E2E_UPGRADE_VERSION := "v26"
E2E_UPGRADE_VERSION := "v27"
#SHELL := /bin/bash

# Go version to be used in docker images
Expand Down
31 changes: 19 additions & 12 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ import (
gammtypes "github.com/osmosis-labs/osmosis/v26/x/gamm/types"

commondomain "github.com/osmosis-labs/osmosis/v26/ingest/common/domain"
commonservice "github.com/osmosis-labs/osmosis/v26/ingest/common/service"

"github.com/osmosis-labs/osmosis/osmomath"

Expand Down Expand Up @@ -134,6 +135,7 @@ import (
v24 "github.com/osmosis-labs/osmosis/v26/app/upgrades/v24"
v25 "github.com/osmosis-labs/osmosis/v26/app/upgrades/v25"
v26 "github.com/osmosis-labs/osmosis/v26/app/upgrades/v26"
v27 "github.com/osmosis-labs/osmosis/v26/app/upgrades/v27"
v3 "github.com/osmosis-labs/osmosis/v26/app/upgrades/v3"
v4 "github.com/osmosis-labs/osmosis/v26/app/upgrades/v4"
v5 "github.com/osmosis-labs/osmosis/v26/app/upgrades/v5"
Expand Down Expand Up @@ -191,7 +193,7 @@ var (

_ runtime.AppI = (*OsmosisApp)(nil)

Upgrades = []upgrades.Upgrade{v4.Upgrade, v5.Upgrade, v7.Upgrade, v9.Upgrade, v11.Upgrade, v12.Upgrade, v13.Upgrade, v14.Upgrade, v15.Upgrade, v16.Upgrade, v17.Upgrade, v18.Upgrade, v19.Upgrade, v20.Upgrade, v21.Upgrade, v22.Upgrade, v23.Upgrade, v24.Upgrade, v25.Upgrade, v26.Upgrade}
Upgrades = []upgrades.Upgrade{v4.Upgrade, v5.Upgrade, v7.Upgrade, v9.Upgrade, v11.Upgrade, v12.Upgrade, v13.Upgrade, v14.Upgrade, v15.Upgrade, v16.Upgrade, v17.Upgrade, v18.Upgrade, v19.Upgrade, v20.Upgrade, v21.Upgrade, v22.Upgrade, v23.Upgrade, v24.Upgrade, v25.Upgrade, v26.Upgrade, v27.Upgrade}
Forks = []upgrades.Fork{v3.Fork, v6.Fork, v8.Fork, v10.Fork}

// rpcAddressConfigName is the name of the config key that holds the RPC address.
Expand Down Expand Up @@ -338,8 +340,23 @@ func NewOsmosisApp(
ibcWasmConfig,
)

// Initialize the config object for the SQS ingester
sqsConfig := sqs.NewConfigFromOptions(appOpts)

// Initialize the config object for the indexer
indexerConfig := indexer.NewConfigFromOptions(appOpts)

var nodeStatusChecker commonservice.NodeStatusChecker
if sqsConfig.IsEnabled || indexerConfig.IsEnabled {
// Note: address can be moved to config in the future if needed.
rpcAddress, ok := appOpts.Get(rpcAddressConfigName).(string)
if !ok {
panic(fmt.Sprintf("failed to retrieve %s from config.toml", rpcAddressConfigName))
}
// Create node status checker to be used by sqs and indexer streaming services.
nodeStatusChecker = commonservice.NewNodeStatusChecker(rpcAddress)
}

streamingServices := []storetypes.ABCIListener{}

// Initialize the SQS ingester if it is enabled.
Expand Down Expand Up @@ -372,13 +389,6 @@ func NewOsmosisApp(
// Create write listeners for the SQS service.
writeListeners, storeKeyMap := getSQSServiceWriteListeners(app, appCodec, poolTracker, app.WasmKeeper)

// Note: address can be moved to config in the future if needed.
rpcAddress, ok := appOpts.Get(rpcAddressConfigName).(string)
if !ok {
panic(fmt.Sprintf("failed to retrieve %s from config.toml", rpcAddressConfigName))
}
nodeStatusChecker := sqsservice.NewNodeStatusChecker(rpcAddress)

// Create the SQS streaming service by setting up the write listeners,
// the SQS ingester, and the pool tracker.
blockUpdatesProcessUtils := &commondomain.BlockUpdateProcessUtils{
Expand All @@ -390,9 +400,6 @@ func NewOsmosisApp(
streamingServices = append(streamingServices, sqsStreamingService)
}

// Initialize the config object for the indexer
indexerConfig := indexer.NewConfigFromOptions(appOpts)

// initialize indexer if enabled
if indexerConfig.IsEnabled {
indexerPublisher := indexerConfig.Initialize()
Expand Down Expand Up @@ -432,7 +439,7 @@ func NewOsmosisApp(
StoreKeyMap: storeKeyMap,
}
poolExtractor := poolextractor.New(poolKeepers, poolTracker)
indexerStreamingService := indexerservice.New(blockUpdatesProcessUtils, blockProcessStrategyManager, indexerPublisher, storeKeyMap, poolExtractor, poolTracker, keepers, app.GetTxConfig().TxDecoder(), logger)
indexerStreamingService := indexerservice.New(blockUpdatesProcessUtils, blockProcessStrategyManager, indexerPublisher, storeKeyMap, poolExtractor, poolTracker, keepers, app.GetTxConfig().TxDecoder(), nodeStatusChecker, logger)

// Register the SQS streaming service with the app.
streamingServices = append(streamingServices, indexerStreamingService)
Expand Down
19 changes: 19 additions & 0 deletions app/upgrades/v27/constants.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package v27

import (
"github.com/osmosis-labs/osmosis/v26/app/upgrades"

store "cosmossdk.io/store/types"
)

// UpgradeName defines the on-chain upgrade name for the Osmosis v27 upgrade.
const UpgradeName = "v27"

var Upgrade = upgrades.Upgrade{
UpgradeName: UpgradeName,
CreateUpgradeHandler: CreateUpgradeHandler,
StoreUpgrades: store.StoreUpgrades{
Added: []string{},
Deleted: []string{},
},
}
29 changes: 29 additions & 0 deletions app/upgrades/v27/upgrades.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
package v27

import (
"context"

upgradetypes "cosmossdk.io/x/upgrade/types"
"github.com/cosmos/cosmos-sdk/types/module"

"github.com/osmosis-labs/osmosis/v26/app/keepers"
"github.com/osmosis-labs/osmosis/v26/app/upgrades"
)

func CreateUpgradeHandler(
mm *module.Manager,
configurator module.Configurator,
bpm upgrades.BaseAppParamManager,
keepers *keepers.AppKeepers,
) upgradetypes.UpgradeHandler {
return func(ctx context.Context, plan upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) {
// Run migrations before applying any other state changes.
// NOTE: DO NOT PUT ANY STATE CHANGES BEFORE RunMigrations().
migrations, err := mm.RunMigrations(ctx, configurator, fromVM)
if err != nil {
return nil, err
}

return migrations, nil
}
}
6 changes: 3 additions & 3 deletions client/docs/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -646,9 +646,9 @@ domain-browser@^1.1.1:
integrity sha512-jnjyiM6eRyZl2H+W8Q/zLMA481hzi0eszAaBUzIVnmYVDBbnLxVNnfu1HgEBvCbL+71FrxMl3E6lpKH7Ge3OXA==

dompurify@^2.0.12:
version "2.2.0"
resolved "https://registry.yarnpkg.com/dompurify/-/dompurify-2.2.0.tgz"
integrity sha512-bqFOQ7XRmmozp0VsKdIEe8UwZYxj0yttz7l80GBtBqdVRY48cOpXH2J/CVO7AEkV51qY0EBVXfilec18mdmQ/w==
version "2.5.6"
resolved "https://registry.yarnpkg.com/dompurify/-/dompurify-2.5.6.tgz#8402b501611eaa7fb3786072297fcbe2787f8592"
integrity sha512-zUTaUBO8pY4+iJMPE1B9XlO2tXVYIcEA4SNGtvDELzTSCQO7RzH+j7S180BmhmJId78lqGU2z19vgVx2Sxs/PQ==

elliptic@^6.5.3:
version "6.5.7"
Expand Down
34 changes: 31 additions & 3 deletions cmd/osmosisd/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import (
"cosmossdk.io/core/appmodule"
runtimeservices "github.com/cosmos/cosmos-sdk/runtime/services"
authcodec "github.com/cosmos/cosmos-sdk/x/auth/codec"
"github.com/cosmos/cosmos-sdk/x/auth/tx"

cosmosdb "github.com/cosmos/cosmos-db"

Expand Down Expand Up @@ -61,7 +62,9 @@ import (
servertypes "github.com/cosmos/cosmos-sdk/server/types"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/types/module"
"github.com/cosmos/cosmos-sdk/types/tx/signing"
authcmd "github.com/cosmos/cosmos-sdk/x/auth/client/cli"
authtxconfig "github.com/cosmos/cosmos-sdk/x/auth/tx/config"
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
banktypes "github.com/cosmos/cosmos-sdk/x/bank/types"
"github.com/cosmos/cosmos-sdk/x/crisis"
Expand Down Expand Up @@ -356,6 +359,14 @@ func NewRootCmd() (*cobra.Command, params.EncodingConfig) {

tempDir := tempDir()
tempApp := osmosis.NewOsmosisApp(log.NewNopLogger(), cosmosdb.NewMemDB(), nil, true, map[int64]bool{}, tempDir, 5, sims.EmptyAppOptions{}, osmosis.EmptyWasmOpts, baseapp.SetChainID("osmosis-1"))
defer func() {
if err := tempApp.Close(); err != nil {
panic(err)
}
if tempDir != osmosis.DefaultNodeHome {
os.RemoveAll(tempDir)
}
}()

// Allows you to add extra params to your client.toml
// gas, gas-price, gas-adjustment, and human-readable-denoms
Expand All @@ -381,6 +392,24 @@ func NewRootCmd() (*cobra.Command, params.EncodingConfig) {
return err
}

// This needs to go after ReadFromClientConfig, as that function
// sets the RPC client needed for SIGN_MODE_TEXTUAL. This sign mode
// is only available if the client is online.
if !initClientCtx.Offline {
txConfigOpts := tx.ConfigOptions{
EnabledSignModes: append(tx.DefaultSignModes, signing.SignMode_SIGN_MODE_TEXTUAL),
TextualCoinMetadataQueryFn: authtxconfig.NewGRPCCoinMetadataQueryFn(initClientCtx),
}
txConfigWithTextual, err := tx.NewTxConfigWithOptions(
initClientCtx.Codec,
txConfigOpts,
)
if err != nil {
return err
}
initClientCtx = initClientCtx.WithTxConfig(txConfigWithTextual)
}

// Only loads asset list into a map if human readable denoms are enabled.
assetMap, assetMapRev := map[string]DenomUnitMap{}, map[string]string{}
if humanReadableDenomsInput || humanReadableDenomsOutput {
Expand Down Expand Up @@ -480,7 +509,7 @@ func NewRootCmd() (*cobra.Command, params.EncodingConfig) {
func tempDir() string {
dir, err := os.MkdirTemp("", "osmosisd")
if err != nil {
dir = osmosis.DefaultNodeHome
panic(fmt.Sprintf("failed creating temp directory: %s", err.Error()))
}
defer os.RemoveAll(dir)

Expand Down Expand Up @@ -1299,6 +1328,5 @@ func autoCliOpts(initClientCtx client.Context, tempApp *osmosis.OsmosisApp) auto
AddressCodec: authcodec.NewBech32Codec(sdk.GetConfig().GetBech32AccountAddrPrefix()),
ValidatorAddressCodec: authcodec.NewBech32Codec(sdk.GetConfig().GetBech32ValidatorAddrPrefix()),
ConsensusAddressCodec: authcodec.NewBech32Codec(sdk.GetConfig().GetBech32ConsensusAddrPrefix()),
ClientCtx: initClientCtx,
}
ClientCtx: initClientCtx}
}
Loading

0 comments on commit 2c05f1e

Please sign in to comment.