diff --git a/docs/rfc/README.md b/docs/rfc/README.md index 940d361079d4..13f9d8a3fc75 100644 --- a/docs/rfc/README.md +++ b/docs/rfc/README.md @@ -38,5 +38,6 @@ sections. * [RFC-001: Tx Validation](./rfc-001-tx-validation.md) * [RFC-002: Zero Copy Encoding](./rfc-002-zero-copy-encoding.md) +* [RFC-003: Cross Language Account/Module Execution Model](./rfc-003-crosslang.md) * [RFC-004: Accounts](./rfc-004-accounts.md) * [RFC-005: Optimistic Execution](./rfc-005-optimistic-execution.md) diff --git a/docs/rfc/rfc-003-crosslang.md b/docs/rfc/rfc-003-crosslang.md new file mode 100644 index 000000000000..b71db170e0ec --- /dev/null +++ b/docs/rfc/rfc-003-crosslang.md @@ -0,0 +1,296 @@ +# RFC 003: Cross Language Account/Module Execution Model + +## Changelog + +* 2024-08-09: Reworked initial draft (previous work was in https://github.com/cosmos/cosmos-sdk/pull/15410) + +## Background + +The Cosmos SDK has historically been a Golang only framework for building blockchain applications. +However, discussions about supporting additional programming languages and virtual machine environments +have been underway since early 2023. Recently, we have identified the following key target user groups: +Recently we have identified the following key target user groups: +1. projects that want to primarily target a single programming language and virtual machine environment besides Golang but who still want to use Cosmos SDK internals for consensus and storage +2. projects that want to integrate multiple programming languages and virtual machine environments into an integrated application + +While these two user groups may have substantially different needs, +the goals of the second group are more challenging to support and require a more clearly specified unified design. + +This RFC primarily attempts to address the needs of the second group. +However, in doing so, it also intends to address the needs of the first group as we will likely build many of the components needed for this group by building an integrated cross-language, cross-VM framework. +Those needs of the first group which are not satisfactorily addressed by the cross-language framework should be addressed in separate RFCs. + +Prior work on cross-language support in the SDK includes: +- [RFC 003: Language-independent Module Semantics & ABI](https://github.com/cosmos/cosmos-sdk/pull/15410): an earlier, significantly different and unmerged version of this RFC. +- [RFC 002: Zero Copy Encoding](./rfc-002-zero-copy-encoding.md): a zero-copy encoding specification for ProtoBuf messages, which was partly implemented and may or may not still be relevant to the current work. + +Also, this design largely builds on the existing `x/accounts` module and extends that paradigm to environments beyond just Golang. +That design was specified in [RFC 004: Accounts](./rfc-004-accounts.md). + +## Proposal + +We propose a conceptual and formal model for defining **accounts** and **modules** which can interoperate with each other through **messages** in a cross-language, cross-VM environment. + +We start with the conceptual definition of core concepts from the perspective of a developer +trying to write code for a module or account. +The formal details of how these concepts are represented in a specific coding environment may vary significantly, +however, the essence should remain more or less the same in most coding environments. + +This specification is intentionally kept minimal as it is always easier to add features than to remove them. +Where possible, other layers of the system should be specified in a complementary, modular way in separate specifications. + +### Account + +An **account** is defined as having: +* a unique **address** +* an **account handler** which is some code which can process **messages** and send **messages** to other **accounts** + +### Address + +An **address** is defined as a variable-length byte array of up to 63 bytes +so that an address can be represented as a 64-byte array with the first byte indicating the length of the address. + +### Message + +A **message** is defined as a tuple of: +* a **message name** +* and **message data** + +A **message name** is an ASCII string of up to 127 characters +so that it can be represented as a 128-byte array with the first byte indicating the length of the string. +**Message names** can only contain letters, numbers and the special characters `:`, `_`, `/`, and `.`. + +**Message data** will be defined in more detail later. + +### Account Handler + +The code that implements an account's message handling is known as the **account handler**. The handler receives a **message request** and can return some **message response** or an error. + +The handler for a specific message within an **account handler** is known as a **message handler**. + +### Message Request + +A **message request** contains: +* the **address** of the **account** (its own address) +* the **address** of the account sending the message (the **caller**), which will be empty if the message is a query +* the **message name** +* the **message data** +* a 32-byte **state token** +* a 32-byte **context token** +* a `uint64` **gas limit** + +**Message requests** can also be prepared by **account handlers** to send **messages** to other accounts. + +### Modules and Modules Messages + +There is a special class of **message**s known as **module messages**, +where the caller should omit the address of the receiving account. +The routing framework can look up the address of the receiving account based on the message name of a **module message**. + +Accounts which define handlers for **module messages** are known as **modules**. + +**Module messages** are distinguished from other messages because their message name must start with the `module:` prefix. + +The special kind of account handler which handles **module messages** is known as a **module handler**. +A **module** is thus an instance of a **module handler** with a specific address +in the same way that an account is an instance of an account handler. +In addition to an address, **modules** also have a human-readable **module name**. + +More details on **modules** and **module messages** will be given later. + +### Account Handler and Message Metadata + +Every **account handler** is expected to provide metadata which provides: +* a list of the **message names** it defines **message handlers** and for each of these, its: + * **volatility** (described below) + * optional additional bytes, which are not standardized at this level +* **state config** bytes which are sent to the **state handler** (described below) but are otherwise opaque +* some optional additional bytes, which are not standardized at this level + +### Account Lifecycle + +**Accounts** can be created, destroyed and migrated to new **account handlers**. + +**Account handlers** can define message handlers for the following special message name's: +* `on_create`: called when an account is created with message data containing arbitrary initialization data. +* `on_migrate`: called when an account is migrated to a new code handler. Such handlers receive structured message data specifying the old code handler so that the account can perform migration operations or return an error if migration is not possible. + +### Hypervisor and Virtual Machines + +Formally, a coding environment where **account handlers** are run is known as a **virtual machine**. +These **virtual machine**s may or may not be sandboxed virtual machines in the traditional sense. +For instance, the existing Golang SDK module environment (currently specified by `cosmossdk.io/core`), will +be known as the "native Golang" virtual machine. +For consistency, however, +we refer to these all as **virtual machines** because from the perspective of the cross-language framework, +they must implement the same interface. + +The special module which manages **virtual machines** and **accounts** is known as the **hypervisor**. + +Each **virtual machine** that is loaded by the **hypervisor** will get a unique **machine id** string. +Each **account handler** that a **virtual machine** can load is referenced by a unique **handler id** string. + +There are two forms of **handler ids**: +* **module handlers** which take the form `module:` +* **account handlers** which take the form `:`, where `machine_handler_id` is a unique string scoped to the **virtual machine** + +Each **virtual machine** must expose a list of all the **module handlers** it can run, +and the **hypervisor** will ensure that the **module handlers** are unique across all **virtual machines**. + +Each **virtual machine** is expected to expose a method which takes a **handler id** +and returns a reference to an **account handler** +which can be used to run **messages**. +**Virtual machines** will also receive an `invoke` function +so that their **account handlers** can send messages to other **accounts**. +**Virtual machines** must also implement a method to return the metadata for each **account handler** by **handler id**. + +### State and Volatility + +Accounts generally also have some mutable state, but within this specification, +state is mostly expected to be handled by some special state module defined by separate specifications. +The few main concepts of **state handler**, **state token**, **state config** and **volatility** are defined here. + +The **state handler** is a system component which the hypervisor has a reference to, +and which is responsible for managing the state of all accounts. +It only exposes the following methods to the hypervisor: +- `create(account address, state config)`: creates a new account state with the specified address and **state config**. +- `migrate(account address, new state config)`: migrates the account state with the specified address to a new state config +- `destroy(account address)`: destroys the account state with the specified address + +**State config** are optional bytes that each account handler's metadata can define which get passed to the **state handler** when an account is created. +These bytes can be used by the **state handler** to determine what type of state and commitment store the **account** needs. + +A **state token** is an opaque array of 32-bytes that is passed in each message request. +The hypervisor has no knowledge of what this token represents or how it is created, +but it is expected that modules that mange state do understand this token and use it to manage all state changes +in consistent transactions. +All side effects regarding state, events, etc. are expected to coordinate around the usage of this token. +It is possible that state modules expose methods for creating new **state tokens** +for nesting transactions. + +**Volatility** describes a message handler's behavior with respect to state and side effects. +It is an enum value that can have one of the following values: +* `volatile`: the handler can have side effects and send `volatile`, `radonly` or `pure` messages to other accounts. Such handlers are expected to both read and write state. +* `readonly`: the handler cannot cause effects side effects and can only send `readonly` or `pure` messages to other accounts. Such handlers are expected to only read state. +* `pure`: the handler cannot cause any side effects and can only call other pure handlers. Such handlers are expected to neither read nor write state. + +The hypervisor will enforce **volatility** rules when routing messages to account handlers. +Caller addresses are always passed to `volatile` methods, +they are not required when calling `readonly` methods but will be passed when available, +and they are not passed at all to `pure` methods. + +### Management of Account Lifecycle with the Hypervisor + +In order to manage **accounts** and their mapping to **account handlers**, the **hypervisor** contains stateful mappings for: +* **account address** to **handler id** +* **module name** to module **account address** and **module config** +* **message name** to **account address** for **module messages** + +The **hypervisor** as a first-class module itself handles the following special **module messages** to manage account +creation, destruction, and migration: +* `create(handler_id, init_data) -> address`: creates a new account in the specified code environment with the specified handler id and returns the address of the new account. The `on_create` message is called if it is implemented by the account. Addresses are generated deterministically by the hypervisor with a configurable algorithm which will allow public key accounts to get predictable addresses. +* `destroy(address)`: deletes the account with the specified address. `destroy` can only be called by the account itself. +* `migrate(address, new_handler_id)`: migrates the account with the specified address to the new account handler. The `on_migrate` message must be implemented by the new code and must not return an error for migration to succeed. `migrate` can only be called by the account itself. +* `force_migrate(address, new_handler_id, init_data)`: this can be used when no `on_migrate` handler can perform a proper migration to the new account handler. In this case, the old account state will be destroyed, and `on_create` will be called on the new code. This is a destructive operation and should be used with caution. + +The **hypervisor** will call the **state handler**'s `create`, `migrate`, +and `destroy` methods as needed when accounts are created, migrated, or destroyed. + +### Module Lifecycle & Module Messages + +For legacy purposes, **modules** have specific lifecycles and **module messages** have special semantics. +A **module handler** cannot be loaded with the `create` message, +but must be loaded by an external call to the hypervisor +which includes the **module name** and **module config** bytes. +The existing `cosmos.app.v1alpha1.Config` can be used for this purpose if desired. + +**Module messages** also allow the definition of pre- and post-handlers. +These are special message handlers that can only be defined in **module handlers** +and must be prefixed by the `module:pre:` or `module:post:` prefixes +When modules are loaded in the hypervisor, a composite message handler will be composed using all the defined +pre- and post-handlers for a given message name in the loaded module set. +By default, the ordering will be done alphabetically by module name. + +### Authorization and Delegated Execution + +When a message handler creates a message request, it can pass any address as the caller address, +but it must pass the same **context token** that it received in its message request. +The hypervisor will use the **context token** to verify the "real" caller address. +Every nested message call will receive a new non-forgeable **context token** so that virtual machines +and their account handlers cannot arbitrarily fool the hypervisor about the real caller address. + +By default, the hypervisor will only allow the real caller to act as the caller. + +There are use cases, however, for delegated authorization of messages or even for modules which can execute +a message on behalf of any account. +To support these, the hypervisor will accept an **authorization middleware** parameter which checks +whether a given real caller account (verified by the hypervisor) is authorized to act as a different caller +account for a given message request. + +### Message Data and Packet Specification + +To facilitate efficient cross-language and cross-VM message passing, the precise layout of **message packets** is important +as it reduces the need for serialization and deserialization in the core hypervisor and virtual machine layers. + +We start by defining a **message packet** as a 64kb (65,536 bytes) array which is aligned to a 64kb boundary. +For most message handlers, this single packet should be large enough to contain a full **message request**, +including all **message data** as well as message return data. +In cases where the packet size is too small, additional buffers can be referenced from within the **message packet**. + +More details on the specific layout of **message packets** will be specified in a future update to this RFC +or a separate RFC. +For now, we specify that within a 64kb **message packet**, +at least 56kb will be available for **message data** and message responses. + +## Abandoned Ideas (Optional) + +## Decision + +Based on internal discussions, we have decided to move forward with this design. + +## Consequences (optional) + +### Backwards Compatibility + +It is intended that existing SDK modules built using `cosmossdk.io/core` and +account handlers built with `cosmossdk.io/x/accounts` can be integrated into this system with zero or minimal changes. + +### Positive + +This design will allow native SDK modules to be built using other languages such as Rust and Zig, and +for modules to be executed in different virtual machine environments such as Wasm and the EVM. +It also extends the concept of a module to first-class accounts in the style of the existing `x/accounts` module +and EVM contracts. + +### Negative + +### Neutral + +Similar to other message passing designs, +the raw performance invoking a message handler will be slower than a golang method call as in the existing keeper paradigm. + +However, this design does nothing to preclude the continued existence of golang native keeper passing, and it is likely +that we can find performance optimizations in other areas to mitigate any performance loss. +In addition, a cross-language, cross-VM is simply not possible without some overhead. + + +### References + +- [Abandoned RFC 003: Language-independent Module Semantics & ABI](https://github.com/cosmos/cosmos-sdk/pull/15410) +- [RFC 002: Zero Copy Encoding](./rfc-002-zero-copy-encoding.md) +- [RFC 004: Accounts](./rfc-004-accounts.md) + +## Discussion + +This specification does not cover many important parts of a complete system such as the encoding of message data, +storage, events, transaction execution, or interaction with consensus environments. +It is the intention of this specification to specify the minimum necessary for this layer in a modular layer. +The full framework should be composed of a set of independent, minimally defined layers that together +form a "standard" execution environment, but that at the same time can be replaced and recomposed by +different applications with different needs. + +The basic set of standards necessary to provide a coherent framework includes: +* message encoding and naming, including compatibility with the existing protobuf-based message encoding +* storage +* events +* authorization middleware diff --git a/x/auth/go.mod b/x/auth/go.mod new file mode 100644 index 000000000000..d34e1d4da5b7 --- /dev/null +++ b/x/auth/go.mod @@ -0,0 +1,187 @@ +module cosmossdk.io/x/auth + +go 1.23 + +require ( + cosmossdk.io/api v0.7.5 + cosmossdk.io/collections v0.4.0 + cosmossdk.io/core v1.0.0 + cosmossdk.io/core/testing v0.0.0-00010101000000-000000000000 + cosmossdk.io/depinject v1.0.0 + cosmossdk.io/errors v1.0.1 + cosmossdk.io/math v1.3.0 + cosmossdk.io/store v1.1.1-0.20240418092142-896cdf1971bc + cosmossdk.io/x/consensus v0.0.0-00010101000000-000000000000 + cosmossdk.io/x/tx v0.13.3 + github.com/cometbft/cometbft v1.0.0-rc1 + github.com/cometbft/cometbft/api v1.0.0-rc.1 + github.com/cosmos/cosmos-proto v1.0.0-beta.5 + github.com/cosmos/cosmos-sdk v0.53.0 + github.com/cosmos/gogoproto v1.7.0 + github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0 + github.com/golang/mock v1.6.0 + github.com/golang/protobuf v1.5.4 + github.com/grpc-ecosystem/grpc-gateway v1.16.0 + github.com/spf13/cobra v1.8.1 + github.com/spf13/viper v1.19.0 + github.com/stretchr/testify v1.9.0 + google.golang.org/genproto/googleapis/api v0.0.0-20240604185151-ef581f913117 + google.golang.org/grpc v1.66.0 + google.golang.org/protobuf v1.34.2 + gotest.tools/v3 v3.5.1 + pgregory.net/rapid v1.1.0 + sigs.k8s.io/yaml v1.4.0 +) + +require ( + buf.build/gen/go/cometbft/cometbft/protocolbuffers/go v1.34.2-20240701160653-fedbb9acfd2f.2 // indirect + buf.build/gen/go/cosmos/gogo-proto/protocolbuffers/go v1.34.2-20240130113600-88ef6483f90f.2 // indirect + cosmossdk.io/log v1.4.1 // indirect + cosmossdk.io/schema v0.2.0 // indirect + cosmossdk.io/x/bank v0.0.0-20240226161501-23359a0b6d91 // indirect + cosmossdk.io/x/staking v0.0.0-00010101000000-000000000000 // indirect + filippo.io/edwards25519 v1.1.0 // indirect + github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect + github.com/99designs/keyring v1.2.2 // indirect + github.com/DataDog/datadog-go v4.8.3+incompatible // indirect + github.com/DataDog/zstd v1.5.5 // indirect + github.com/Microsoft/go-winio v0.6.1 // indirect + github.com/beorn7/perks v1.0.1 // indirect + github.com/bgentry/speakeasy v0.2.0 // indirect + github.com/btcsuite/btcd/btcec/v2 v2.3.3 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect + github.com/cockroachdb/errors v1.11.1 // indirect + github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect + github.com/cockroachdb/pebble v1.1.0 // indirect + github.com/cockroachdb/redact v1.1.5 // indirect + github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect + github.com/cometbft/cometbft-db v0.12.0 // indirect + github.com/cosmos/btcutil v1.0.5 // indirect + github.com/cosmos/cosmos-db v1.0.3-0.20240829004618-717cba019b33 // indirect + github.com/cosmos/crypto v0.1.2 // indirect + github.com/cosmos/go-bip39 v1.0.0 // indirect + github.com/cosmos/gogogateway v1.2.0 // indirect + github.com/cosmos/iavl v1.2.1-0.20240725141113-7adc688cf179 // indirect + github.com/cosmos/ics23/go v0.11.0 // indirect + github.com/cosmos/ledger-cosmos-go v0.13.3 // indirect + github.com/danieljoos/wincred v1.2.1 // indirect + github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect + github.com/dgraph-io/badger/v4 v4.2.0 // indirect + github.com/dgraph-io/ristretto v0.1.1 // indirect + github.com/dustin/go-humanize v1.0.1 // indirect + github.com/dvsekhvalnov/jose2go v1.6.0 // indirect + github.com/emicklei/dot v1.6.2 // indirect + github.com/fatih/color v1.17.0 // indirect + github.com/felixge/httpsnoop v1.0.4 // indirect + github.com/fsnotify/fsnotify v1.7.0 // indirect + github.com/getsentry/sentry-go v0.27.0 // indirect + github.com/go-kit/kit v0.13.0 // indirect + github.com/go-kit/log v0.2.1 // indirect + github.com/go-logfmt/logfmt v0.6.0 // indirect + github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 // indirect + github.com/gofrs/uuid v4.4.0+incompatible // indirect + github.com/gogo/googleapis v1.4.1 // indirect + github.com/gogo/protobuf v1.3.2 // indirect + github.com/golang/glog v1.2.1 // indirect + github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect + github.com/golang/snappy v0.0.4 // indirect + github.com/google/btree v1.1.2 // indirect + github.com/google/flatbuffers v2.0.8+incompatible // indirect + github.com/google/go-cmp v0.6.0 // indirect + github.com/google/orderedcode v0.0.1 // indirect + github.com/gorilla/handlers v1.5.2 // indirect + github.com/gorilla/mux v1.8.1 // indirect + github.com/gorilla/websocket v1.5.3 // indirect + github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 // indirect + github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c // indirect + github.com/hashicorp/go-hclog v1.6.3 // indirect + github.com/hashicorp/go-immutable-radix v1.3.1 // indirect + github.com/hashicorp/go-metrics v0.5.3 // indirect + github.com/hashicorp/go-plugin v1.6.1 // indirect + github.com/hashicorp/golang-lru v1.0.2 // indirect + github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect + github.com/hashicorp/hcl v1.0.0 // indirect + github.com/hashicorp/yamux v0.1.1 // indirect + github.com/hdevalence/ed25519consensus v0.2.0 // indirect + github.com/huandu/skiplist v1.2.0 // indirect + github.com/iancoleman/strcase v0.3.0 // indirect + github.com/inconshreveable/mousetrap v1.1.0 // indirect + github.com/jmhodges/levigo v1.0.0 // indirect + github.com/klauspost/compress v1.17.9 // indirect + github.com/kr/pretty v0.3.1 // indirect + github.com/kr/text v0.2.0 // indirect + github.com/lib/pq v1.10.9 // indirect + github.com/libp2p/go-buffer-pool v0.1.0 // indirect + github.com/linxGnu/grocksdb v1.8.14 // indirect + github.com/magiconair/properties v1.8.7 // indirect + github.com/mattn/go-colorable v0.1.13 // indirect + github.com/mattn/go-isatty v0.0.20 // indirect + github.com/minio/highwayhash v1.0.2 // indirect + github.com/mitchellh/go-testing-interface v1.14.1 // indirect + github.com/mitchellh/mapstructure v1.5.0 // indirect + github.com/mtibben/percent v0.2.1 // indirect + github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect + github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a // indirect + github.com/oklog/run v1.1.0 // indirect + github.com/pelletier/go-toml/v2 v2.2.3 // indirect + github.com/petermattis/goid v0.0.0-20240327183114-c42a807a84ba // indirect + github.com/pkg/errors v0.9.1 // indirect + github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect + github.com/prometheus/client_golang v1.20.2 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.57.0 // indirect + github.com/prometheus/procfs v0.15.1 // indirect + github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect + github.com/rogpeppe/go-internal v1.12.0 // indirect + github.com/rs/cors v1.11.0 // indirect + github.com/rs/zerolog v1.33.0 // indirect + github.com/sagikazarmark/locafero v0.4.0 // indirect + github.com/sagikazarmark/slog-shim v0.1.0 // indirect + github.com/sasha-s/go-deadlock v0.3.1 // indirect + github.com/sourcegraph/conc v0.3.0 // indirect + github.com/spf13/afero v1.11.0 // indirect + github.com/spf13/cast v1.7.0 // indirect + github.com/spf13/pflag v1.0.5 // indirect + github.com/subosito/gotenv v1.6.0 // indirect + github.com/supranational/blst v0.3.12 // indirect + github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d // indirect + github.com/tendermint/go-amino v0.16.0 // indirect + github.com/tidwall/btree v1.7.0 // indirect + github.com/zondax/hid v0.9.2 // indirect + github.com/zondax/ledger-go v0.14.3 // indirect + gitlab.com/yawning/secp256k1-voi v0.0.0-20230925100816-f2616030848b // indirect + gitlab.com/yawning/tuplehash v0.0.0-20230713102510-df83abbf9a02 // indirect + go.etcd.io/bbolt v1.4.0-alpha.0.0.20240404170359-43604f3112c5 // indirect + go.opencensus.io v0.24.0 // indirect + go.uber.org/multierr v1.11.0 // indirect + golang.org/x/crypto v0.26.0 // indirect + golang.org/x/exp v0.0.0-20240531132922-fd00a4e0eefc // indirect + golang.org/x/mod v0.17.0 // indirect + golang.org/x/net v0.28.0 // indirect + golang.org/x/sync v0.8.0 // indirect + golang.org/x/sys v0.24.0 // indirect + golang.org/x/term v0.23.0 // indirect + golang.org/x/text v0.17.0 // indirect + golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d // indirect + google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240827150818-7e3bb234dfed // indirect + gopkg.in/ini.v1 v1.67.0 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect +) + +replace github.com/cosmos/cosmos-sdk => ../../. + +replace github.com/cosmos/iavl => github.com/cosmos/iavl v1.0.0-beta.1.0.20240813194616-eb5078efcf9e + +// TODO remove post spinning out all modules +replace ( + cosmossdk.io/api => ../../api + cosmossdk.io/collections => ../../collections + cosmossdk.io/core => ../../core + cosmossdk.io/core/testing => ../../core/testing + cosmossdk.io/store => ../../store + cosmossdk.io/x/bank => ../bank + cosmossdk.io/x/consensus => ../consensus + cosmossdk.io/x/staking => ../staking + cosmossdk.io/x/tx => ../tx +) diff --git a/x/distribution/go.mod b/x/distribution/go.mod index 561636f49d15..908b99a37707 100644 --- a/x/distribution/go.mod +++ b/x/distribution/go.mod @@ -35,9 +35,6 @@ require ( github.com/cockroachdb/errors v1.11.1 // indirect github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect -) - -require ( buf.build/gen/go/cometbft/cometbft/protocolbuffers/go v1.34.2-20240701160653-fedbb9acfd2f.2 // indirect buf.build/gen/go/cosmos/gogo-proto/protocolbuffers/go v1.34.2-20240130113600-88ef6483f90f.2 // indirect cosmossdk.io/x/consensus v0.0.0-00010101000000-000000000000 // indirect