From 685160b8a11a8c4de7f86cd8967778a6d02c5cf8 Mon Sep 17 00:00:00 2001 From: Sammy Date: Wed, 24 Jul 2024 12:01:10 -0400 Subject: [PATCH] feat(ampd): revert "integrate ampd queued broadcaster with the axelar batch request (#474)" This reverts commit 600f247b4cffefd1c855b76f63699289e32d2506. --- ampd/build.rs | 8 - ampd/proto/axelar/README.md | 11 - .../axelar/auxiliary/v1beta1/events.proto | 12 - .../axelar/auxiliary/v1beta1/genesis.proto | 11 - .../axelar/auxiliary/v1beta1/service.proto | 20 - ampd/proto/axelar/auxiliary/v1beta1/tx.proto | 30 -- .../axelar/axelarnet/v1beta1/events.proto | 131 ------ .../axelar/axelarnet/v1beta1/genesis.proto | 27 -- .../axelar/axelarnet/v1beta1/params.proto | 33 -- .../axelar/axelarnet/v1beta1/proposal.proto | 29 -- .../axelar/axelarnet/v1beta1/query.proto | 39 -- .../axelar/axelarnet/v1beta1/service.proto | 118 ----- ampd/proto/axelar/axelarnet/v1beta1/tx.proto | 188 -------- .../axelar/axelarnet/v1beta1/types.proto | 62 --- ampd/proto/axelar/evm/v1beta1/events.proto | 340 -------------- ampd/proto/axelar/evm/v1beta1/genesis.proto | 39 -- ampd/proto/axelar/evm/v1beta1/params.proto | 37 -- ampd/proto/axelar/evm/v1beta1/query.proto | 243 ----------- ampd/proto/axelar/evm/v1beta1/service.proto | 208 --------- ampd/proto/axelar/evm/v1beta1/tx.proto | 259 ----------- ampd/proto/axelar/evm/v1beta1/types.proto | 375 ---------------- .../multisig/exported/v1beta1/types.proto | 28 -- .../axelar/multisig/v1beta1/events.proto | 127 ------ .../axelar/multisig/v1beta1/genesis.proto | 20 - .../axelar/multisig/v1beta1/params.proto | 21 - .../proto/axelar/multisig/v1beta1/query.proto | 114 ----- .../axelar/multisig/v1beta1/service.proto | 92 ---- ampd/proto/axelar/multisig/v1beta1/tx.proto | 86 ---- .../proto/axelar/multisig/v1beta1/types.proto | 84 ---- .../axelar/nexus/exported/v1beta1/types.proto | 129 ------ ampd/proto/axelar/nexus/v1beta1/events.proto | 66 --- ampd/proto/axelar/nexus/v1beta1/genesis.proto | 32 -- ampd/proto/axelar/nexus/v1beta1/params.proto | 22 - ampd/proto/axelar/nexus/v1beta1/query.proto | 175 -------- ampd/proto/axelar/nexus/v1beta1/service.proto | 150 ------- ampd/proto/axelar/nexus/v1beta1/tx.proto | 87 ---- ampd/proto/axelar/nexus/v1beta1/types.proto | 65 --- .../permission/exported/v1beta1/types.proto | 24 - .../axelar/permission/v1beta1/genesis.proto | 19 - .../axelar/permission/v1beta1/params.proto | 10 - .../axelar/permission/v1beta1/query.proto | 27 -- .../axelar/permission/v1beta1/service.proto | 54 --- ampd/proto/axelar/permission/v1beta1/tx.proto | 41 -- .../axelar/permission/v1beta1/types.proto | 15 - .../proto/axelar/reward/v1beta1/genesis.proto | 17 - ampd/proto/axelar/reward/v1beta1/params.proto | 20 - ampd/proto/axelar/reward/v1beta1/query.proto | 28 -- .../proto/axelar/reward/v1beta1/service.proto | 42 -- ampd/proto/axelar/reward/v1beta1/tx.proto | 24 - ampd/proto/axelar/reward/v1beta1/types.proto | 33 -- .../snapshot/exported/v1beta1/types.proto | 39 -- .../axelar/snapshot/v1beta1/genesis.proto | 18 - .../axelar/snapshot/v1beta1/params.proto | 11 - .../proto/axelar/snapshot/v1beta1/query.proto | 35 -- .../axelar/snapshot/v1beta1/service.proto | 41 -- ampd/proto/axelar/snapshot/v1beta1/tx.proto | 28 -- .../proto/axelar/snapshot/v1beta1/types.proto | 17 - .../axelar/tss/exported/v1beta1/types.proto | 68 --- .../axelar/tss/tofnd/v1beta1/common.proto | 28 -- .../axelar/tss/tofnd/v1beta1/multisig.proto | 40 -- .../axelar/tss/tofnd/v1beta1/tofnd.proto | 129 ------ ampd/proto/axelar/tss/v1beta1/genesis.proto | 12 - ampd/proto/axelar/tss/v1beta1/params.proto | 32 -- ampd/proto/axelar/tss/v1beta1/query.proto | 14 - ampd/proto/axelar/tss/v1beta1/service.proto | 32 -- ampd/proto/axelar/tss/v1beta1/tx.proto | 147 ------- ampd/proto/axelar/tss/v1beta1/types.proto | 63 --- ampd/proto/axelar/utils/v1beta1/bitmap.proto | 16 - ampd/proto/axelar/utils/v1beta1/queuer.proto | 19 - .../axelar/utils/v1beta1/threshold.proto | 16 - .../axelar/vote/exported/v1beta1/types.proto | 73 ---- ampd/proto/axelar/vote/v1beta1/events.proto | 16 - ampd/proto/axelar/vote/v1beta1/genesis.proto | 17 - ampd/proto/axelar/vote/v1beta1/params.proto | 16 - ampd/proto/axelar/vote/v1beta1/query.proto | 14 - ampd/proto/axelar/vote/v1beta1/service.proto | 30 -- ampd/proto/axelar/vote/v1beta1/tx.proto | 31 -- ampd/proto/axelar/vote/v1beta1/types.proto | 33 -- ampd/proto/third_party/buf.yaml | 20 - .../cosmos/auth/v1beta1/auth.proto | 50 --- .../cosmos/auth/v1beta1/genesis.proto | 17 - .../cosmos/auth/v1beta1/query.proto | 89 ---- .../cosmos/authz/v1beta1/authz.proto | 39 -- .../cosmos/authz/v1beta1/event.proto | 25 -- .../cosmos/authz/v1beta1/genesis.proto | 13 - .../cosmos/authz/v1beta1/query.proto | 81 ---- .../third_party/cosmos/authz/v1beta1/tx.proto | 70 --- .../cosmos/bank/v1beta1/authz.proto | 19 - .../cosmos/bank/v1beta1/bank.proto | 96 ---- .../cosmos/bank/v1beta1/genesis.proto | 39 -- .../cosmos/bank/v1beta1/query.proto | 193 -------- .../third_party/cosmos/bank/v1beta1/tx.proto | 42 -- .../cosmos/base/abci/v1beta1/abci.proto | 144 ------ .../cosmos/base/kv/v1beta1/kv.proto | 17 - .../cosmos/base/node/v1beta1/query.proto | 22 - .../base/query/v1beta1/pagination.proto | 55 --- .../base/reflection/v1beta1/reflection.proto | 44 -- .../base/reflection/v2alpha1/reflection.proto | 218 --------- .../base/snapshots/v1beta1/snapshot.proto | 57 --- .../base/store/v1beta1/commit_info.proto | 29 -- .../cosmos/base/store/v1beta1/listening.proto | 34 -- .../base/tendermint/v1beta1/query.proto | 138 ------ .../cosmos/base/v1beta1/coin.proto | 40 -- .../capability/v1beta1/capability.proto | 30 -- .../cosmos/capability/v1beta1/genesis.proto | 26 -- .../cosmos/crisis/v1beta1/genesis.proto | 15 - .../cosmos/crisis/v1beta1/tx.proto | 25 -- .../cosmos/crypto/ed25519/keys.proto | 23 - .../cosmos/crypto/multisig/keys.proto | 18 - .../crypto/multisig/v1beta1/multisig.proto | 25 -- .../cosmos/crypto/secp256k1/keys.proto | 22 - .../cosmos/crypto/secp256r1/keys.proto | 23 - .../distribution/v1beta1/distribution.proto | 157 ------- .../cosmos/distribution/v1beta1/genesis.proto | 155 ------- .../cosmos/distribution/v1beta1/query.proto | 218 --------- .../cosmos/distribution/v1beta1/tx.proto | 79 ---- .../cosmos/evidence/v1beta1/evidence.proto | 21 - .../cosmos/evidence/v1beta1/genesis.proto | 12 - .../cosmos/evidence/v1beta1/query.proto | 51 --- .../cosmos/evidence/v1beta1/tx.proto | 32 -- .../cosmos/feegrant/v1beta1/feegrant.proto | 78 ---- .../cosmos/feegrant/v1beta1/genesis.proto | 13 - .../cosmos/feegrant/v1beta1/query.proto | 78 ---- .../cosmos/feegrant/v1beta1/tx.proto | 49 --- .../cosmos/genutil/v1beta1/genesis.proto | 16 - .../cosmos/gov/v1beta1/genesis.proto | 26 -- .../third_party/cosmos/gov/v1beta1/gov.proto | 200 --------- .../cosmos/gov/v1beta1/query.proto | 190 -------- .../third_party/cosmos/gov/v1beta1/tx.proto | 99 ----- .../cosmos/mint/v1beta1/genesis.proto | 16 - .../cosmos/mint/v1beta1/mint.proto | 53 --- .../cosmos/mint/v1beta1/query.proto | 57 --- .../cosmos/params/v1beta1/params.proto | 27 -- .../cosmos/params/v1beta1/query.proto | 32 -- .../cosmos/slashing/v1beta1/genesis.proto | 50 --- .../cosmos/slashing/v1beta1/query.proto | 63 --- .../cosmos/slashing/v1beta1/slashing.proto | 58 --- .../cosmos/slashing/v1beta1/tx.proto | 26 -- .../cosmos/staking/v1beta1/authz.proto | 47 -- .../cosmos/staking/v1beta1/genesis.proto | 53 --- .../cosmos/staking/v1beta1/query.proto | 348 --------------- .../cosmos/staking/v1beta1/staking.proto | 334 -------------- .../cosmos/staking/v1beta1/tx.proto | 123 ------ .../cosmos/tx/signing/v1beta1/signing.proto | 91 ---- .../cosmos/tx/v1beta1/service.proto | 165 ------- .../third_party/cosmos/tx/v1beta1/tx.proto | 183 -------- .../cosmos/upgrade/v1beta1/query.proto | 104 ----- .../cosmos/upgrade/v1beta1/upgrade.proto | 78 ---- .../cosmos/vesting/v1beta1/tx.proto | 31 -- .../cosmos/vesting/v1beta1/vesting.proto | 85 ---- .../third_party/cosmos_proto/cosmos.proto | 16 - .../third_party/cosmwasm/wasm/v1/authz.proto | 118 ----- .../cosmwasm/wasm/v1/genesis.proto | 46 -- .../third_party/cosmwasm/wasm/v1/ibc.proto | 37 -- .../cosmwasm/wasm/v1/proposal.proto | 272 ------------ .../third_party/cosmwasm/wasm/v1/query.proto | 263 ----------- .../third_party/cosmwasm/wasm/v1/tx.proto | 192 -------- .../third_party/cosmwasm/wasm/v1/types.proto | 145 ------ ampd/proto/third_party/gogoproto/gogo.proto | 145 ------ .../third_party/google/api/annotations.proto | 31 -- ampd/proto/third_party/google/api/http.proto | 379 ---------------- .../applications/transfer/v1/genesis.proto | 19 - .../ibc/applications/transfer/v1/query.proto | 105 ----- .../applications/transfer/v1/transfer.proto | 30 -- .../ibc/applications/transfer/v1/tx.proto | 49 --- .../ibc/applications/transfer/v2/packet.proto | 21 - .../ibc/core/channel/v1/channel.proto | 162 ------- .../ibc/core/channel/v1/genesis.proto | 32 -- .../ibc/core/channel/v1/query.proto | 376 ---------------- .../third_party/ibc/core/channel/v1/tx.proto | 245 ----------- .../ibc/core/client/v1/client.proto | 103 ----- .../ibc/core/client/v1/genesis.proto | 48 -- .../ibc/core/client/v1/query.proto | 207 --------- .../third_party/ibc/core/client/v1/tx.proto | 99 ----- .../ibc/core/commitment/v1/commitment.proto | 41 -- .../ibc/core/connection/v1/connection.proto | 114 ----- .../ibc/core/connection/v1/genesis.proto | 18 - .../ibc/core/connection/v1/query.proto | 138 ------ .../ibc/core/connection/v1/tx.proto | 118 ----- .../ibc/core/types/v1/genesis.proto | 23 - .../lightclients/localhost/v1/localhost.proto | 18 - .../solomachine/v1/solomachine.proto | 189 -------- .../solomachine/v2/solomachine.proto | 189 -------- .../tendermint/v1/tendermint.proto | 114 ----- ampd/proto/third_party/proofs.proto | 234 ---------- .../third_party/tendermint/abci/types.proto | 413 ------------------ .../third_party/tendermint/crypto/keys.proto | 17 - .../third_party/tendermint/crypto/proof.proto | 41 -- .../tendermint/libs/bits/types.proto | 9 - .../third_party/tendermint/p2p/types.proto | 34 -- .../third_party/tendermint/types/block.proto | 15 - .../tendermint/types/evidence.proto | 38 -- .../third_party/tendermint/types/params.proto | 80 ---- .../third_party/tendermint/types/types.proto | 157 ------- .../tendermint/types/validator.proto | 25 -- .../tendermint/version/types.proto | 24 - ampd/src/broadcaster/confirm_tx.rs | 352 --------------- ampd/src/broadcaster/mod.rs | 162 ++++++- ampd/src/lib.rs | 27 +- ampd/src/queue/mod.rs | 1 - ampd/src/queue/proto.rs | 42 -- ampd/src/queue/queued_broadcaster.rs | 229 +++------- 202 files changed, 201 insertions(+), 16004 deletions(-) delete mode 100644 ampd/proto/axelar/README.md delete mode 100644 ampd/proto/axelar/auxiliary/v1beta1/events.proto delete mode 100644 ampd/proto/axelar/auxiliary/v1beta1/genesis.proto delete mode 100644 ampd/proto/axelar/auxiliary/v1beta1/service.proto delete mode 100644 ampd/proto/axelar/auxiliary/v1beta1/tx.proto delete mode 100644 ampd/proto/axelar/axelarnet/v1beta1/events.proto delete mode 100644 ampd/proto/axelar/axelarnet/v1beta1/genesis.proto delete mode 100644 ampd/proto/axelar/axelarnet/v1beta1/params.proto delete mode 100644 ampd/proto/axelar/axelarnet/v1beta1/proposal.proto delete mode 100644 ampd/proto/axelar/axelarnet/v1beta1/query.proto delete mode 100644 ampd/proto/axelar/axelarnet/v1beta1/service.proto delete mode 100644 ampd/proto/axelar/axelarnet/v1beta1/tx.proto delete mode 100644 ampd/proto/axelar/axelarnet/v1beta1/types.proto delete mode 100644 ampd/proto/axelar/evm/v1beta1/events.proto delete mode 100644 ampd/proto/axelar/evm/v1beta1/genesis.proto delete mode 100644 ampd/proto/axelar/evm/v1beta1/params.proto delete mode 100644 ampd/proto/axelar/evm/v1beta1/query.proto delete mode 100644 ampd/proto/axelar/evm/v1beta1/service.proto delete mode 100644 ampd/proto/axelar/evm/v1beta1/tx.proto delete mode 100644 ampd/proto/axelar/evm/v1beta1/types.proto delete mode 100644 ampd/proto/axelar/multisig/exported/v1beta1/types.proto delete mode 100644 ampd/proto/axelar/multisig/v1beta1/events.proto delete mode 100644 ampd/proto/axelar/multisig/v1beta1/genesis.proto delete mode 100644 ampd/proto/axelar/multisig/v1beta1/params.proto delete mode 100644 ampd/proto/axelar/multisig/v1beta1/query.proto delete mode 100644 ampd/proto/axelar/multisig/v1beta1/service.proto delete mode 100644 ampd/proto/axelar/multisig/v1beta1/tx.proto delete mode 100644 ampd/proto/axelar/multisig/v1beta1/types.proto delete mode 100644 ampd/proto/axelar/nexus/exported/v1beta1/types.proto delete mode 100644 ampd/proto/axelar/nexus/v1beta1/events.proto delete mode 100644 ampd/proto/axelar/nexus/v1beta1/genesis.proto delete mode 100644 ampd/proto/axelar/nexus/v1beta1/params.proto delete mode 100644 ampd/proto/axelar/nexus/v1beta1/query.proto delete mode 100644 ampd/proto/axelar/nexus/v1beta1/service.proto delete mode 100644 ampd/proto/axelar/nexus/v1beta1/tx.proto delete mode 100644 ampd/proto/axelar/nexus/v1beta1/types.proto delete mode 100644 ampd/proto/axelar/permission/exported/v1beta1/types.proto delete mode 100644 ampd/proto/axelar/permission/v1beta1/genesis.proto delete mode 100644 ampd/proto/axelar/permission/v1beta1/params.proto delete mode 100644 ampd/proto/axelar/permission/v1beta1/query.proto delete mode 100644 ampd/proto/axelar/permission/v1beta1/service.proto delete mode 100644 ampd/proto/axelar/permission/v1beta1/tx.proto delete mode 100644 ampd/proto/axelar/permission/v1beta1/types.proto delete mode 100644 ampd/proto/axelar/reward/v1beta1/genesis.proto delete mode 100644 ampd/proto/axelar/reward/v1beta1/params.proto delete mode 100644 ampd/proto/axelar/reward/v1beta1/query.proto delete mode 100644 ampd/proto/axelar/reward/v1beta1/service.proto delete mode 100644 ampd/proto/axelar/reward/v1beta1/tx.proto delete mode 100644 ampd/proto/axelar/reward/v1beta1/types.proto delete mode 100644 ampd/proto/axelar/snapshot/exported/v1beta1/types.proto delete mode 100644 ampd/proto/axelar/snapshot/v1beta1/genesis.proto delete mode 100644 ampd/proto/axelar/snapshot/v1beta1/params.proto delete mode 100644 ampd/proto/axelar/snapshot/v1beta1/query.proto delete mode 100644 ampd/proto/axelar/snapshot/v1beta1/service.proto delete mode 100644 ampd/proto/axelar/snapshot/v1beta1/tx.proto delete mode 100644 ampd/proto/axelar/snapshot/v1beta1/types.proto delete mode 100644 ampd/proto/axelar/tss/exported/v1beta1/types.proto delete mode 100644 ampd/proto/axelar/tss/tofnd/v1beta1/common.proto delete mode 100644 ampd/proto/axelar/tss/tofnd/v1beta1/multisig.proto delete mode 100644 ampd/proto/axelar/tss/tofnd/v1beta1/tofnd.proto delete mode 100644 ampd/proto/axelar/tss/v1beta1/genesis.proto delete mode 100644 ampd/proto/axelar/tss/v1beta1/params.proto delete mode 100644 ampd/proto/axelar/tss/v1beta1/query.proto delete mode 100644 ampd/proto/axelar/tss/v1beta1/service.proto delete mode 100644 ampd/proto/axelar/tss/v1beta1/tx.proto delete mode 100644 ampd/proto/axelar/tss/v1beta1/types.proto delete mode 100644 ampd/proto/axelar/utils/v1beta1/bitmap.proto delete mode 100644 ampd/proto/axelar/utils/v1beta1/queuer.proto delete mode 100644 ampd/proto/axelar/utils/v1beta1/threshold.proto delete mode 100644 ampd/proto/axelar/vote/exported/v1beta1/types.proto delete mode 100644 ampd/proto/axelar/vote/v1beta1/events.proto delete mode 100644 ampd/proto/axelar/vote/v1beta1/genesis.proto delete mode 100644 ampd/proto/axelar/vote/v1beta1/params.proto delete mode 100644 ampd/proto/axelar/vote/v1beta1/query.proto delete mode 100644 ampd/proto/axelar/vote/v1beta1/service.proto delete mode 100644 ampd/proto/axelar/vote/v1beta1/tx.proto delete mode 100644 ampd/proto/axelar/vote/v1beta1/types.proto delete mode 100644 ampd/proto/third_party/buf.yaml delete mode 100644 ampd/proto/third_party/cosmos/auth/v1beta1/auth.proto delete mode 100644 ampd/proto/third_party/cosmos/auth/v1beta1/genesis.proto delete mode 100644 ampd/proto/third_party/cosmos/auth/v1beta1/query.proto delete mode 100644 ampd/proto/third_party/cosmos/authz/v1beta1/authz.proto delete mode 100644 ampd/proto/third_party/cosmos/authz/v1beta1/event.proto delete mode 100644 ampd/proto/third_party/cosmos/authz/v1beta1/genesis.proto delete mode 100644 ampd/proto/third_party/cosmos/authz/v1beta1/query.proto delete mode 100644 ampd/proto/third_party/cosmos/authz/v1beta1/tx.proto delete mode 100644 ampd/proto/third_party/cosmos/bank/v1beta1/authz.proto delete mode 100644 ampd/proto/third_party/cosmos/bank/v1beta1/bank.proto delete mode 100644 ampd/proto/third_party/cosmos/bank/v1beta1/genesis.proto delete mode 100644 ampd/proto/third_party/cosmos/bank/v1beta1/query.proto delete mode 100644 ampd/proto/third_party/cosmos/bank/v1beta1/tx.proto delete mode 100644 ampd/proto/third_party/cosmos/base/abci/v1beta1/abci.proto delete mode 100644 ampd/proto/third_party/cosmos/base/kv/v1beta1/kv.proto delete mode 100644 ampd/proto/third_party/cosmos/base/node/v1beta1/query.proto delete mode 100644 ampd/proto/third_party/cosmos/base/query/v1beta1/pagination.proto delete mode 100644 ampd/proto/third_party/cosmos/base/reflection/v1beta1/reflection.proto delete mode 100644 ampd/proto/third_party/cosmos/base/reflection/v2alpha1/reflection.proto delete mode 100644 ampd/proto/third_party/cosmos/base/snapshots/v1beta1/snapshot.proto delete mode 100644 ampd/proto/third_party/cosmos/base/store/v1beta1/commit_info.proto delete mode 100644 ampd/proto/third_party/cosmos/base/store/v1beta1/listening.proto delete mode 100644 ampd/proto/third_party/cosmos/base/tendermint/v1beta1/query.proto delete mode 100644 ampd/proto/third_party/cosmos/base/v1beta1/coin.proto delete mode 100644 ampd/proto/third_party/cosmos/capability/v1beta1/capability.proto delete mode 100644 ampd/proto/third_party/cosmos/capability/v1beta1/genesis.proto delete mode 100644 ampd/proto/third_party/cosmos/crisis/v1beta1/genesis.proto delete mode 100644 ampd/proto/third_party/cosmos/crisis/v1beta1/tx.proto delete mode 100644 ampd/proto/third_party/cosmos/crypto/ed25519/keys.proto delete mode 100644 ampd/proto/third_party/cosmos/crypto/multisig/keys.proto delete mode 100644 ampd/proto/third_party/cosmos/crypto/multisig/v1beta1/multisig.proto delete mode 100644 ampd/proto/third_party/cosmos/crypto/secp256k1/keys.proto delete mode 100644 ampd/proto/third_party/cosmos/crypto/secp256r1/keys.proto delete mode 100644 ampd/proto/third_party/cosmos/distribution/v1beta1/distribution.proto delete mode 100644 ampd/proto/third_party/cosmos/distribution/v1beta1/genesis.proto delete mode 100644 ampd/proto/third_party/cosmos/distribution/v1beta1/query.proto delete mode 100644 ampd/proto/third_party/cosmos/distribution/v1beta1/tx.proto delete mode 100644 ampd/proto/third_party/cosmos/evidence/v1beta1/evidence.proto delete mode 100644 ampd/proto/third_party/cosmos/evidence/v1beta1/genesis.proto delete mode 100644 ampd/proto/third_party/cosmos/evidence/v1beta1/query.proto delete mode 100644 ampd/proto/third_party/cosmos/evidence/v1beta1/tx.proto delete mode 100644 ampd/proto/third_party/cosmos/feegrant/v1beta1/feegrant.proto delete mode 100644 ampd/proto/third_party/cosmos/feegrant/v1beta1/genesis.proto delete mode 100644 ampd/proto/third_party/cosmos/feegrant/v1beta1/query.proto delete mode 100644 ampd/proto/third_party/cosmos/feegrant/v1beta1/tx.proto delete mode 100644 ampd/proto/third_party/cosmos/genutil/v1beta1/genesis.proto delete mode 100644 ampd/proto/third_party/cosmos/gov/v1beta1/genesis.proto delete mode 100644 ampd/proto/third_party/cosmos/gov/v1beta1/gov.proto delete mode 100644 ampd/proto/third_party/cosmos/gov/v1beta1/query.proto delete mode 100644 ampd/proto/third_party/cosmos/gov/v1beta1/tx.proto delete mode 100644 ampd/proto/third_party/cosmos/mint/v1beta1/genesis.proto delete mode 100644 ampd/proto/third_party/cosmos/mint/v1beta1/mint.proto delete mode 100644 ampd/proto/third_party/cosmos/mint/v1beta1/query.proto delete mode 100644 ampd/proto/third_party/cosmos/params/v1beta1/params.proto delete mode 100644 ampd/proto/third_party/cosmos/params/v1beta1/query.proto delete mode 100644 ampd/proto/third_party/cosmos/slashing/v1beta1/genesis.proto delete mode 100644 ampd/proto/third_party/cosmos/slashing/v1beta1/query.proto delete mode 100644 ampd/proto/third_party/cosmos/slashing/v1beta1/slashing.proto delete mode 100644 ampd/proto/third_party/cosmos/slashing/v1beta1/tx.proto delete mode 100644 ampd/proto/third_party/cosmos/staking/v1beta1/authz.proto delete mode 100644 ampd/proto/third_party/cosmos/staking/v1beta1/genesis.proto delete mode 100644 ampd/proto/third_party/cosmos/staking/v1beta1/query.proto delete mode 100644 ampd/proto/third_party/cosmos/staking/v1beta1/staking.proto delete mode 100644 ampd/proto/third_party/cosmos/staking/v1beta1/tx.proto delete mode 100644 ampd/proto/third_party/cosmos/tx/signing/v1beta1/signing.proto delete mode 100644 ampd/proto/third_party/cosmos/tx/v1beta1/service.proto delete mode 100644 ampd/proto/third_party/cosmos/tx/v1beta1/tx.proto delete mode 100644 ampd/proto/third_party/cosmos/upgrade/v1beta1/query.proto delete mode 100644 ampd/proto/third_party/cosmos/upgrade/v1beta1/upgrade.proto delete mode 100644 ampd/proto/third_party/cosmos/vesting/v1beta1/tx.proto delete mode 100644 ampd/proto/third_party/cosmos/vesting/v1beta1/vesting.proto delete mode 100644 ampd/proto/third_party/cosmos_proto/cosmos.proto delete mode 100644 ampd/proto/third_party/cosmwasm/wasm/v1/authz.proto delete mode 100644 ampd/proto/third_party/cosmwasm/wasm/v1/genesis.proto delete mode 100644 ampd/proto/third_party/cosmwasm/wasm/v1/ibc.proto delete mode 100644 ampd/proto/third_party/cosmwasm/wasm/v1/proposal.proto delete mode 100644 ampd/proto/third_party/cosmwasm/wasm/v1/query.proto delete mode 100644 ampd/proto/third_party/cosmwasm/wasm/v1/tx.proto delete mode 100644 ampd/proto/third_party/cosmwasm/wasm/v1/types.proto delete mode 100644 ampd/proto/third_party/gogoproto/gogo.proto delete mode 100644 ampd/proto/third_party/google/api/annotations.proto delete mode 100644 ampd/proto/third_party/google/api/http.proto delete mode 100644 ampd/proto/third_party/ibc/applications/transfer/v1/genesis.proto delete mode 100644 ampd/proto/third_party/ibc/applications/transfer/v1/query.proto delete mode 100644 ampd/proto/third_party/ibc/applications/transfer/v1/transfer.proto delete mode 100644 ampd/proto/third_party/ibc/applications/transfer/v1/tx.proto delete mode 100644 ampd/proto/third_party/ibc/applications/transfer/v2/packet.proto delete mode 100644 ampd/proto/third_party/ibc/core/channel/v1/channel.proto delete mode 100644 ampd/proto/third_party/ibc/core/channel/v1/genesis.proto delete mode 100644 ampd/proto/third_party/ibc/core/channel/v1/query.proto delete mode 100644 ampd/proto/third_party/ibc/core/channel/v1/tx.proto delete mode 100644 ampd/proto/third_party/ibc/core/client/v1/client.proto delete mode 100644 ampd/proto/third_party/ibc/core/client/v1/genesis.proto delete mode 100644 ampd/proto/third_party/ibc/core/client/v1/query.proto delete mode 100644 ampd/proto/third_party/ibc/core/client/v1/tx.proto delete mode 100644 ampd/proto/third_party/ibc/core/commitment/v1/commitment.proto delete mode 100644 ampd/proto/third_party/ibc/core/connection/v1/connection.proto delete mode 100644 ampd/proto/third_party/ibc/core/connection/v1/genesis.proto delete mode 100644 ampd/proto/third_party/ibc/core/connection/v1/query.proto delete mode 100644 ampd/proto/third_party/ibc/core/connection/v1/tx.proto delete mode 100644 ampd/proto/third_party/ibc/core/types/v1/genesis.proto delete mode 100644 ampd/proto/third_party/ibc/lightclients/localhost/v1/localhost.proto delete mode 100644 ampd/proto/third_party/ibc/lightclients/solomachine/v1/solomachine.proto delete mode 100644 ampd/proto/third_party/ibc/lightclients/solomachine/v2/solomachine.proto delete mode 100644 ampd/proto/third_party/ibc/lightclients/tendermint/v1/tendermint.proto delete mode 100644 ampd/proto/third_party/proofs.proto delete mode 100644 ampd/proto/third_party/tendermint/abci/types.proto delete mode 100644 ampd/proto/third_party/tendermint/crypto/keys.proto delete mode 100644 ampd/proto/third_party/tendermint/crypto/proof.proto delete mode 100644 ampd/proto/third_party/tendermint/libs/bits/types.proto delete mode 100644 ampd/proto/third_party/tendermint/p2p/types.proto delete mode 100644 ampd/proto/third_party/tendermint/types/block.proto delete mode 100644 ampd/proto/third_party/tendermint/types/evidence.proto delete mode 100644 ampd/proto/third_party/tendermint/types/params.proto delete mode 100644 ampd/proto/third_party/tendermint/types/types.proto delete mode 100644 ampd/proto/third_party/tendermint/types/validator.proto delete mode 100644 ampd/proto/third_party/tendermint/version/types.proto delete mode 100644 ampd/src/broadcaster/confirm_tx.rs delete mode 100644 ampd/src/queue/proto.rs diff --git a/ampd/build.rs b/ampd/build.rs index cd5acc3b9..7581fa013 100644 --- a/ampd/build.rs +++ b/ampd/build.rs @@ -8,13 +8,5 @@ fn main() -> Result<(), Box> { .build_client(true) .compile(&["proto/ampd.proto"], &["proto"])?; - tonic_build::configure() - .build_server(false) - .build_client(false) - .compile( - &["proto/axelar/auxiliary/v1beta1/tx.proto"], - &["proto", "proto/third_party"], - )?; - Ok(()) } diff --git a/ampd/proto/axelar/README.md b/ampd/proto/axelar/README.md deleted file mode 100644 index 519187b2b..000000000 --- a/ampd/proto/axelar/README.md +++ /dev/null @@ -1,11 +0,0 @@ -# Axelar Protobufs - -This folder defines protobufs used by Axelar specific Cosmos SDK msg, event, and query types. - -## REST API - -The REST API (LCD) gets generated automatically from the gRPC service definitions. -The request/response types are defined in `query.proto` for the respective modules, and the query is defined in the `service.proto`. - -Note: The request types cannot make use of custom types encoded as bytes as that would be awkward -for REST-based calls. Instead, primitive types such as string is used (for e.g. when specifying addresses, instead of using sdk.AccAddress). diff --git a/ampd/proto/axelar/auxiliary/v1beta1/events.proto b/ampd/proto/axelar/auxiliary/v1beta1/events.proto deleted file mode 100644 index 90956b702..000000000 --- a/ampd/proto/axelar/auxiliary/v1beta1/events.proto +++ /dev/null @@ -1,12 +0,0 @@ -syntax = "proto3"; -package axelar.auxiliary.v1beta1; - -option go_package = "github.com/axelarnetwork/axelar-core/x/auxiliary/types"; -option (gogoproto.messagename_all) = true; - -import "gogoproto/gogo.proto"; - -message BatchedMessageFailed { - int32 index = 1; - string error = 2; -} diff --git a/ampd/proto/axelar/auxiliary/v1beta1/genesis.proto b/ampd/proto/axelar/auxiliary/v1beta1/genesis.proto deleted file mode 100644 index 0d766e10f..000000000 --- a/ampd/proto/axelar/auxiliary/v1beta1/genesis.proto +++ /dev/null @@ -1,11 +0,0 @@ -syntax = "proto3"; -package axelar.auxiliary.v1beta1; - -option go_package = "github.com/axelarnetwork/axelar-core/x/auxiliary/types"; - -import "gogoproto/gogo.proto"; - -option (gogoproto.goproto_getters_all) = false; - -// GenesisState represents the genesis state -message GenesisState {} diff --git a/ampd/proto/axelar/auxiliary/v1beta1/service.proto b/ampd/proto/axelar/auxiliary/v1beta1/service.proto deleted file mode 100644 index 6d2a08e9b..000000000 --- a/ampd/proto/axelar/auxiliary/v1beta1/service.proto +++ /dev/null @@ -1,20 +0,0 @@ -syntax = "proto3"; -package axelar.auxiliary.v1beta1; - -option go_package = "github.com/axelarnetwork/axelar-core/x/auxiliary/types"; - -import "gogoproto/gogo.proto"; -import "google/api/annotations.proto"; -import "axelar/auxiliary/v1beta1/tx.proto"; - -option (gogoproto.goproto_registration) = true; - -// Msg defines the nexus Msg service. -service MsgService { - rpc Batch(BatchRequest) returns (BatchResponse) { - option (google.api.http) = { - post : "/axelar/auxiliary/batch" - body : "*" - }; - } -} diff --git a/ampd/proto/axelar/auxiliary/v1beta1/tx.proto b/ampd/proto/axelar/auxiliary/v1beta1/tx.proto deleted file mode 100644 index 065016da4..000000000 --- a/ampd/proto/axelar/auxiliary/v1beta1/tx.proto +++ /dev/null @@ -1,30 +0,0 @@ -syntax = "proto3"; -package axelar.auxiliary.v1beta1; - -import "google/protobuf/any.proto"; -import "gogoproto/gogo.proto"; - -import "axelar/permission/exported/v1beta1/types.proto"; -import "cosmos/base/abci/v1beta1/abci.proto"; -import "cosmos_proto/cosmos.proto"; - -option go_package = "github.com/axelarnetwork/axelar-core/x/auxiliary/types"; - -message BatchRequest { - option (permission.exported.v1beta1.permission_role) = ROLE_UNRESTRICTED; - - bytes sender = 1 [ (gogoproto.casttype) = - "github.com/cosmos/cosmos-sdk/types.AccAddress" ]; - repeated google.protobuf.Any messages = 2 - [ (gogoproto.nullable) = false, (cosmos_proto.accepts_interface) = "cosmos.base.v1beta1.Msg" ]; -} - -message BatchResponse { - message Response { - oneof res { - cosmos.base.abci.v1beta1.Result result = 1; - string err = 2; - } - } - repeated Response responses = 1 [ (gogoproto.nullable) = false ]; -} diff --git a/ampd/proto/axelar/axelarnet/v1beta1/events.proto b/ampd/proto/axelar/axelarnet/v1beta1/events.proto deleted file mode 100644 index a5e9e0a67..000000000 --- a/ampd/proto/axelar/axelarnet/v1beta1/events.proto +++ /dev/null @@ -1,131 +0,0 @@ -syntax = "proto3"; -package axelar.axelarnet.v1beta1; - -option go_package = "github.com/axelarnetwork/axelar-core/x/axelarnet/types"; - -import "gogoproto/gogo.proto"; -import "cosmos/base/v1beta1/coin.proto"; - -option (gogoproto.messagename_all) = true; - -message IBCTransferSent { - uint64 id = 1 [ - (gogoproto.customname) = "ID", - (gogoproto.casttype) = - "github.com/axelarnetwork/axelar-core/x/nexus/exported.TransferID" - ]; - string receipient = 2 [ deprecated = true ]; - cosmos.base.v1beta1.Coin asset = 3 [ (gogoproto.nullable) = false ]; - uint64 sequence = 4; - string port_id = 5 [ (gogoproto.customname) = "PortID" ]; - string channel_id = 6 [ (gogoproto.customname) = "ChannelID" ]; - string recipient = 7; -} - -message IBCTransferCompleted { - uint64 id = 1 [ - (gogoproto.customname) = "ID", - (gogoproto.casttype) = - "github.com/axelarnetwork/axelar-core/x/nexus/exported.TransferID" - ]; - uint64 sequence = 2; - string port_id = 3 [ (gogoproto.customname) = "PortID" ]; - string channel_id = 4 [ (gogoproto.customname) = "ChannelID" ]; -} - -message IBCTransferFailed { - uint64 id = 1 [ - (gogoproto.customname) = "ID", - (gogoproto.casttype) = - "github.com/axelarnetwork/axelar-core/x/nexus/exported.TransferID" - ]; - uint64 sequence = 2; - string port_id = 3 [ (gogoproto.customname) = "PortID" ]; - string channel_id = 4 [ (gogoproto.customname) = "ChannelID" ]; -} - -message IBCTransferRetried { - uint64 id = 1 [ - (gogoproto.customname) = "ID", - (gogoproto.casttype) = - "github.com/axelarnetwork/axelar-core/x/nexus/exported.TransferID" - ]; - string receipient = 2 [ deprecated = true ]; - cosmos.base.v1beta1.Coin asset = 3 [ (gogoproto.nullable) = false ]; - uint64 sequence = 4; - string port_id = 5 [ (gogoproto.customname) = "PortID" ]; - string channel_id = 6 [ (gogoproto.customname) = "ChannelID" ]; - string recipient = 7; -} - -message AxelarTransferCompleted { - uint64 id = 1 [ - (gogoproto.customname) = "ID", - (gogoproto.casttype) = - "github.com/axelarnetwork/axelar-core/x/nexus/exported.TransferID" - ]; - string receipient = 2 [ deprecated = true ]; - cosmos.base.v1beta1.Coin asset = 3 [ (gogoproto.nullable) = false ]; - string recipient = 4; -} - -message FeeCollected { - bytes collector = 1 [ (gogoproto.casttype) = - "github.com/cosmos/cosmos-sdk/types.AccAddress" ]; - cosmos.base.v1beta1.Coin fee = 2 [ (gogoproto.nullable) = false ]; -} - -message FeePaid { - string message_id = 1 [ (gogoproto.customname) = "MessageID" ]; - bytes recipient = 2 [ (gogoproto.casttype) = - "github.com/cosmos/cosmos-sdk/types.AccAddress" ]; - cosmos.base.v1beta1.Coin fee = 3 [ (gogoproto.nullable) = false ]; - string refund_recipient = 4; - string asset = 5; // registered asset name in nexus -} - -message ContractCallSubmitted { - string message_id = 1 [ (gogoproto.customname) = "MessageID" ]; - string sender = 2; - string source_chain = 3 - [ (gogoproto.casttype) = - "github.com/axelarnetwork/axelar-core/x/nexus/exported.ChainName" ]; - string destination_chain = 4 - [ (gogoproto.casttype) = - "github.com/axelarnetwork/axelar-core/x/nexus/exported.ChainName" ]; - string contract_address = 5; - bytes payload = 6; - bytes payload_hash = 7; -} - -message ContractCallWithTokenSubmitted { - string message_id = 1 [ (gogoproto.customname) = "MessageID" ]; - string sender = 2; - string source_chain = 3 - [ (gogoproto.casttype) = - "github.com/axelarnetwork/axelar-core/x/nexus/exported.ChainName" ]; - string destination_chain = 4 - [ (gogoproto.casttype) = - "github.com/axelarnetwork/axelar-core/x/nexus/exported.ChainName" ]; - string contract_address = 5; - bytes payload = 6; - bytes payload_hash = 7; - cosmos.base.v1beta1.Coin asset = 8 [ (gogoproto.nullable) = false ]; -} - -message TokenSent { - uint64 transfer_id = 1 [ - (gogoproto.customname) = "TransferID", - (gogoproto.casttype) = - "github.com/axelarnetwork/axelar-core/x/nexus/exported.TransferID" - ]; - string sender = 2; - string source_chain = 3 - [ (gogoproto.casttype) = - "github.com/axelarnetwork/axelar-core/x/nexus/exported.ChainName" ]; - string destination_chain = 4 - [ (gogoproto.casttype) = - "github.com/axelarnetwork/axelar-core/x/nexus/exported.ChainName" ]; - string destination_address = 5; - cosmos.base.v1beta1.Coin asset = 6 [ (gogoproto.nullable) = false ]; -} diff --git a/ampd/proto/axelar/axelarnet/v1beta1/genesis.proto b/ampd/proto/axelar/axelarnet/v1beta1/genesis.proto deleted file mode 100644 index 8cfea9cd5..000000000 --- a/ampd/proto/axelar/axelarnet/v1beta1/genesis.proto +++ /dev/null @@ -1,27 +0,0 @@ -syntax = "proto3"; -package axelar.axelarnet.v1beta1; -option go_package = "github.com/axelarnetwork/axelar-core/x/axelarnet/types"; - -import "gogoproto/gogo.proto"; -import "axelar/axelarnet/v1beta1/params.proto"; -import "axelar/axelarnet/v1beta1/types.proto"; -import "axelar/utils/v1beta1/queuer.proto"; - -option (gogoproto.goproto_getters_all) = false; - -message GenesisState { - option (gogoproto.stable_marshaler) = true; - - Params params = 1 [ (gogoproto.nullable) = false ]; - bytes collector_address = 2 - [ (gogoproto.casttype) = - "github.com/cosmos/cosmos-sdk/types.AccAddress" ]; - repeated CosmosChain chains = 3 [ (gogoproto.nullable) = false ]; - reserved 4; // pending_transfers was removed in v0.20 - utils.v1beta1.QueueState transfer_queue = 5 [ (gogoproto.nullable) = false ]; - reserved 6; // failed_transfers was removed in v0.22 - repeated IBCTransfer ibc_transfers = 7 - [ (gogoproto.nullable) = false, (gogoproto.customname) = "IBCTransfers" ]; - map seq_id_mapping = 8 - [ (gogoproto.nullable) = false, (gogoproto.customname) = "SeqIDMapping" ]; -} diff --git a/ampd/proto/axelar/axelarnet/v1beta1/params.proto b/ampd/proto/axelar/axelarnet/v1beta1/params.proto deleted file mode 100644 index 5d669fbc6..000000000 --- a/ampd/proto/axelar/axelarnet/v1beta1/params.proto +++ /dev/null @@ -1,33 +0,0 @@ -syntax = "proto3"; -package axelar.axelarnet.v1beta1; -option go_package = "github.com/axelarnetwork/axelar-core/x/axelarnet/types"; - -import "gogoproto/gogo.proto"; -import "cosmos/base/v1beta1/coin.proto"; - -option (gogoproto.goproto_getters_all) = false; - -// Params represent the genesis parameters for the module -message Params { - // IBC packet route timeout window - uint64 route_timeout_window = 1; - reserved 2; // transaction_fee_rate was removed in v0.15 - uint64 transfer_limit = 3; - uint64 end_blocker_limit = 4; - repeated CallContractProposalMinDeposit call_contracts_proposal_min_deposits = - 5 [ - (gogoproto.castrepeated) = "CallContractProposalMinDeposits", - (gogoproto.nullable) = false - ]; -} - -message CallContractProposalMinDeposit { - string chain = 1 - [ (gogoproto.casttype) = - "github.com/axelarnetwork/axelar-core/x/nexus/exported.ChainName" ]; - string contract_address = 2; - repeated cosmos.base.v1beta1.Coin min_deposits = 3 [ - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", - (gogoproto.nullable) = false - ]; -} diff --git a/ampd/proto/axelar/axelarnet/v1beta1/proposal.proto b/ampd/proto/axelar/axelarnet/v1beta1/proposal.proto deleted file mode 100644 index 2994ca8c8..000000000 --- a/ampd/proto/axelar/axelarnet/v1beta1/proposal.proto +++ /dev/null @@ -1,29 +0,0 @@ -syntax = "proto3"; - -package axelar.axelarnet.v1beta1; - -import "gogoproto/gogo.proto"; -import "axelar/nexus/exported/v1beta1/types.proto"; - -option go_package = "github.com/axelarnetwork/axelar-core/x/axelarnet/types"; -option (gogoproto.goproto_getters_all) = false; - -// CallContractsProposal is a gov Content type for calling contracts on other -// chains -message CallContractsProposal { - option (gogoproto.goproto_stringer) = false; - - string title = 1; - string description = 2; - repeated ContractCall contract_calls = 3 [ (gogoproto.nullable) = false ]; -} - -message ContractCall { - option (gogoproto.goproto_stringer) = false; - - string chain = 1 - [ (gogoproto.casttype) = - "github.com/axelarnetwork/axelar-core/x/nexus/exported.ChainName" ]; - string contract_address = 2; - bytes payload = 3; -} diff --git a/ampd/proto/axelar/axelarnet/v1beta1/query.proto b/ampd/proto/axelar/axelarnet/v1beta1/query.proto deleted file mode 100644 index 64fc7088d..000000000 --- a/ampd/proto/axelar/axelarnet/v1beta1/query.proto +++ /dev/null @@ -1,39 +0,0 @@ -syntax = "proto3"; -package axelar.axelarnet.v1beta1; - -option go_package = "github.com/axelarnetwork/axelar-core/x/axelarnet/types"; - -import "gogoproto/gogo.proto"; -import "axelar/axelarnet/v1beta1/types.proto"; -import "cosmos/base/query/v1beta1/pagination.proto"; -import "axelar/nexus/v1beta1/query.proto"; -import "axelar/axelarnet/v1beta1/params.proto"; - -option (gogoproto.goproto_getters_all) = false; - -message PendingIBCTransferCountRequest {} - -message PendingIBCTransferCountResponse { - map transfers_by_chain = 1 [ (gogoproto.nullable) = false ]; -} - -// ParamsRequest represents a message that queries the params -message ParamsRequest {} - -message ParamsResponse { Params params = 1 [ (gogoproto.nullable) = false ]; } - -// IBCPathRequest represents a message that queries the IBC path registered for -// a given chain -message IBCPathRequest { string chain = 1; } - -message IBCPathResponse { string ibc_path = 1 [ (gogoproto.customname) = "IBCPath" ]; } - -// ChainByIBCPathRequest represents a message that queries the chain that an IBC -// path is registered to -message ChainByIBCPathRequest { string ibc_path = 1; } - -message ChainByIBCPathResponse { - string chain = 1 - [ (gogoproto.casttype) = - "github.com/axelarnetwork/axelar-core/x/nexus/exported.ChainName" ]; -} diff --git a/ampd/proto/axelar/axelarnet/v1beta1/service.proto b/ampd/proto/axelar/axelarnet/v1beta1/service.proto deleted file mode 100644 index c2ed583e8..000000000 --- a/ampd/proto/axelar/axelarnet/v1beta1/service.proto +++ /dev/null @@ -1,118 +0,0 @@ -syntax = "proto3"; -package axelar.axelarnet.v1beta1; - -option go_package = "github.com/axelarnetwork/axelar-core/x/axelarnet/types"; - -import "gogoproto/gogo.proto"; -import "google/api/annotations.proto"; -import "axelar/axelarnet/v1beta1/tx.proto"; -import "axelar/axelarnet/v1beta1/query.proto"; - -option (gogoproto.goproto_registration) = true; - -// Msg defines the axelarnet Msg service. -service MsgService { - rpc Link(LinkRequest) returns (LinkResponse) { - option (google.api.http) = { - post : "/axelar/axelarnet/link" - body : "*" - }; - } - - rpc ConfirmDeposit(ConfirmDepositRequest) returns (ConfirmDepositResponse) { - option (google.api.http) = { - post : "/axelar/axelarnet/confirm_deposit" - body : "*" - }; - } - - rpc ExecutePendingTransfers(ExecutePendingTransfersRequest) - returns (ExecutePendingTransfersResponse) { - option (google.api.http) = { - post : "/axelar/axelarnet/execute_pending_transfers" - body : "*" - }; - } - - rpc AddCosmosBasedChain(AddCosmosBasedChainRequest) - returns (AddCosmosBasedChainResponse) { - option (google.api.http) = { - post : "/axelar/axelarnet/add_cosmos_based_chain" - body : "*" - }; - } - - rpc RegisterAsset(RegisterAssetRequest) returns (RegisterAssetResponse) { - option (google.api.http) = { - post : "/axelar/axelarnet/register_asset" - body : "*" - }; - } - - rpc RouteIBCTransfers(RouteIBCTransfersRequest) - returns (RouteIBCTransfersResponse) { - option (google.api.http) = { - post : "/axelar/axelarnet/route_ibc_transfers" - body : "*" - }; - } - - rpc RegisterFeeCollector(RegisterFeeCollectorRequest) - returns (RegisterFeeCollectorResponse) { - option (google.api.http) = { - post : "/axelar/axelarnet/register_fee_collector" - body : "*" - }; - } - - rpc RetryIBCTransfer(RetryIBCTransferRequest) - returns (RetryIBCTransferResponse) { - option (google.api.http) = { - post : "/axelar/axelarnet/retry_ibc_transfer" - body : "*" - }; - } - - rpc RouteMessage(RouteMessageRequest) returns (RouteMessageResponse) { - option (google.api.http) = { - post : "/axelar/axelarnet/route_message" - body : "*" - }; - } - - rpc CallContract(CallContractRequest) returns (CallContractResponse) { - option (google.api.http) = { - post : "/axelar/axelarnet/call_contract" - body : "*" - }; - } -} - -// QueryService defines the gRPC querier service. -service QueryService { - - // PendingIBCTransferCount queries the pending ibc transfers for all chains - rpc PendingIBCTransferCount(PendingIBCTransferCountRequest) - returns (PendingIBCTransferCountResponse) { - option (google.api.http).get = - "/axelar/axelarnet/v1beta1/ibc_transfer_count"; - } - - rpc Params(ParamsRequest) returns (ParamsResponse) { - option (google.api.http) = { - get : "/axelar/axelarnet/v1beta1/params" - }; - } - - rpc IBCPath(IBCPathRequest) returns (IBCPathResponse) { - option (google.api.http) = { - get : "/axelar/axelarnet/v1beta1/ibc_path/{chain}" - }; - } - - rpc ChainByIBCPath(ChainByIBCPathRequest) returns (ChainByIBCPathResponse) { - option (google.api.http) = { - get : "/axelar/axelarnet/v1beta1/chain_by_ibc_path/{ibc_path}" - }; - } -} diff --git a/ampd/proto/axelar/axelarnet/v1beta1/tx.proto b/ampd/proto/axelar/axelarnet/v1beta1/tx.proto deleted file mode 100644 index 95c5e5c7c..000000000 --- a/ampd/proto/axelar/axelarnet/v1beta1/tx.proto +++ /dev/null @@ -1,188 +0,0 @@ -syntax = "proto3"; -package axelar.axelarnet.v1beta1; - -option go_package = "github.com/axelarnetwork/axelar-core/x/axelarnet/types"; - -import "google/protobuf/any.proto"; -import "google/protobuf/duration.proto"; -import "gogoproto/gogo.proto"; -import "cosmos/base/v1beta1/coin.proto"; -import "cosmos_proto/cosmos.proto"; -import "axelar/nexus/exported/v1beta1/types.proto"; -import "axelar/axelarnet/v1beta1/types.proto"; -import "axelar/permission/exported/v1beta1/types.proto"; - -option (gogoproto.goproto_getters_all) = false; - -// MsgLink represents a message to link a cross-chain address to an Axelar -// address -message LinkRequest { - option (permission.exported.v1beta1.permission_role) = ROLE_UNRESTRICTED; - bytes sender = 1 [ (gogoproto.casttype) = - "github.com/cosmos/cosmos-sdk/types.AccAddress" ]; - string recipient_addr = 2; - string recipient_chain = 3 - [ (gogoproto.casttype) = - "github.com/axelarnetwork/axelar-core/x/nexus/exported.ChainName" ]; - string asset = 4; -} - -message LinkResponse { string deposit_addr = 1; }; - -// MsgConfirmDeposit represents a deposit confirmation message -message ConfirmDepositRequest { - option (permission.exported.v1beta1.permission_role) = ROLE_UNRESTRICTED; - bytes sender = 1 [ (gogoproto.casttype) = - "github.com/cosmos/cosmos-sdk/types.AccAddress" ]; - - reserved 2; // tx_id was removed in v0.14 - - reserved 3; // token was removed in v0.15 - - bytes deposit_address = 4 - [ (gogoproto.casttype) = - "github.com/cosmos/cosmos-sdk/types.AccAddress" ]; - - string denom = 5; -} - -message ConfirmDepositResponse {} - -// MsgExecutePendingTransfers represents a message to trigger transfer all -// pending transfers -message ExecutePendingTransfersRequest { - option (permission.exported.v1beta1.permission_role) = ROLE_UNRESTRICTED; - bytes sender = 1 [ (gogoproto.casttype) = - "github.com/cosmos/cosmos-sdk/types.AccAddress" ]; -} - -message ExecutePendingTransfersResponse {} - -// MSgRegisterIBCPath represents a message to register an IBC tracing path for -// a cosmos chain -message RegisterIBCPathRequest { - option deprecated = true; - - option (permission.exported.v1beta1.permission_role) = ROLE_CHAIN_MANAGEMENT; - bytes sender = 1 [ (gogoproto.casttype) = - "github.com/cosmos/cosmos-sdk/types.AccAddress" ]; - string chain = 2 - [ (gogoproto.casttype) = - "github.com/axelarnetwork/axelar-core/x/nexus/exported.ChainName" ]; - string path = 3; -} - -message RegisterIBCPathResponse {} - -// MsgAddCosmosBasedChain represents a message to register a cosmos based chain -// to nexus -message AddCosmosBasedChainRequest { - option (permission.exported.v1beta1.permission_role) = ROLE_ACCESS_CONTROL; - bytes sender = 1 [ (gogoproto.casttype) = - "github.com/cosmos/cosmos-sdk/types.AccAddress" ]; - nexus.exported.v1beta1.Chain chain = 2 [ - deprecated = true, - (gogoproto.nullable) = false - ]; // chain was deprecated in v0.27 - string addr_prefix = 3; - reserved 4; // min_amount was removed in v0.15 - repeated nexus.exported.v1beta1.Asset native_assets = 5 [ - deprecated = true, - (gogoproto.nullable) = false - ]; // native_assets was deprecated in v0.27 - // TODO: Rename this to `chain` after v1beta1 -> v1 version bump - string cosmos_chain = 6 - [ (gogoproto.casttype) = - "github.com/axelarnetwork/axelar-core/x/nexus/exported.ChainName" ]; - string ibc_path = 7 [ (gogoproto.customname) = "IBCPath" ]; -} - -message AddCosmosBasedChainResponse {} - -// RegisterAssetRequest represents a message to register an asset to a cosmos -// based chain -message RegisterAssetRequest { - option (permission.exported.v1beta1.permission_role) = ROLE_CHAIN_MANAGEMENT; - bytes sender = 1 [ (gogoproto.casttype) = - "github.com/cosmos/cosmos-sdk/types.AccAddress" ]; - string chain = 2 - [ (gogoproto.casttype) = - "github.com/axelarnetwork/axelar-core/x/nexus/exported.ChainName" ]; - nexus.exported.v1beta1.Asset asset = 3 [ (gogoproto.nullable) = false ]; - bytes limit = 4 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Uint", - (gogoproto.nullable) = false - ]; - google.protobuf.Duration window = 5 - [ (gogoproto.stdduration) = true, (gogoproto.nullable) = false ]; -} - -message RegisterAssetResponse {} - -// RouteIBCTransfersRequest represents a message to route pending transfers to -// cosmos based chains -message RouteIBCTransfersRequest { - option (permission.exported.v1beta1.permission_role) = ROLE_UNRESTRICTED; - bytes sender = 1 [ (gogoproto.casttype) = - "github.com/cosmos/cosmos-sdk/types.AccAddress" ]; -} - -message RouteIBCTransfersResponse {} - -// RegisterFeeCollectorRequest represents a message to register axelarnet fee -// collector account -message RegisterFeeCollectorRequest { - option (permission.exported.v1beta1.permission_role) = ROLE_ACCESS_CONTROL; - bytes sender = 1 [ (gogoproto.casttype) = - "github.com/cosmos/cosmos-sdk/types.AccAddress" ]; - bytes fee_collector = 2 - [ (gogoproto.casttype) = - "github.com/cosmos/cosmos-sdk/types.AccAddress" ]; -} - -message RegisterFeeCollectorResponse {} - -message RetryIBCTransferRequest { - option (permission.exported.v1beta1.permission_role) = ROLE_UNRESTRICTED; - bytes sender = 1 [ (gogoproto.casttype) = - "github.com/cosmos/cosmos-sdk/types.AccAddress" ]; - string chain = 2 [ - (gogoproto.casttype) = - "github.com/axelarnetwork/axelar-core/x/nexus/exported.ChainName", - deprecated = true - ]; - uint64 id = 3 [ - (gogoproto.customname) = "ID", - (gogoproto.casttype) = - "github.com/axelarnetwork/axelar-core/x/nexus/exported.TransferID" - ]; -} - -message RetryIBCTransferResponse {} - -message RouteMessageRequest { - option (permission.exported.v1beta1.permission_role) = ROLE_UNRESTRICTED; - bytes sender = 1 [ (gogoproto.casttype) = - "github.com/cosmos/cosmos-sdk/types.AccAddress" ]; - string id = 2 [ (gogoproto.customname) = "ID" ]; - bytes payload = 3; - bytes feegranter = 4 [ (gogoproto.casttype) = - "github.com/cosmos/cosmos-sdk/types.AccAddress" ]; -} - -message RouteMessageResponse {} - -message CallContractRequest { - option (permission.exported.v1beta1.permission_role) = ROLE_UNRESTRICTED; - - bytes sender = 1 [ (gogoproto.casttype) = - "github.com/cosmos/cosmos-sdk/types.AccAddress" ]; - string chain = 2 - [ (gogoproto.casttype) = - "github.com/axelarnetwork/axelar-core/x/nexus/exported.ChainName" ]; - string contract_address = 3; - bytes payload = 4; - Fee fee = 5; -} - -message CallContractResponse {} diff --git a/ampd/proto/axelar/axelarnet/v1beta1/types.proto b/ampd/proto/axelar/axelarnet/v1beta1/types.proto deleted file mode 100644 index b20ae2799..000000000 --- a/ampd/proto/axelar/axelarnet/v1beta1/types.proto +++ /dev/null @@ -1,62 +0,0 @@ -syntax = "proto3"; -package axelar.axelarnet.v1beta1; - -option go_package = "github.com/axelarnetwork/axelar-core/x/axelarnet/types"; -import "gogoproto/gogo.proto"; -import "cosmos/base/v1beta1/coin.proto"; - -option (gogoproto.goproto_getters_all) = false; - -message IBCTransfer { - enum Status { - option (gogoproto.goproto_enum_prefix) = false; - option (gogoproto.goproto_enum_stringer) = true; - - STATUS_UNSPECIFIED = 0 - [ (gogoproto.enumvalue_customname) = "TransferNonExistent" ]; - STATUS_PENDING = 1 [ (gogoproto.enumvalue_customname) = "TransferPending" ]; - STATUS_COMPLETED = 2 - [ (gogoproto.enumvalue_customname) = "TransferCompleted" ]; - STATUS_FAILED = 3 [ (gogoproto.enumvalue_customname) = "TransferFailed" ]; - } - bytes sender = 1 [ (gogoproto.casttype) = - "github.com/cosmos/cosmos-sdk/types.AccAddress" ]; - string receiver = 2; - cosmos.base.v1beta1.Coin token = 3 [ (gogoproto.nullable) = false ]; - string port_id = 4 [ (gogoproto.customname) = "PortID" ]; - string channel_id = 5 [ (gogoproto.customname) = "ChannelID" ]; - uint64 sequence = 6 [ deprecated = true ]; - uint64 id = 7 [ - (gogoproto.customname) = "ID", - (gogoproto.casttype) = - "github.com/axelarnetwork/axelar-core/x/nexus/exported.TransferID" - ]; - Status status = 8; -} - -message CosmosChain { - string name = 1 - [ (gogoproto.casttype) = - "github.com/axelarnetwork/axelar-core/x/nexus/exported.ChainName" ]; - string ibc_path = 2 [ (gogoproto.customname) = "IBCPath" ]; - repeated Asset assets = 3 [ (gogoproto.nullable) = false, deprecated = true ]; - string addr_prefix = 4; -} - -message Asset { - option deprecated = true; - string denom = 1; - bytes min_amount = 2 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.nullable) = false - ]; -} - -message Fee { - cosmos.base.v1beta1.Coin amount = 1 [ (gogoproto.nullable) = false ]; - bytes recipient = 2 [ (gogoproto.casttype) = - "github.com/cosmos/cosmos-sdk/types.AccAddress" ]; - bytes refund_recipient = 3 - [ (gogoproto.casttype) = - "github.com/cosmos/cosmos-sdk/types.AccAddress" ]; -} diff --git a/ampd/proto/axelar/evm/v1beta1/events.proto b/ampd/proto/axelar/evm/v1beta1/events.proto deleted file mode 100644 index bcdd74e99..000000000 --- a/ampd/proto/axelar/evm/v1beta1/events.proto +++ /dev/null @@ -1,340 +0,0 @@ -syntax = "proto3"; -package axelar.evm.v1beta1; - -option go_package = "github.com/axelarnetwork/axelar-core/x/evm/types"; -option (gogoproto.messagename_all) = true; - -import "gogoproto/gogo.proto"; -import "axelar/vote/exported/v1beta1/types.proto"; -import "axelar/evm/v1beta1/types.proto"; -import "cosmos/base/v1beta1/coin.proto"; - -message PollFailed { - bytes tx_id = 1 [ - (gogoproto.nullable) = false, - (gogoproto.customtype) = "Hash", - (gogoproto.customname) = "TxID" - ]; - string chain = 2 - [ (gogoproto.casttype) = - "github.com/axelarnetwork/axelar-core/x/nexus/exported.ChainName" ]; - uint64 poll_id = 3 [ - (gogoproto.customname) = "PollID", - (gogoproto.customtype) = - "github.com/axelarnetwork/axelar-core/x/vote/exported.PollID", - (gogoproto.nullable) = false - ]; -} - -message PollExpired { - bytes tx_id = 1 [ - (gogoproto.nullable) = false, - (gogoproto.customtype) = "Hash", - (gogoproto.customname) = "TxID" - ]; - string chain = 2 - [ (gogoproto.casttype) = - "github.com/axelarnetwork/axelar-core/x/nexus/exported.ChainName" ]; - uint64 poll_id = 3 [ - (gogoproto.customname) = "PollID", - (gogoproto.customtype) = - "github.com/axelarnetwork/axelar-core/x/vote/exported.PollID", - (gogoproto.nullable) = false - ]; -} - -message PollCompleted { - bytes tx_id = 1 [ - (gogoproto.nullable) = false, - (gogoproto.customtype) = "Hash", - (gogoproto.customname) = "TxID" - ]; - string chain = 2 - [ (gogoproto.casttype) = - "github.com/axelarnetwork/axelar-core/x/nexus/exported.ChainName" ]; - uint64 poll_id = 3 [ - (gogoproto.customname) = "PollID", - (gogoproto.customtype) = - "github.com/axelarnetwork/axelar-core/x/vote/exported.PollID", - (gogoproto.nullable) = false - ]; -} - -message NoEventsConfirmed { - bytes tx_id = 1 [ - (gogoproto.nullable) = false, - (gogoproto.customtype) = "Hash", - (gogoproto.customname) = "TxID" - ]; - string chain = 2 - [ (gogoproto.casttype) = - "github.com/axelarnetwork/axelar-core/x/nexus/exported.ChainName" ]; - uint64 poll_id = 3 [ - (gogoproto.customname) = "PollID", - (gogoproto.customtype) = - "github.com/axelarnetwork/axelar-core/x/vote/exported.PollID", - (gogoproto.nullable) = false - ]; -} - -message ConfirmKeyTransferStarted { - string chain = 1 - [ (gogoproto.casttype) = - "github.com/axelarnetwork/axelar-core/x/nexus/exported.ChainName" ]; - bytes tx_id = 2 [ - (gogoproto.nullable) = false, - (gogoproto.customtype) = "Hash", - (gogoproto.customname) = "TxID" - ]; - bytes gateway_address = 3 - [ (gogoproto.nullable) = false, (gogoproto.customtype) = "Address" ]; - uint64 confirmation_height = 4; - vote.exported.v1beta1.PollParticipants participants = 5 - [ (gogoproto.nullable) = false, (gogoproto.embed) = true ]; -} - -message ConfirmGatewayTxStarted { - option deprecated = true; - - bytes tx_id = 1 [ - (gogoproto.nullable) = false, - (gogoproto.customtype) = "Hash", - (gogoproto.customname) = "TxID" - ]; - string chain = 2 - [ (gogoproto.casttype) = - "github.com/axelarnetwork/axelar-core/x/nexus/exported.ChainName" ]; - bytes gateway_address = 3 - [ (gogoproto.nullable) = false, (gogoproto.customtype) = "Address" ]; - uint64 confirmation_height = 4; - vote.exported.v1beta1.PollParticipants participants = 5 - [ (gogoproto.nullable) = false, (gogoproto.embed) = true ]; -} - -message PollMapping { - bytes tx_id = 1 [ - (gogoproto.nullable) = false, - (gogoproto.customtype) = "Hash", - (gogoproto.customname) = "TxID" - ]; - uint64 poll_id = 2 [ - (gogoproto.nullable) = false, - (gogoproto.customname) = "PollID", - (gogoproto.customtype) = - "github.com/axelarnetwork/axelar-core/x/vote/exported.PollID" - ]; -} - -message ConfirmGatewayTxsStarted { - repeated PollMapping poll_mappings = 1 [ - (gogoproto.nullable) = false, - (gogoproto.jsontag) = "poll_mappings,omitempty" - ]; - string chain = 2 - [ (gogoproto.casttype) = - "github.com/axelarnetwork/axelar-core/x/nexus/exported.ChainName" ]; - bytes gateway_address = 3 - [ (gogoproto.nullable) = false, (gogoproto.customtype) = "Address" ]; - uint64 confirmation_height = 4; - repeated bytes participants = 5 - [ (gogoproto.casttype) = - "github.com/cosmos/cosmos-sdk/types.ValAddress" ]; -} - -message ConfirmDepositStarted { - bytes tx_id = 1 [ - (gogoproto.nullable) = false, - (gogoproto.customtype) = "Hash", - (gogoproto.customname) = "TxID" - ]; - string chain = 2 - [ (gogoproto.casttype) = - "github.com/axelarnetwork/axelar-core/x/nexus/exported.ChainName" ]; - bytes deposit_address = 3 - [ (gogoproto.nullable) = false, (gogoproto.customtype) = "Address" ]; - bytes token_address = 4 - [ (gogoproto.nullable) = false, (gogoproto.customtype) = "Address" ]; - uint64 confirmation_height = 5; - vote.exported.v1beta1.PollParticipants participants = 6 - [ (gogoproto.nullable) = false, (gogoproto.embed) = true ]; - string asset = 7; -} - -message ConfirmTokenStarted { - bytes tx_id = 1 [ - (gogoproto.nullable) = false, - (gogoproto.customtype) = "Hash", - (gogoproto.customname) = "TxID" - ]; - string chain = 2 - [ (gogoproto.casttype) = - "github.com/axelarnetwork/axelar-core/x/nexus/exported.ChainName" ]; - bytes gateway_address = 3 - [ (gogoproto.nullable) = false, (gogoproto.customtype) = "Address" ]; - bytes token_address = 4 - [ (gogoproto.nullable) = false, (gogoproto.customtype) = "Address" ]; - evm.v1beta1.TokenDetails token_details = 5 [ (gogoproto.nullable) = false ]; - uint64 confirmation_height = 6; - vote.exported.v1beta1.PollParticipants participants = 7 - [ (gogoproto.nullable) = false, (gogoproto.embed) = true ]; -} - -message ChainAdded { - string chain = 1 - [ (gogoproto.casttype) = - "github.com/axelarnetwork/axelar-core/x/nexus/exported.ChainName" ]; -} - -message CommandBatchSigned { - string chain = 2 - [ (gogoproto.casttype) = - "github.com/axelarnetwork/axelar-core/x/nexus/exported.ChainName" ]; - bytes command_batch_id = 3 [ (gogoproto.customname) = "CommandBatchID" ]; -} - -message CommandBatchAborted { - string chain = 2 - [ (gogoproto.casttype) = - "github.com/axelarnetwork/axelar-core/x/nexus/exported.ChainName" ]; - bytes command_batch_id = 3 [ (gogoproto.customname) = "CommandBatchID" ]; -} - -message EVMEventConfirmed { - string chain = 1 - [ (gogoproto.casttype) = - "github.com/axelarnetwork/axelar-core/x/nexus/exported.ChainName" ]; - string event_id = 2 - [ (gogoproto.customname) = "EventID", (gogoproto.casttype) = "EventID" ]; - string type = 3; -} - -message EVMEventCompleted { - string chain = 1 - [ (gogoproto.casttype) = - "github.com/axelarnetwork/axelar-core/x/nexus/exported.ChainName" ]; - string event_id = 2 - [ (gogoproto.customname) = "EventID", (gogoproto.casttype) = "EventID" ]; - string type = 3; -} - -message EVMEventFailed { - string chain = 1 - [ (gogoproto.casttype) = - "github.com/axelarnetwork/axelar-core/x/nexus/exported.ChainName" ]; - string event_id = 2 - [ (gogoproto.customname) = "EventID", (gogoproto.casttype) = "EventID" ]; - string type = 3; -} - -message EVMEventRetryFailed { - string chain = 1 - [ (gogoproto.casttype) = - "github.com/axelarnetwork/axelar-core/x/nexus/exported.ChainName" ]; - string event_id = 2 - [ (gogoproto.customname) = "EventID", (gogoproto.casttype) = "EventID" ]; - string type = 3; -} - -message ContractCallApproved { - string chain = 1 - [ (gogoproto.casttype) = - "github.com/axelarnetwork/axelar-core/x/nexus/exported.ChainName" ]; - string event_id = 2 - [ (gogoproto.customname) = "EventID", (gogoproto.casttype) = "EventID" ]; - bytes command_id = 3 [ - (gogoproto.nullable) = false, - (gogoproto.customname) = "CommandID", - (gogoproto.customtype) = "CommandID" - ]; - string sender = 4; - string destination_chain = 5 - [ (gogoproto.casttype) = - "github.com/axelarnetwork/axelar-core/x/nexus/exported.ChainName" ]; - string contract_address = 6; - bytes payload_hash = 7 - [ (gogoproto.nullable) = false, (gogoproto.customtype) = "Hash" ]; -} - -message ContractCallFailed { - string chain = 1 - [ (gogoproto.casttype) = - "github.com/axelarnetwork/axelar-core/x/nexus/exported.ChainName" ]; - string msg_id = 2 [ (gogoproto.customname) = "MessageID" ]; -} - -message ContractCallWithMintApproved { - string chain = 1 - [ (gogoproto.casttype) = - "github.com/axelarnetwork/axelar-core/x/nexus/exported.ChainName" ]; - string event_id = 2 - [ (gogoproto.customname) = "EventID", (gogoproto.casttype) = "EventID" ]; - bytes command_id = 3 [ - (gogoproto.nullable) = false, - (gogoproto.customname) = "CommandID", - (gogoproto.customtype) = "CommandID" - ]; - string sender = 4; - string destination_chain = 5 - [ (gogoproto.casttype) = - "github.com/axelarnetwork/axelar-core/x/nexus/exported.ChainName" ]; - string contract_address = 6; - bytes payload_hash = 7 - [ (gogoproto.nullable) = false, (gogoproto.customtype) = "Hash" ]; - cosmos.base.v1beta1.Coin asset = 8 [ (gogoproto.nullable) = false ]; -} - -message TokenSent { - string chain = 1 - [ (gogoproto.casttype) = - "github.com/axelarnetwork/axelar-core/x/nexus/exported.ChainName" ]; - string event_id = 2 - [ (gogoproto.customname) = "EventID", (gogoproto.casttype) = "EventID" ]; - uint64 transfer_id = 3 [ - (gogoproto.customname) = "TransferID", - (gogoproto.casttype) = - "github.com/axelarnetwork/axelar-core/x/nexus/exported.TransferID" - ]; - string sender = 4; - string destination_chain = 5 - [ (gogoproto.casttype) = - "github.com/axelarnetwork/axelar-core/x/nexus/exported.ChainName" ]; - string destination_address = 6; - cosmos.base.v1beta1.Coin asset = 7 [ (gogoproto.nullable) = false ]; -} - -message MintCommand { - string chain = 1 - [ (gogoproto.casttype) = - "github.com/axelarnetwork/axelar-core/x/nexus/exported.ChainName" ]; - uint64 transfer_id = 2 [ - (gogoproto.customname) = "TransferID", - (gogoproto.casttype) = - "github.com/axelarnetwork/axelar-core/x/nexus/exported.TransferID" - ]; - bytes command_id = 3 [ - (gogoproto.nullable) = false, - (gogoproto.customname) = "CommandID", - (gogoproto.customtype) = "CommandID" - ]; - string destination_chain = 4 - [ (gogoproto.casttype) = - "github.com/axelarnetwork/axelar-core/x/nexus/exported.ChainName" ]; - string destination_address = 5; - cosmos.base.v1beta1.Coin asset = 6 [ (gogoproto.nullable) = false ]; -} - -message BurnCommand { - string chain = 1 - [ (gogoproto.casttype) = - "github.com/axelarnetwork/axelar-core/x/nexus/exported.ChainName" ]; - bytes command_id = 2 [ - (gogoproto.nullable) = false, - (gogoproto.customname) = "CommandID", - (gogoproto.customtype) = "CommandID" - ]; - string destination_chain = 3 - [ (gogoproto.casttype) = - "github.com/axelarnetwork/axelar-core/x/nexus/exported.ChainName" ]; - string deposit_address = 4; - string asset = 5; -} diff --git a/ampd/proto/axelar/evm/v1beta1/genesis.proto b/ampd/proto/axelar/evm/v1beta1/genesis.proto deleted file mode 100644 index 3e0edc463..000000000 --- a/ampd/proto/axelar/evm/v1beta1/genesis.proto +++ /dev/null @@ -1,39 +0,0 @@ -syntax = "proto3"; -package axelar.evm.v1beta1; -option go_package = "github.com/axelarnetwork/axelar-core/x/evm/types"; - -import "axelar/utils/v1beta1/queuer.proto"; -import "gogoproto/gogo.proto"; -import "axelar/evm/v1beta1/params.proto"; -import "axelar/evm/v1beta1/types.proto"; - -option (gogoproto.goproto_getters_all) = false; - -// GenesisState represents the genesis state -message GenesisState { - option (gogoproto.stable_marshaler) = true; - - message Chain { - Params params = 1 [ (gogoproto.nullable) = false ]; - repeated BurnerInfo burner_infos = 2 [ (gogoproto.nullable) = false ]; - utils.v1beta1.QueueState command_queue = 3 [ (gogoproto.nullable) = false ]; - repeated ERC20Deposit confirmed_deposits = 4 - [ (gogoproto.nullable) = false ]; - repeated ERC20Deposit burned_deposits = 5 [ (gogoproto.nullable) = false ]; - - repeated CommandBatchMetadata command_batches = 8 - [ (gogoproto.nullable) = false ]; - - Gateway gateway = 9 [ (gogoproto.nullable) = false ]; - repeated ERC20TokenMetadata tokens = 10 [ (gogoproto.nullable) = false ]; - repeated Event events = 11 [ (gogoproto.nullable) = false ]; - utils.v1beta1.QueueState confirmed_event_queue = 12 - [ (gogoproto.nullable) = false ]; - repeated ERC20Deposit legacy_confirmed_deposits = 13 - [ (gogoproto.nullable) = false ]; - repeated ERC20Deposit legacy_burned_deposits = 14 - [ (gogoproto.nullable) = false ]; - } - - repeated Chain chains = 3 [ (gogoproto.nullable) = false ]; -} diff --git a/ampd/proto/axelar/evm/v1beta1/params.proto b/ampd/proto/axelar/evm/v1beta1/params.proto deleted file mode 100644 index 6fc387be1..000000000 --- a/ampd/proto/axelar/evm/v1beta1/params.proto +++ /dev/null @@ -1,37 +0,0 @@ -syntax = "proto3"; -package axelar.evm.v1beta1; -option go_package = "github.com/axelarnetwork/axelar-core/x/evm/types"; - -import "axelar/utils/v1beta1/threshold.proto"; -import "axelar/evm/v1beta1/types.proto"; -import "gogoproto/gogo.proto"; -import "axelar/nexus/exported/v1beta1/types.proto"; - -option (gogoproto.goproto_getters_all) = false; - -// Params is the parameter set for this module -message Params { - string chain = 1 - [ (gogoproto.casttype) = - "github.com/axelarnetwork/axelar-core/x/nexus/exported.ChainName" ]; - uint64 confirmation_height = 2; - string network = 3; - reserved 4; // gateway_code was removed in v0.16 - bytes token_code = 5; - bytes burnable = 6; - int64 revote_locking_period = 7; - repeated evm.v1beta1.NetworkInfo networks = 8 - [ (gogoproto.nullable) = false ]; - utils.v1beta1.Threshold voting_threshold = 9 [ (gogoproto.nullable) = false ]; - int64 min_voter_count = 10; - uint32 commands_gas_limit = 11; - reserved 12; // transaction_fee_rate was removed in v0.15 - int64 voting_grace_period = 13; - int64 end_blocker_limit = 14; - uint64 transfer_limit = 15; -} - -message PendingChain { - Params params = 1 [ (gogoproto.nullable) = false ]; - nexus.exported.v1beta1.Chain chain = 2 [ (gogoproto.nullable) = false ]; -} diff --git a/ampd/proto/axelar/evm/v1beta1/query.proto b/ampd/proto/axelar/evm/v1beta1/query.proto deleted file mode 100644 index 61de10b01..000000000 --- a/ampd/proto/axelar/evm/v1beta1/query.proto +++ /dev/null @@ -1,243 +0,0 @@ -syntax = "proto3"; -package axelar.evm.v1beta1; - -option go_package = "github.com/axelarnetwork/axelar-core/x/evm/types"; - -import "gogoproto/gogo.proto"; -import "axelar/evm/v1beta1/types.proto"; -import "axelar/evm/v1beta1/params.proto"; - -option (gogoproto.goproto_getters_all) = false; - -// DepositQueryParams describe the parameters used to query for an EVM -// deposit address -message DepositQueryParams { - string address = 1; - string asset = 2; - string chain = 3 - [ (gogoproto.casttype) = - "github.com/axelarnetwork/axelar-core/x/nexus/exported.ChainName" ]; -} - -message BatchedCommandsRequest { - string chain = 1; - // id defines an optional id for the commandsbatch. If not specified the - // latest will be returned - string id = 2; -} - -message BatchedCommandsResponse { - string id = 1 [ (gogoproto.customname) = "ID" ]; - string data = 2; - BatchedCommandsStatus status = 3; - string key_id = 4 [ - (gogoproto.customname) = "KeyID", - (gogoproto.casttype) = - "github.com/axelarnetwork/axelar-core/x/multisig/exported.KeyID" - ]; - reserved 5; // signature was removed in v0.20.0 - string execute_data = 6; - string prev_batched_commands_id = 7 - [ (gogoproto.customname) = "PrevBatchedCommandsID" ]; - repeated string command_ids = 8 [ (gogoproto.customname) = "CommandIDs" ]; - Proof proof = 9; -} - -message KeyAddressRequest { - reserved 2, 3; - - string chain = 1; - string key_id = 4 [ - (gogoproto.customname) = "KeyID", - (gogoproto.casttype) = - "github.com/axelarnetwork/axelar-core/x/multisig/exported.KeyID" - ]; -} - -message KeyAddressResponse { - message WeightedAddress { - string address = 1; - string weight = 2; - }; - - string key_id = 1 [ - (gogoproto.customname) = "KeyID", - (gogoproto.casttype) = - "github.com/axelarnetwork/axelar-core/x/multisig/exported.KeyID" - ]; - repeated WeightedAddress addresses = 2 [ (gogoproto.nullable) = false ]; - string threshold = 3; -} - -message QueryTokenAddressResponse { - option deprecated = true; // Deprecated in v19 - - string address = 1; - bool confirmed = 2; -} - -message QueryDepositStateParams { - option deprecated = true; - - bytes tx_id = 1 [ - (gogoproto.nullable) = false, - (gogoproto.customtype) = "Hash", - (gogoproto.customname) = "TxID" - ]; - bytes burner_address = 2 - [ (gogoproto.nullable) = false, (gogoproto.customtype) = "Address" ]; -} - -message DepositStateRequest { - option deprecated = true; - - string chain = 1 - [ (gogoproto.casttype) = - "github.com/axelarnetwork/axelar-core/x/nexus/exported.ChainName" ]; - QueryDepositStateParams params = 2; -} - -message DepositStateResponse { - option deprecated = true; - - DepositStatus status = 2; -} - -message EventRequest { - string chain = 1; - string event_id = 2; -} - -message EventResponse { Event event = 1; } - -message QueryBurnerAddressResponse { string address = 1; } - -enum ChainStatus { - option (gogoproto.goproto_enum_prefix) = false; - - CHAIN_STATUS_UNSPECIFIED = 0 - [ (gogoproto.enumvalue_customname) = "StatusUnspecified" ]; - CHAIN_STATUS_ACTIVATED = 1 [ (gogoproto.enumvalue_customname) = "Activated" ]; - CHAIN_STATUS_DEACTIVATED = 2 - [ (gogoproto.enumvalue_customname) = "Deactivated" ]; -} - -message ChainsRequest { ChainStatus status = 1; } - -message ChainsResponse { - repeated string chains = 1 - [ (gogoproto.casttype) = - "github.com/axelarnetwork/axelar-core/x/nexus/exported.ChainName" ]; -} - -message CommandRequest { - string chain = 1; - string id = 2 [ (gogoproto.customname) = "ID" ]; -} - -message CommandResponse { - string id = 1 [ (gogoproto.customname) = "ID" ]; - string type = 2; - map params = 3 [ (gogoproto.nullable) = false ]; - string key_id = 4 [ (gogoproto.customname) = "KeyID" ]; - uint32 max_gas_cost = 5; -} - -message PendingCommandsRequest { string chain = 1; } - -message PendingCommandsResponse { - repeated QueryCommandResponse commands = 1 [ (gogoproto.nullable) = false ]; -} - -message QueryCommandResponse { - string id = 1 [ (gogoproto.customname) = "ID" ]; - string type = 2; - map params = 3 [ (gogoproto.nullable) = false ]; - string key_id = 4 [ (gogoproto.customname) = "KeyID" ]; - uint32 max_gas_cost = 5; -} - -message BurnerInfoRequest { - bytes address = 1 - [ (gogoproto.nullable) = false, (gogoproto.customtype) = "Address" ]; -} - -message BurnerInfoResponse { - string chain = 1 - [ (gogoproto.casttype) = - "github.com/axelarnetwork/axelar-core/x/nexus/exported.ChainName" ]; - BurnerInfo burner_info = 2; -} - -message ConfirmationHeightRequest { string chain = 1; } - -message ConfirmationHeightResponse { uint64 height = 1; } - -message GatewayAddressRequest { string chain = 1; } - -message GatewayAddressResponse { string address = 1; } - -message BytecodeRequest { - string chain = 1; - string contract = 2; -} - -message BytecodeResponse { string bytecode = 1; } - -enum TokenType { - option (gogoproto.goproto_enum_prefix) = false; - option (gogoproto.goproto_enum_stringer) = true; - - TOKEN_TYPE_UNSPECIFIED = 0 - [ (gogoproto.enumvalue_customname) = "Unspecified" ]; - TOKEN_TYPE_INTERNAL = 1 [ (gogoproto.enumvalue_customname) = "Internal" ]; - TOKEN_TYPE_EXTERNAL = 2 [ (gogoproto.enumvalue_customname) = "External" ]; -} - -// ERC20TokensRequest describes the chain for which the type of ERC20 tokens are -// requested. -message ERC20TokensRequest { - string chain = 1; - TokenType type = 2; -} - -// ERC20TokensResponse describes the asset and symbol for all -// ERC20 tokens requested for a chain -message ERC20TokensResponse { - message Token { - string asset = 1; - string symbol = 2; - } - - repeated Token tokens = 1 [ (gogoproto.nullable) = false ]; -} - -message TokenInfoRequest { - string chain = 1; - oneof find_by { - string asset = 2; - string symbol = 3; - string address = 4; - } -} - -message TokenInfoResponse { - string asset = 1; - TokenDetails details = 2 [ (gogoproto.nullable) = false ]; - string address = 3; - bool confirmed = 4; - bool is_external = 5; - string burner_code_hash = 6; -} - -message Proof { - repeated string addresses = 1; - repeated string weights = 2; - string threshold = 3; - repeated string signatures = 4; -} - -// ParamsRequest represents a message that queries the params -message ParamsRequest { string chain = 1; } - -message ParamsResponse { Params params = 1 [ (gogoproto.nullable) = false ]; } diff --git a/ampd/proto/axelar/evm/v1beta1/service.proto b/ampd/proto/axelar/evm/v1beta1/service.proto deleted file mode 100644 index 6cc9b02f0..000000000 --- a/ampd/proto/axelar/evm/v1beta1/service.proto +++ /dev/null @@ -1,208 +0,0 @@ -syntax = "proto3"; -package axelar.evm.v1beta1; - -option go_package = "github.com/axelarnetwork/axelar-core/x/evm/types"; - -import "gogoproto/gogo.proto"; -import "google/api/annotations.proto"; -import "axelar/evm/v1beta1/tx.proto"; -import "axelar/evm/v1beta1/query.proto"; - -option (gogoproto.goproto_registration) = true; - -// Msg defines the evm Msg service. -service MsgService { - rpc SetGateway(SetGatewayRequest) returns (SetGatewayResponse) { - option (google.api.http) = { - post : "/axelar/evm/set_gateway" - body : "*" - }; - } - - // Deprecated: use ConfirmGatewayTxs instead - rpc ConfirmGatewayTx(ConfirmGatewayTxRequest) - returns (ConfirmGatewayTxResponse) { - option (google.api.http) = { - post : "/axelar/evm/confirm_gateway_tx" - body : "*" - }; - } - - rpc ConfirmGatewayTxs(ConfirmGatewayTxsRequest) - returns (ConfirmGatewayTxsResponse) { - option (google.api.http) = { - post : "/axelar/evm/confirm_gateway_txs" - body : "*" - }; - } - - rpc Link(LinkRequest) returns (LinkResponse) { - option (google.api.http) = { - post : "/axelar/evm/link" - body : "*" - }; - } - - rpc ConfirmToken(ConfirmTokenRequest) returns (ConfirmTokenResponse) { - option (google.api.http) = { - post : "/axelar/evm/confirm_token" - body : "*" - }; - } - - rpc ConfirmDeposit(ConfirmDepositRequest) returns (ConfirmDepositResponse) { - option (google.api.http) = { - post : "/axelar/evm/confirm_deposit" - body : "*" - }; - } - - rpc ConfirmTransferKey(ConfirmTransferKeyRequest) - returns (ConfirmTransferKeyResponse) { - option (google.api.http) = { - post : "/axelar/evm/confirm_transfer_key" - body : "*" - }; - } - - rpc CreateDeployToken(CreateDeployTokenRequest) - returns (CreateDeployTokenResponse) { - option (google.api.http) = { - post : "/axelar/evm/create_deploy_token" - body : "*" - }; - } - - rpc CreateBurnTokens(CreateBurnTokensRequest) - returns (CreateBurnTokensResponse) { - option (google.api.http) = { - post : "/axelar/evm/create_burn_tokens" - body : "*" - }; - } - - rpc CreatePendingTransfers(CreatePendingTransfersRequest) - returns (CreatePendingTransfersResponse) { - option (google.api.http) = { - post : "/axelar/evm/create_pending_transfers" - body : "*" - }; - } - - rpc CreateTransferOperatorship(CreateTransferOperatorshipRequest) - returns (CreateTransferOperatorshipResponse) { - option (google.api.http) = { - post : "/axelar/evm/create_transfer_operatorship" - body : "*" - }; - } - - rpc SignCommands(SignCommandsRequest) returns (SignCommandsResponse) { - option (google.api.http) = { - post : "/axelar/evm/sign_commands" - body : "*" - }; - } - - rpc AddChain(AddChainRequest) returns (AddChainResponse) { - option (google.api.http) = { - post : "/axelar/evm/add_chain" - body : "*" - }; - } - - rpc RetryFailedEvent(RetryFailedEventRequest) - returns (RetryFailedEventResponse) { - option (google.api.http) = { - post : "/axelar/evm/retry-failed-event" - body : "*" - }; - } -} - -// QueryService defines the gRPC querier service. -service QueryService { - - // BatchedCommands queries the batched commands for a specified chain and - // BatchedCommandsID if no BatchedCommandsID is specified, then it returns the - // latest batched commands - rpc BatchedCommands(BatchedCommandsRequest) - returns (BatchedCommandsResponse) { - option (google.api.http).get = - "/axelar/evm/v1beta1/batched_commands/{chain}/{id}"; - } - - // BurnerInfo queries the burner info for the specified address - rpc BurnerInfo(BurnerInfoRequest) returns (BurnerInfoResponse) { - option (google.api.http).get = "/axelar/evm/v1beta1/burner_info"; - } - - // ConfirmationHeight queries the confirmation height for the specified chain - rpc ConfirmationHeight(ConfirmationHeightRequest) - returns (ConfirmationHeightResponse) { - option (google.api.http).get = - "/axelar/evm/v1beta1/confirmation_height/{chain}"; - } - - // DepositState queries the state of the specified deposit - rpc DepositState(DepositStateRequest) returns (DepositStateResponse) { - option deprecated = true; - option (google.api.http).get = "/axelar/evm/v1beta1/deposit_state"; - } - - // PendingCommands queries the pending commands for the specified chain - rpc PendingCommands(PendingCommandsRequest) - returns (PendingCommandsResponse) { - option (google.api.http).get = - "/axelar/evm/v1beta1/pending_commands/{chain}"; - } - - // Chains queries the available evm chains - rpc Chains(ChainsRequest) returns (ChainsResponse) { - option (google.api.http).get = "/axelar/evm/v1beta1/chains"; - } - - // Command queries the command of a chain provided the command id - rpc Command(CommandRequest) returns (CommandResponse) { - option (google.api.http).get = "/axelar/evm/v1beta1/command_request"; - } - - // KeyAddress queries the address of key of a chain - rpc KeyAddress(KeyAddressRequest) returns (KeyAddressResponse) { - option (google.api.http).get = "/axelar/evm/v1beta1/key_address/{chain}"; - } - - // GatewayAddress queries the address of axelar gateway at the specified - // chain - rpc GatewayAddress(GatewayAddressRequest) returns (GatewayAddressResponse) { - option (google.api.http).get = - "/axelar/evm/v1beta1/gateway_address/{chain}"; - } - - // Bytecode queries the bytecode of a specified gateway at the specified - // chain - rpc Bytecode(BytecodeRequest) returns (BytecodeResponse) { - option (google.api.http).get = - "/axelar/evm/v1beta1/bytecode/{chain}/{contract}"; - } - - // Event queries an event at the specified chain - rpc Event(EventRequest) returns (EventResponse) { - option (google.api.http).get = - "/axelar/evm/v1beta1/event/{chain}/{event_id}"; - } - - // ERC20Tokens queries the ERC20 tokens registered for a chain - rpc ERC20Tokens(ERC20TokensRequest) returns (ERC20TokensResponse) { - option (google.api.http).get = "/axelar/evm/v1beta1/erc20_tokens/{chain}"; - } - - // TokenInfo queries the token info for a registered ERC20 Token - rpc TokenInfo(TokenInfoRequest) returns (TokenInfoResponse) { - option (google.api.http).get = "/axelar/evm/v1beta1/token_info/{chain}"; - } - - rpc Params(ParamsRequest) returns (ParamsResponse) { - option (google.api.http).get = "/axelar/evm/v1beta1/params/{chain}"; - } -} diff --git a/ampd/proto/axelar/evm/v1beta1/tx.proto b/ampd/proto/axelar/evm/v1beta1/tx.proto deleted file mode 100644 index 9aaef12e4..000000000 --- a/ampd/proto/axelar/evm/v1beta1/tx.proto +++ /dev/null @@ -1,259 +0,0 @@ -syntax = "proto3"; -package axelar.evm.v1beta1; - -option go_package = "github.com/axelarnetwork/axelar-core/x/evm/types"; - -import "gogoproto/gogo.proto"; -import "axelar/vote/exported/v1beta1/types.proto"; -import "axelar/tss/exported/v1beta1/types.proto"; -import "axelar/evm/v1beta1/types.proto"; -import "axelar/permission/exported/v1beta1/types.proto"; - -option (gogoproto.goproto_getters_all) = false; - -message SetGatewayRequest { - option (permission.exported.v1beta1.permission_role) = ROLE_ACCESS_CONTROL; - bytes sender = 1 [ (gogoproto.casttype) = - "github.com/cosmos/cosmos-sdk/types.AccAddress" ]; - string chain = 2 - [ (gogoproto.casttype) = - "github.com/axelarnetwork/axelar-core/x/nexus/exported.ChainName" ]; - bytes address = 3 - [ (gogoproto.nullable) = false, (gogoproto.customtype) = "Address" ]; -} - -message SetGatewayResponse {} - -message ConfirmGatewayTxRequest { - option deprecated = true; - - option (permission.exported.v1beta1.permission_role) = ROLE_UNRESTRICTED; - bytes sender = 1 [ (gogoproto.casttype) = - "github.com/cosmos/cosmos-sdk/types.AccAddress" ]; - string chain = 2 - [ (gogoproto.casttype) = - "github.com/axelarnetwork/axelar-core/x/nexus/exported.ChainName" ]; - bytes tx_id = 3 [ - (gogoproto.nullable) = false, - (gogoproto.customtype) = "Hash", - (gogoproto.customname) = "TxID" - ]; -} - -message ConfirmGatewayTxResponse { option deprecated = true; } - -message ConfirmGatewayTxsRequest { - option (permission.exported.v1beta1.permission_role) = ROLE_UNRESTRICTED; - bytes sender = 1 [ (gogoproto.casttype) = - "github.com/cosmos/cosmos-sdk/types.AccAddress" ]; - string chain = 2 - [ (gogoproto.casttype) = - "github.com/axelarnetwork/axelar-core/x/nexus/exported.ChainName" ]; - repeated bytes tx_ids = 3 [ - (gogoproto.nullable) = false, - (gogoproto.customtype) = "Hash", - (gogoproto.customname) = "TxIDs" - ]; -} - -message ConfirmGatewayTxsResponse {} - -// MsgConfirmDeposit represents an erc20 deposit confirmation message -message ConfirmDepositRequest { - option (permission.exported.v1beta1.permission_role) = ROLE_UNRESTRICTED; - bytes sender = 1 [ (gogoproto.casttype) = - "github.com/cosmos/cosmos-sdk/types.AccAddress" ]; - string chain = 2 - [ (gogoproto.casttype) = - "github.com/axelarnetwork/axelar-core/x/nexus/exported.ChainName" ]; - bytes tx_id = 3 [ - (gogoproto.nullable) = false, - (gogoproto.customtype) = "Hash", - (gogoproto.customname) = "TxID" - ]; - bytes amount = 4 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Uint", - (gogoproto.nullable) = false, - deprecated = true - ]; - bytes burner_address = 5 - [ (gogoproto.nullable) = false, (gogoproto.customtype) = "Address" ]; -} - -message ConfirmDepositResponse {} - -// MsgConfirmToken represents a token deploy confirmation message -message ConfirmTokenRequest { - option (permission.exported.v1beta1.permission_role) = ROLE_UNRESTRICTED; - bytes sender = 1 [ (gogoproto.casttype) = - "github.com/cosmos/cosmos-sdk/types.AccAddress" ]; - string chain = 2 - [ (gogoproto.casttype) = - "github.com/axelarnetwork/axelar-core/x/nexus/exported.ChainName" ]; - bytes tx_id = 3 [ - (gogoproto.nullable) = false, - (gogoproto.customtype) = "Hash", - (gogoproto.customname) = "TxID" - ]; - Asset asset = 4 [ (gogoproto.nullable) = false ]; -} - -message ConfirmTokenResponse {} - -message ConfirmTransferKeyRequest { - reserved 4, 5; // transfer_type and key_id were deleted in v0.20 - - option (permission.exported.v1beta1.permission_role) = ROLE_UNRESTRICTED; - bytes sender = 1 [ (gogoproto.casttype) = - "github.com/cosmos/cosmos-sdk/types.AccAddress" ]; - string chain = 2 - [ (gogoproto.casttype) = - "github.com/axelarnetwork/axelar-core/x/nexus/exported.ChainName" ]; - bytes tx_id = 3 [ - (gogoproto.nullable) = false, - (gogoproto.customtype) = "Hash", - (gogoproto.customname) = "TxID" - ]; -} - -message ConfirmTransferKeyResponse {} - -// MsgLink represents the message that links a cross chain address to a burner -// address -message LinkRequest { - option (permission.exported.v1beta1.permission_role) = ROLE_UNRESTRICTED; - bytes sender = 1 [ (gogoproto.casttype) = - "github.com/cosmos/cosmos-sdk/types.AccAddress" ]; - string chain = 2 - [ (gogoproto.casttype) = - "github.com/axelarnetwork/axelar-core/x/nexus/exported.ChainName" ]; - string recipient_addr = 3; - string asset = 4; - string recipient_chain = 5 - [ (gogoproto.casttype) = - "github.com/axelarnetwork/axelar-core/x/nexus/exported.ChainName" ]; -} - -message LinkResponse { string deposit_addr = 1; } - -// CreateBurnTokensRequest represents the message to create commands to burn -// tokens with AxelarGateway -message CreateBurnTokensRequest { - option (permission.exported.v1beta1.permission_role) = ROLE_UNRESTRICTED; - bytes sender = 1 [ (gogoproto.casttype) = - "github.com/cosmos/cosmos-sdk/types.AccAddress" ]; - string chain = 2 - [ (gogoproto.casttype) = - "github.com/axelarnetwork/axelar-core/x/nexus/exported.ChainName" ]; -} - -message CreateBurnTokensResponse {} - -// CreateDeployTokenRequest represents the message to create a deploy token -// command for AxelarGateway -message CreateDeployTokenRequest { - option (permission.exported.v1beta1.permission_role) = ROLE_CHAIN_MANAGEMENT; - bytes sender = 1 [ (gogoproto.casttype) = - "github.com/cosmos/cosmos-sdk/types.AccAddress" ]; - string chain = 2 - [ (gogoproto.casttype) = - "github.com/axelarnetwork/axelar-core/x/nexus/exported.ChainName" ]; - Asset asset = 3 [ (gogoproto.nullable) = false ]; - TokenDetails token_details = 4 [ (gogoproto.nullable) = false ]; - reserved 5; // min_amount was removed in v0.15 - bytes address = 6 - [ (gogoproto.nullable) = false, (gogoproto.customtype) = "Address" ]; - string daily_mint_limit = 7; -} - -message CreateDeployTokenResponse {} - -// CreatePendingTransfersRequest represents a message to trigger the creation of -// commands handling all pending transfers -message CreatePendingTransfersRequest { - option (permission.exported.v1beta1.permission_role) = ROLE_UNRESTRICTED; - bytes sender = 1 [ (gogoproto.casttype) = - "github.com/cosmos/cosmos-sdk/types.AccAddress" ]; - string chain = 2 - [ (gogoproto.casttype) = - "github.com/axelarnetwork/axelar-core/x/nexus/exported.ChainName" ]; -} - -message CreatePendingTransfersResponse {} - -message CreateTransferOwnershipRequest { - option deprecated = true; - option (permission.exported.v1beta1.permission_role) = ROLE_CHAIN_MANAGEMENT; - bytes sender = 1 [ (gogoproto.casttype) = - "github.com/cosmos/cosmos-sdk/types.AccAddress" ]; - string chain = 2 - [ (gogoproto.casttype) = - "github.com/axelarnetwork/axelar-core/x/nexus/exported.ChainName" ]; - string key_id = 3 [ - (gogoproto.customname) = "KeyID", - (gogoproto.casttype) = - "github.com/axelarnetwork/axelar-core/x/multisig/exported.KeyID" - ]; -} - -message CreateTransferOwnershipResponse { option deprecated = true; } - -message CreateTransferOperatorshipRequest { - option (permission.exported.v1beta1.permission_role) = ROLE_CHAIN_MANAGEMENT; - bytes sender = 1 [ (gogoproto.casttype) = - "github.com/cosmos/cosmos-sdk/types.AccAddress" ]; - string chain = 2 - [ (gogoproto.casttype) = - "github.com/axelarnetwork/axelar-core/x/nexus/exported.ChainName" ]; - string key_id = 3 [ - (gogoproto.customname) = "KeyID", - (gogoproto.casttype) = - "github.com/axelarnetwork/axelar-core/x/multisig/exported.KeyID" - ]; -} - -message CreateTransferOperatorshipResponse {} - -message SignCommandsRequest { - option (permission.exported.v1beta1.permission_role) = ROLE_UNRESTRICTED; - bytes sender = 1 [ (gogoproto.casttype) = - "github.com/cosmos/cosmos-sdk/types.AccAddress" ]; - string chain = 2 - [ (gogoproto.casttype) = - "github.com/axelarnetwork/axelar-core/x/nexus/exported.ChainName" ]; -} - -message SignCommandsResponse { - bytes batched_commands_id = 1 - [ (gogoproto.customname) = "BatchedCommandsID" ]; - uint32 command_count = 2; -} - -message AddChainRequest { - option (permission.exported.v1beta1.permission_role) = ROLE_ACCESS_CONTROL; - reserved 3; // native_asset was removed in v0.14 - - bytes sender = 1 [ (gogoproto.casttype) = - "github.com/cosmos/cosmos-sdk/types.AccAddress" ]; - string name = 2 - [ (gogoproto.casttype) = - "github.com/axelarnetwork/axelar-core/x/nexus/exported.ChainName" ]; - tss.exported.v1beta1.KeyType key_type = 4 [ deprecated = true ]; - bytes params = 5 - [ (gogoproto.nullable) = false, (gogoproto.customtype) = "Params" ]; -} - -message AddChainResponse {} - -message RetryFailedEventRequest { - option (permission.exported.v1beta1.permission_role) = ROLE_UNRESTRICTED; - bytes sender = 1 [ (gogoproto.casttype) = - "github.com/cosmos/cosmos-sdk/types.AccAddress" ]; - string chain = 2 - [ (gogoproto.casttype) = - "github.com/axelarnetwork/axelar-core/x/nexus/exported.ChainName" ]; - string event_id = 3 - [ (gogoproto.customname) = "EventID", (gogoproto.casttype) = "EventID" ]; -} - -message RetryFailedEventResponse {} diff --git a/ampd/proto/axelar/evm/v1beta1/types.proto b/ampd/proto/axelar/evm/v1beta1/types.proto deleted file mode 100644 index 13a849cf9..000000000 --- a/ampd/proto/axelar/evm/v1beta1/types.proto +++ /dev/null @@ -1,375 +0,0 @@ -syntax = "proto3"; -package axelar.evm.v1beta1; - -option go_package = "github.com/axelarnetwork/axelar-core/x/evm/types"; - -import "google/protobuf/any.proto"; -import "gogoproto/gogo.proto"; -import "cosmos_proto/cosmos.proto"; -import "axelar/nexus/exported/v1beta1/types.proto"; -import "axelar/multisig/exported/v1beta1/types.proto"; - -option (gogoproto.goproto_getters_all) = false; - -message VoteEvents { - string chain = 1 - [ (gogoproto.casttype) = - "github.com/axelarnetwork/axelar-core/x/nexus/exported.ChainName" ]; - repeated Event events = 2 [ (gogoproto.nullable) = false ]; -} - -message Event { - enum Status { - option (gogoproto.goproto_enum_prefix) = false; - option (gogoproto.goproto_enum_stringer) = true; - - STATUS_UNSPECIFIED = 0 - [ (gogoproto.enumvalue_customname) = "EventNonExistent" ]; - STATUS_CONFIRMED = 1 - [ (gogoproto.enumvalue_customname) = "EventConfirmed" ]; - STATUS_COMPLETED = 2 - [ (gogoproto.enumvalue_customname) = "EventCompleted" ]; - STATUS_FAILED = 3 [ (gogoproto.enumvalue_customname) = "EventFailed" ]; - } - - string chain = 1 - [ (gogoproto.casttype) = - "github.com/axelarnetwork/axelar-core/x/nexus/exported.ChainName" ]; - bytes tx_id = 2 [ - (gogoproto.customname) = "TxID", - (gogoproto.nullable) = false, - (gogoproto.customtype) = "Hash" - ]; - uint64 index = 3; - Status status = 4; - - oneof event { - EventTokenSent token_sent = 5; - EventContractCall contract_call = 6; - EventContractCallWithToken contract_call_with_token = 7; - EventTransfer transfer = 8; - EventTokenDeployed token_deployed = 9; - EventMultisigOwnershipTransferred multisig_ownership_transferred = 10 - [ deprecated = true ]; - EventMultisigOperatorshipTransferred multisig_operatorship_transferred = 11; - } - - reserved 12; // singlesig_ownership_transferred was removed in v0.23 - reserved 13; // singlesig_operatorship_transferred was removed in v0.23 -} - -message EventTokenSent { - bytes sender = 1 - [ (gogoproto.nullable) = false, (gogoproto.customtype) = "Address" ]; - string destination_chain = 2 - [ (gogoproto.casttype) = - "github.com/axelarnetwork/axelar-core/x/nexus/exported.ChainName" ]; - string destination_address = 3; - string symbol = 4; - bytes amount = 5 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Uint", - (gogoproto.nullable) = false - ]; -} - -message EventContractCall { - bytes sender = 1 - [ (gogoproto.nullable) = false, (gogoproto.customtype) = "Address" ]; - string destination_chain = 2 - [ (gogoproto.casttype) = - "github.com/axelarnetwork/axelar-core/x/nexus/exported.ChainName" ]; - string contract_address = 3; - bytes payload_hash = 4 - [ (gogoproto.nullable) = false, (gogoproto.customtype) = "Hash" ]; -} - -message EventContractCallWithToken { - bytes sender = 1 - [ (gogoproto.nullable) = false, (gogoproto.customtype) = "Address" ]; - string destination_chain = 2 - [ (gogoproto.casttype) = - "github.com/axelarnetwork/axelar-core/x/nexus/exported.ChainName" ]; - string contract_address = 3; - bytes payload_hash = 4 - [ (gogoproto.nullable) = false, (gogoproto.customtype) = "Hash" ]; - string symbol = 5; - bytes amount = 6 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Uint", - (gogoproto.nullable) = false - ]; -} - -message EventTransfer { - bytes to = 1 - [ (gogoproto.nullable) = false, (gogoproto.customtype) = "Address" ]; - bytes amount = 2 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Uint", - (gogoproto.nullable) = false - ]; -} - -message EventTokenDeployed { - string symbol = 1; - bytes token_address = 2 - [ (gogoproto.nullable) = false, (gogoproto.customtype) = "Address" ]; -} - -message EventMultisigOwnershipTransferred { - option deprecated = true; - - repeated bytes pre_owners = 1 - [ (gogoproto.nullable) = false, (gogoproto.customtype) = "Address" ]; - bytes prev_threshold = 2 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Uint", - (gogoproto.nullable) = false - ]; - repeated bytes new_owners = 3 - [ (gogoproto.nullable) = false, (gogoproto.customtype) = "Address" ]; - bytes new_threshold = 4 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Uint", - (gogoproto.nullable) = false - ]; -} - -message EventMultisigOperatorshipTransferred { - reserved 1, 2; // pre_operators and prev_threshold were removed in v0.20 - - repeated bytes new_operators = 3 - [ (gogoproto.nullable) = false, (gogoproto.customtype) = "Address" ]; - bytes new_threshold = 4 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Uint", - (gogoproto.nullable) = false - ]; - repeated bytes new_weights = 5 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Uint", - (gogoproto.nullable) = false - ]; -} - -// NetworkInfo describes information about a network -message NetworkInfo { - string name = 1; - bytes id = 2 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.nullable) = false - ]; -} - -// BurnerInfo describes information required to burn token at an burner address -// that is deposited by an user -message BurnerInfo { - bytes burner_address = 1 - [ (gogoproto.nullable) = false, (gogoproto.customtype) = "Address" ]; - bytes token_address = 2 - [ (gogoproto.nullable) = false, (gogoproto.customtype) = "Address" ]; - string destination_chain = 3 - [ (gogoproto.casttype) = - "github.com/axelarnetwork/axelar-core/x/nexus/exported.ChainName" ]; - string symbol = 4; - string asset = 5; - bytes salt = 6 - [ (gogoproto.nullable) = false, (gogoproto.customtype) = "Hash" ]; -} - -// ERC20Deposit contains information for an ERC20 deposit -message ERC20Deposit { - bytes tx_id = 1 [ - (gogoproto.nullable) = false, - (gogoproto.customtype) = "Hash", - (gogoproto.customname) = "TxID" - ]; - bytes amount = 2 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Uint", - (gogoproto.nullable) = false - ]; - string asset = 3; - string destination_chain = 4 - [ (gogoproto.casttype) = - "github.com/axelarnetwork/axelar-core/x/nexus/exported.ChainName" ]; - bytes burner_address = 5 - [ (gogoproto.nullable) = false, (gogoproto.customtype) = "Address" ]; - uint64 log_index = 6; -} - -// ERC20TokenMetadata describes information about an ERC20 token -message ERC20TokenMetadata { - string asset = 1; - bytes chain_id = 2 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.customname) = "ChainID", - (gogoproto.nullable) = false - ]; - TokenDetails details = 3 [ (gogoproto.nullable) = false ]; - string token_address = 4 - [ (gogoproto.nullable) = false, (gogoproto.customtype) = "Address" ]; - string tx_hash = 5 - [ (gogoproto.nullable) = false, (gogoproto.customtype) = "Hash" ]; - reserved 6; // min_amount was removed in v0.15 - Status status = 7; - bool is_external = 8; - bytes burner_code = 9; -} - -enum Status { - option (gogoproto.goproto_enum_prefix) = false; - option (gogoproto.goproto_enum_stringer) = true; - - // these enum values are used for bitwise operations, therefore they need to - // be powers of 2 - STATUS_UNSPECIFIED = 0 [ (gogoproto.enumvalue_customname) = "NonExistent" ]; - STATUS_INITIALIZED = 1 [ (gogoproto.enumvalue_customname) = "Initialized" ]; - STATUS_PENDING = 2 [ (gogoproto.enumvalue_customname) = "Pending" ]; - STATUS_CONFIRMED = 4 [ (gogoproto.enumvalue_customname) = "Confirmed" ]; -} - -message TransactionMetadata { - bytes raw_tx = 1 [ (gogoproto.customname) = "RawTX" ]; - bytes pub_key = 2; -} - -enum CommandType { - option (gogoproto.goproto_enum_prefix) = false; - option (gogoproto.goproto_enum_stringer) = false; - - COMMAND_TYPE_UNSPECIFIED = 0; - COMMAND_TYPE_MINT_TOKEN = 1; - COMMAND_TYPE_DEPLOY_TOKEN = 2; - COMMAND_TYPE_BURN_TOKEN = 3; - COMMAND_TYPE_TRANSFER_OPERATORSHIP = 4; - COMMAND_TYPE_APPROVE_CONTRACT_CALL_WITH_MINT = 5; - COMMAND_TYPE_APPROVE_CONTRACT_CALL = 6; -} - -message Command { - bytes id = 1 [ - (gogoproto.nullable) = false, - (gogoproto.customname) = "ID", - (gogoproto.customtype) = "CommandID" - ]; - string command = 2 [ deprecated = true ]; - bytes params = 3; - string key_id = 4 [ - (gogoproto.customname) = "KeyID", - (gogoproto.casttype) = - "github.com/axelarnetwork/axelar-core/x/multisig/exported.KeyID" - ]; - uint32 max_gas_cost = 5; - CommandType type = 6; -} - -enum BatchedCommandsStatus { - option (gogoproto.goproto_enum_prefix) = false; - - BATCHED_COMMANDS_STATUS_UNSPECIFIED = 0 - [ (gogoproto.enumvalue_customname) = "BatchNonExistent" ]; - BATCHED_COMMANDS_STATUS_SIGNING = 1 - [ (gogoproto.enumvalue_customname) = "BatchSigning" ]; - BATCHED_COMMANDS_STATUS_ABORTED = 2 - [ (gogoproto.enumvalue_customname) = "BatchAborted" ]; - BATCHED_COMMANDS_STATUS_SIGNED = 3 - [ (gogoproto.enumvalue_customname) = "BatchSigned" ]; -} - -message CommandBatchMetadata { - bytes id = 1 [ (gogoproto.customname) = "ID" ]; - repeated bytes command_ids = 2 [ - (gogoproto.nullable) = false, - (gogoproto.customname) = "CommandIDs", - (gogoproto.customtype) = "CommandID" - ]; - bytes data = 3; - bytes sig_hash = 4 - [ (gogoproto.nullable) = false, (gogoproto.customtype) = "Hash" ]; - BatchedCommandsStatus status = 5; - string key_id = 6 [ - (gogoproto.customname) = "KeyID", - (gogoproto.casttype) = - "github.com/axelarnetwork/axelar-core/x/multisig/exported.KeyID" - ]; - bytes prev_batched_commands_id = 7 - [ (gogoproto.customname) = "PrevBatchedCommandsID" ]; - google.protobuf.Any signature = 8 - [ (cosmos_proto.accepts_interface) = - "github.com/cosmos/codec/ProtoMarshaler" ]; -} - -// SigMetadata stores necessary information for external apps to map signature -// results to evm relay transaction types -message SigMetadata { - SigType type = 1; - string chain = 2 - [ (gogoproto.casttype) = - "github.com/axelarnetwork/axelar-core/x/nexus/exported.ChainName" ]; - bytes command_batch_id = 3 [ (gogoproto.customname) = "CommandBatchID" ]; -} - -enum SigType { - option (gogoproto.goproto_enum_prefix) = false; - option (gogoproto.goproto_enum_stringer) = true; - - SIG_TYPE_UNSPECIFIED = 0 [ (gogoproto.enumvalue_customname) = "None" ]; - SIG_TYPE_TX = 1 [ (gogoproto.enumvalue_customname) = "SigTx" ]; - SIG_TYPE_COMMAND = 2 [ (gogoproto.enumvalue_customname) = "SigCommand" ]; -} - -// TransferKey contains information for a transfer operatorship -message TransferKey { - reserved 2; // type was deleted in v0.20 - - bytes tx_id = 1 [ - (gogoproto.nullable) = false, - (gogoproto.customtype) = "Hash", - (gogoproto.customname) = "TxID" - ]; - string next_key_id = 3 [ - (gogoproto.customname) = "NextKeyID", - (gogoproto.casttype) = - "github.com/axelarnetwork/axelar-core/x/multisig/exported.KeyID" - ]; -} - -enum DepositStatus { - option (gogoproto.goproto_enum_prefix) = true; - option (gogoproto.goproto_enum_stringer) = true; - - DEPOSIT_STATUS_UNSPECIFIED = 0 [ (gogoproto.enumvalue_customname) = "None" ]; - DEPOSIT_STATUS_PENDING = 1 [ (gogoproto.enumvalue_customname) = "Pending" ]; - DEPOSIT_STATUS_CONFIRMED = 2 - [ (gogoproto.enumvalue_customname) = "Confirmed" ]; - DEPOSIT_STATUS_BURNED = 3 [ (gogoproto.enumvalue_customname) = "Burned" ]; -} - -message Asset { - string chain = 1 - [ (gogoproto.casttype) = - "github.com/axelarnetwork/axelar-core/x/nexus/exported.ChainName" ]; - string name = 2; -} - -message TokenDetails { - string token_name = 1; - string symbol = 2; - uint32 decimals = 3 [ (gogoproto.casttype) = "uint8" ]; - bytes capacity = 4 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.nullable) = false - ]; -} - -message Gateway { - reserved 2; // status was removed in v0.27 - - bytes address = 1 - [ (gogoproto.nullable) = false, (gogoproto.customtype) = "Address" ]; -} - -message PollMetadata { - string chain = 1 - [ (gogoproto.casttype) = - "github.com/axelarnetwork/axelar-core/x/nexus/exported.ChainName" ]; - bytes tx_id = 2 [ - (gogoproto.customname) = "TxID", - (gogoproto.nullable) = false, - (gogoproto.customtype) = "Hash" - ]; -} diff --git a/ampd/proto/axelar/multisig/exported/v1beta1/types.proto b/ampd/proto/axelar/multisig/exported/v1beta1/types.proto deleted file mode 100644 index 97014922f..000000000 --- a/ampd/proto/axelar/multisig/exported/v1beta1/types.proto +++ /dev/null @@ -1,28 +0,0 @@ -syntax = "proto3"; -package axelar.multisig.exported.v1beta1; - -option go_package = "github.com/axelarnetwork/axelar-core/x/multisig/exported"; - -import "gogoproto/gogo.proto"; - -option (gogoproto.goproto_getters_all) = false; - -enum MultisigState { - option (gogoproto.goproto_enum_prefix) = false; - option (gogoproto.goproto_enum_stringer) = true; - - MULTISIG_STATE_UNSPECIFIED = 0 - [ (gogoproto.enumvalue_customname) = "NonExistent" ]; - MULTISIG_STATE_PENDING = 1 [ (gogoproto.enumvalue_customname) = "Pending" ]; - MULTISIG_STATE_COMPLETED = 2 - [ (gogoproto.enumvalue_customname) = "Completed" ]; -} - -enum KeyState { - option (gogoproto.goproto_enum_prefix) = false; - option (gogoproto.goproto_enum_stringer) = true; - - KEY_STATE_UNSPECIFIED = 0 [ (gogoproto.enumvalue_customname) = "Inactive" ]; - KEY_STATE_ASSIGNED = 1 [ (gogoproto.enumvalue_customname) = "Assigned" ]; - KEY_STATE_ACTIVE = 2 [ (gogoproto.enumvalue_customname) = "Active" ]; -} diff --git a/ampd/proto/axelar/multisig/v1beta1/events.proto b/ampd/proto/axelar/multisig/v1beta1/events.proto deleted file mode 100644 index 80607c48e..000000000 --- a/ampd/proto/axelar/multisig/v1beta1/events.proto +++ /dev/null @@ -1,127 +0,0 @@ -syntax = "proto3"; -package axelar.multisig.v1beta1; - -option go_package = "github.com/axelarnetwork/axelar-core/x/multisig/types"; - -import "gogoproto/gogo.proto"; - -message KeygenStarted { - string module = 1; - string key_id = 2 [ - (gogoproto.customname) = "KeyID", - (gogoproto.casttype) = - "github.com/axelarnetwork/axelar-core/x/multisig/exported.KeyID" - ]; - repeated bytes participants = 3 - [ (gogoproto.casttype) = - "github.com/cosmos/cosmos-sdk/types.ValAddress" ]; -} - -message KeygenCompleted { - option (gogoproto.messagename) = true; - - string module = 1; - string key_id = 2 [ - (gogoproto.customname) = "KeyID", - (gogoproto.casttype) = - "github.com/axelarnetwork/axelar-core/x/multisig/exported.KeyID" - ]; -} - -message KeygenExpired { - option (gogoproto.messagename) = true; - - string module = 1; - string key_id = 2 [ - (gogoproto.customname) = "KeyID", - (gogoproto.casttype) = - "github.com/axelarnetwork/axelar-core/x/multisig/exported.KeyID" - ]; -} - -message PubKeySubmitted { - string module = 1; - string key_id = 2 [ - (gogoproto.customname) = "KeyID", - (gogoproto.casttype) = - "github.com/axelarnetwork/axelar-core/x/multisig/exported.KeyID" - ]; - bytes participant = 3 [ (gogoproto.casttype) = - "github.com/cosmos/cosmos-sdk/types.ValAddress" ]; - bytes pub_key = 4 [ - (gogoproto.casttype) = - "github.com/axelarnetwork/axelar-core/x/multisig/exported.PublicKey" - ]; -} - -message SigningStarted { - option (gogoproto.stable_marshaler) = true; - - string module = 1; - uint64 sig_id = 2 [ (gogoproto.customname) = "SigID" ]; - string key_id = 3 [ - (gogoproto.customname) = "KeyID", - (gogoproto.casttype) = - "github.com/axelarnetwork/axelar-core/x/multisig/exported.KeyID" - ]; - map pub_keys = 4 [ - (gogoproto.castvalue) = - "github.com/axelarnetwork/axelar-core/x/multisig/exported.PublicKey" - ]; - bytes payload_hash = 5 - [ (gogoproto.casttype) = - "github.com/axelarnetwork/axelar-core/x/multisig/exported.Hash" ]; - string requesting_module = 6; -} - -message SigningCompleted { - string module = 1; - uint64 sig_id = 2 [ (gogoproto.customname) = "SigID" ]; -} - -message SigningExpired { - string module = 1; - uint64 sig_id = 2 [ (gogoproto.customname) = "SigID" ]; -} - -message SignatureSubmitted { - string module = 1; - uint64 sig_id = 2 [ (gogoproto.customname) = "SigID" ]; - bytes participant = 3 [ (gogoproto.casttype) = - "github.com/cosmos/cosmos-sdk/types.ValAddress" ]; - bytes signature = 4 [ (gogoproto.casttype) = "Signature" ]; -} - -message KeyAssigned { - string module = 1; - string chain = 2 - [ (gogoproto.casttype) = - "github.com/axelarnetwork/axelar-core/x/nexus/exported.ChainName" ]; - string key_id = 3 [ - (gogoproto.customname) = "KeyID", - (gogoproto.casttype) = - "github.com/axelarnetwork/axelar-core/x/multisig/exported.KeyID" - ]; -} - -message KeyRotated { - string module = 1; - string chain = 2 - [ (gogoproto.casttype) = - "github.com/axelarnetwork/axelar-core/x/nexus/exported.ChainName" ]; - string key_id = 3 [ - (gogoproto.customname) = "KeyID", - (gogoproto.casttype) = - "github.com/axelarnetwork/axelar-core/x/multisig/exported.KeyID" - ]; -} - -message KeygenOptOut { - bytes participant = 1 [ (gogoproto.casttype) = - "github.com/cosmos/cosmos-sdk/types.AccAddress" ]; -} - -message KeygenOptIn { - bytes participant = 1 [ (gogoproto.casttype) = - "github.com/cosmos/cosmos-sdk/types.AccAddress" ]; -} diff --git a/ampd/proto/axelar/multisig/v1beta1/genesis.proto b/ampd/proto/axelar/multisig/v1beta1/genesis.proto deleted file mode 100644 index adbe82867..000000000 --- a/ampd/proto/axelar/multisig/v1beta1/genesis.proto +++ /dev/null @@ -1,20 +0,0 @@ -syntax = "proto3"; -package axelar.multisig.v1beta1; - -option go_package = "github.com/axelarnetwork/axelar-core/x/multisig/types"; - -import "gogoproto/gogo.proto"; -import "axelar/multisig/v1beta1/params.proto"; -import "axelar/multisig/v1beta1/types.proto"; - -option (gogoproto.goproto_getters_all) = false; - -// GenesisState represents the genesis state -message GenesisState { - Params params = 1 [ (gogoproto.nullable) = false ]; - - repeated KeygenSession keygen_sessions = 2 [ (gogoproto.nullable) = false ]; - repeated SigningSession signing_sessions = 3 [ (gogoproto.nullable) = false ]; - repeated Key keys = 4 [ (gogoproto.nullable) = false ]; - repeated KeyEpoch key_epochs = 5 [ (gogoproto.nullable) = false ]; -} diff --git a/ampd/proto/axelar/multisig/v1beta1/params.proto b/ampd/proto/axelar/multisig/v1beta1/params.proto deleted file mode 100644 index da500f485..000000000 --- a/ampd/proto/axelar/multisig/v1beta1/params.proto +++ /dev/null @@ -1,21 +0,0 @@ -syntax = "proto3"; -package axelar.multisig.v1beta1; - -option go_package = "github.com/axelarnetwork/axelar-core/x/multisig/types"; - -import "gogoproto/gogo.proto"; -import "axelar/utils/v1beta1/threshold.proto"; - -option (gogoproto.goproto_getters_all) = false; - -// Params represent the genesis parameters for the module -message Params { - utils.v1beta1.Threshold keygen_threshold = 1 [ (gogoproto.nullable) = false ]; - utils.v1beta1.Threshold signing_threshold = 2 - [ (gogoproto.nullable) = false ]; - int64 keygen_timeout = 3; - int64 keygen_grace_period = 4; - int64 signing_timeout = 5; - int64 signing_grace_period = 6; - uint64 active_epoch_count = 7; -} diff --git a/ampd/proto/axelar/multisig/v1beta1/query.proto b/ampd/proto/axelar/multisig/v1beta1/query.proto deleted file mode 100644 index d3b33c622..000000000 --- a/ampd/proto/axelar/multisig/v1beta1/query.proto +++ /dev/null @@ -1,114 +0,0 @@ -syntax = "proto3"; -package axelar.multisig.v1beta1; - -option go_package = "github.com/axelarnetwork/axelar-core/x/multisig/types"; - -import "gogoproto/gogo.proto"; -import "google/protobuf/timestamp.proto"; -import "axelar/multisig/exported/v1beta1/types.proto"; -import "axelar/multisig/v1beta1/types.proto"; -import "axelar/utils/v1beta1/threshold.proto"; -import "axelar/multisig/v1beta1/params.proto"; - -option (gogoproto.goproto_getters_all) = false; - -message KeyIDRequest { string chain = 1; } - -// KeyIDResponse contains the key ID of the key assigned to a given chain. -message KeyIDResponse { - string key_id = 1 [ - (gogoproto.customname) = "KeyID", - (gogoproto.casttype) = - "github.com/axelarnetwork/axelar-core/x/multisig/exported.KeyID" - ]; -} - -message NextKeyIDRequest { string chain = 1; } - -// NextKeyIDResponse contains the key ID for the next rotation on the given -// chain -message NextKeyIDResponse { - string key_id = 1 [ - (gogoproto.customname) = "KeyID", - (gogoproto.casttype) = - "github.com/axelarnetwork/axelar-core/x/multisig/exported.KeyID" - ]; -} - -message KeyRequest { - string key_id = 1 [ - (gogoproto.customname) = "KeyID", - (gogoproto.casttype) = - "github.com/axelarnetwork/axelar-core/x/multisig/exported.KeyID" - ]; -} - -message KeygenParticipant { - string address = 1; - bytes weight = 2 [ - (gogoproto.nullable) = false, - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Uint" - ]; - string pub_key = 3; -} - -// KeyResponse contains the key corresponding to a given key id. -message KeyResponse { - string key_id = 1 [ - (gogoproto.customname) = "KeyID", - (gogoproto.casttype) = - "github.com/axelarnetwork/axelar-core/x/multisig/exported.KeyID" - ]; - multisig.exported.v1beta1.KeyState state = 2; - int64 started_at = 3; - google.protobuf.Timestamp started_at_timestamp = 4 - [ (gogoproto.nullable) = false, (gogoproto.stdtime) = true ]; - bytes threshold_weight = 5 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Uint", - (gogoproto.nullable) = false - ]; - bytes bonded_weight = 6 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Uint", - (gogoproto.nullable) = false - ]; - // Keygen participants in descending order by weight - repeated KeygenParticipant participants = 7 [ (gogoproto.nullable) = false ]; -} - -message KeygenSessionRequest { - string key_id = 1 [ - (gogoproto.customname) = "KeyID", - (gogoproto.casttype) = - "github.com/axelarnetwork/axelar-core/x/multisig/exported.KeyID" - ]; -} - -// KeygenSessionResponse contains the keygen session info for a given key ID. -message KeygenSessionResponse { - int64 started_at = 1; - google.protobuf.Timestamp started_at_timestamp = 2 - [ (gogoproto.nullable) = false, (gogoproto.stdtime) = true ]; - int64 expires_at = 3; - int64 completed_at = 4; - int64 grace_period = 5; - multisig.exported.v1beta1.MultisigState state = 6; - bytes keygen_threshold_weight = 7 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Uint", - (gogoproto.nullable) = false - ]; - bytes signing_threshold_weight = 8 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Uint", - (gogoproto.nullable) = false - ]; - bytes bonded_weight = 9 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Uint", - (gogoproto.nullable) = false - ]; - // Keygen candidates in descending order by weight - repeated KeygenParticipant participants = 10 [ (gogoproto.nullable) = false ]; -} - -// ParamsRequest represents a message that queries the params -message ParamsRequest {} - -message ParamsResponse { Params params = 1 [ (gogoproto.nullable) = false ]; } diff --git a/ampd/proto/axelar/multisig/v1beta1/service.proto b/ampd/proto/axelar/multisig/v1beta1/service.proto deleted file mode 100644 index c7c39ae60..000000000 --- a/ampd/proto/axelar/multisig/v1beta1/service.proto +++ /dev/null @@ -1,92 +0,0 @@ -syntax = "proto3"; -package axelar.multisig.v1beta1; - -option go_package = "github.com/axelarnetwork/axelar-core/x/multisig/types"; - -import "gogoproto/gogo.proto"; -import "google/api/annotations.proto"; -import "axelar/multisig/v1beta1/tx.proto"; -import "axelar/multisig/v1beta1/query.proto"; - -option (gogoproto.goproto_registration) = true; - -// Msg defines the multisig Msg service. -service MsgService { - rpc StartKeygen(StartKeygenRequest) returns (StartKeygenResponse) { - option (google.api.http) = { - post : "/axelar/multisig/start_keygen" - body : "*" - }; - } - - rpc SubmitPubKey(SubmitPubKeyRequest) returns (SubmitPubKeyResponse) { - option (google.api.http) = { - post : "/axelar/multisig/submit_pub_key" - body : "*" - }; - } - - rpc SubmitSignature(SubmitSignatureRequest) - returns (SubmitSignatureResponse) { - option (google.api.http) = { - post : "/axelar/multisig/submit_signature" - body : "*" - }; - } - - rpc RotateKey(RotateKeyRequest) returns (RotateKeyResponse) { - option (google.api.http) = { - post : "/axelar/multisig/rotate_key" - body : "*" - }; - } - - rpc KeygenOptOut(KeygenOptOutRequest) returns (KeygenOptOutResponse) { - option (google.api.http) = { - post : "/axelar/multisig/v1beta1/keygen_opt_out" - body : "*" - }; - } - - rpc KeygenOptIn(KeygenOptInRequest) returns (KeygenOptInResponse) { - option (google.api.http) = { - post : "/axelar/multisig/v1beta1/keygen_opt_in" - body : "*" - }; - } -} - -// Query defines the gRPC querier service. -service QueryService { - // KeyID returns the key ID of a key assigned to a given chain. - // If no key is assigned, it returns the grpc NOT_FOUND error. - rpc KeyID(KeyIDRequest) returns (KeyIDResponse) { - option (google.api.http).get = "/axelar/multisig/v1beta1/key_id/{chain}"; - } - - // NextKeyID returns the key ID assigned for the next rotation on a given - // chain. If no key rotation is in progress, it returns the grpc NOT_FOUND - // error. - rpc NextKeyID(NextKeyIDRequest) returns (NextKeyIDResponse) { - option (google.api.http).get = - "/axelar/multisig/v1beta1/next_key_id/{chain}"; - } - - // Key returns the key corresponding to a given key ID. - // If no key is found, it returns the grpc NOT_FOUND error. - rpc Key(KeyRequest) returns (KeyResponse) { - option (google.api.http).get = "/axelar/multisig/v1beta1/key"; - } - - // KeygenSession returns the keygen session info for a given key ID. - // If no key is found, it returns the grpc NOT_FOUND error. - rpc KeygenSession(KeygenSessionRequest) returns (KeygenSessionResponse) { - option (google.api.http).get = "/axelar/multisig/v1beta1/keygen_session"; - } - - rpc Params(ParamsRequest) returns (ParamsResponse) { - option (google.api.http) = { - get : "/axelar/multisig/v1beta1/params" - }; - } -} diff --git a/ampd/proto/axelar/multisig/v1beta1/tx.proto b/ampd/proto/axelar/multisig/v1beta1/tx.proto deleted file mode 100644 index f816389e3..000000000 --- a/ampd/proto/axelar/multisig/v1beta1/tx.proto +++ /dev/null @@ -1,86 +0,0 @@ -syntax = "proto3"; -package axelar.multisig.v1beta1; - -option go_package = "github.com/axelarnetwork/axelar-core/x/multisig/types"; -option (gogoproto.goproto_getters_all) = false; - -import "gogoproto/gogo.proto"; -import "axelar/permission/exported/v1beta1/types.proto"; - -message StartKeygenRequest { - option (permission.exported.v1beta1.permission_role) = ROLE_CHAIN_MANAGEMENT; - - string sender = 1 [ (gogoproto.casttype) = - "github.com/cosmos/cosmos-sdk/types.AccAddress" ]; - string key_id = 2 [ - (gogoproto.customname) = "KeyID", - (gogoproto.casttype) = - "github.com/axelarnetwork/axelar-core/x/multisig/exported.KeyID" - ]; -} - -message StartKeygenResponse {} - -message SubmitPubKeyRequest { - option (permission.exported.v1beta1.permission_role) = ROLE_UNRESTRICTED; - - string sender = 1 [ (gogoproto.casttype) = - "github.com/cosmos/cosmos-sdk/types.AccAddress" ]; - string key_id = 2 [ - (gogoproto.customname) = "KeyID", - (gogoproto.casttype) = - "github.com/axelarnetwork/axelar-core/x/multisig/exported.KeyID" - ]; - bytes pub_key = 3 [ - (gogoproto.casttype) = - "github.com/axelarnetwork/axelar-core/x/multisig/exported.PublicKey" - ]; - bytes signature = 4 [ (gogoproto.casttype) = "Signature" ]; -} - -message SubmitPubKeyResponse {} - -message SubmitSignatureRequest { - option (permission.exported.v1beta1.permission_role) = ROLE_UNRESTRICTED; - - string sender = 1 [ (gogoproto.casttype) = - "github.com/cosmos/cosmos-sdk/types.AccAddress" ]; - uint64 sig_id = 2 [ (gogoproto.customname) = "SigID" ]; - bytes signature = 3 [ (gogoproto.casttype) = "Signature" ]; -} - -message SubmitSignatureResponse {} - -message RotateKeyRequest { - option (permission.exported.v1beta1.permission_role) = ROLE_CHAIN_MANAGEMENT; - bytes sender = 1 [ (gogoproto.casttype) = - "github.com/cosmos/cosmos-sdk/types.AccAddress" ]; - string chain = 2 - [ (gogoproto.casttype) = - "github.com/axelarnetwork/axelar-core/x/nexus/exported.ChainName" ]; - string key_id = 3 [ - (gogoproto.customname) = "KeyID", - (gogoproto.casttype) = - "github.com/axelarnetwork/axelar-core/x/multisig/exported.KeyID" - ]; -} - -message RotateKeyResponse {} - -message KeygenOptOutRequest { - option (permission.exported.v1beta1.permission_role) = ROLE_UNRESTRICTED; - - bytes sender = 1 [ (gogoproto.casttype) = - "github.com/cosmos/cosmos-sdk/types.AccAddress" ]; -} - -message KeygenOptOutResponse {} - -message KeygenOptInRequest { - option (permission.exported.v1beta1.permission_role) = ROLE_UNRESTRICTED; - - bytes sender = 1 [ (gogoproto.casttype) = - "github.com/cosmos/cosmos-sdk/types.AccAddress" ]; -} - -message KeygenOptInResponse {} diff --git a/ampd/proto/axelar/multisig/v1beta1/types.proto b/ampd/proto/axelar/multisig/v1beta1/types.proto deleted file mode 100644 index fe32c3da6..000000000 --- a/ampd/proto/axelar/multisig/v1beta1/types.proto +++ /dev/null @@ -1,84 +0,0 @@ -syntax = "proto3"; -package axelar.multisig.v1beta1; - -option go_package = "github.com/axelarnetwork/axelar-core/x/multisig/types"; - -import "google/protobuf/any.proto"; -import "gogoproto/gogo.proto"; -import "cosmos_proto/cosmos.proto"; -import "axelar/utils/v1beta1/threshold.proto"; -import "axelar/snapshot/exported/v1beta1/types.proto"; -import "axelar/multisig/exported/v1beta1/types.proto"; - -message Key { - option (gogoproto.stable_marshaler) = true; - - string id = 1 [ - (gogoproto.customname) = "ID", - (gogoproto.casttype) = - "github.com/axelarnetwork/axelar-core/x/multisig/exported.KeyID" - ]; - snapshot.exported.v1beta1.Snapshot snapshot = 2 - [ (gogoproto.nullable) = false ]; - map pub_keys = 3 [ - (gogoproto.castvalue) = - "github.com/axelarnetwork/axelar-core/x/multisig/exported.PublicKey" - ]; - utils.v1beta1.Threshold signing_threshold = 4 - [ (gogoproto.nullable) = false ]; - multisig.exported.v1beta1.KeyState state = 5; -} - -message KeygenSession { - option (gogoproto.stable_marshaler) = true; - - Key key = 1 [ (gogoproto.nullable) = false ]; - multisig.exported.v1beta1.MultisigState state = 2; - utils.v1beta1.Threshold keygen_threshold = 3 [ (gogoproto.nullable) = false ]; - int64 expires_at = 4; - int64 completed_at = 5; - map is_pub_key_received = 6; - int64 grace_period = 7; -} - -message MultiSig { - option (gogoproto.stable_marshaler) = true; - - string key_id = 1 [ - (gogoproto.customname) = "KeyID", - (gogoproto.casttype) = - "github.com/axelarnetwork/axelar-core/x/multisig/exported.KeyID" - ]; - bytes payload_hash = 2 - [ (gogoproto.casttype) = - "github.com/axelarnetwork/axelar-core/x/multisig/exported.Hash" ]; - map sigs = 3 [ (gogoproto.castvalue) = "Signature" ]; -} - -message SigningSession { - option (gogoproto.stable_marshaler) = true; - - uint64 id = 1 [ (gogoproto.customname) = "ID" ]; - MultiSig multi_sig = 2 [ (gogoproto.nullable) = false ]; - multisig.exported.v1beta1.MultisigState state = 3; - Key key = 4 [ (gogoproto.nullable) = false ]; - int64 expires_at = 5; - int64 completed_at = 6; - int64 grace_period = 7; - string module = 8; - google.protobuf.Any module_metadata = 9 - [ (cosmos_proto.accepts_interface) = - "github.com/cosmos/codec/ProtoMarshaler" ]; -} - -message KeyEpoch { - uint64 epoch = 1; - string chain = 2 - [ (gogoproto.casttype) = - "github.com/axelarnetwork/axelar-core/x/nexus/exported.ChainName" ]; - string key_id = 3 [ - (gogoproto.customname) = "KeyID", - (gogoproto.casttype) = - "github.com/axelarnetwork/axelar-core/x/multisig/exported.KeyID" - ]; -} diff --git a/ampd/proto/axelar/nexus/exported/v1beta1/types.proto b/ampd/proto/axelar/nexus/exported/v1beta1/types.proto deleted file mode 100644 index f108c119f..000000000 --- a/ampd/proto/axelar/nexus/exported/v1beta1/types.proto +++ /dev/null @@ -1,129 +0,0 @@ -syntax = "proto3"; -package axelar.nexus.exported.v1beta1; - -option go_package = "github.com/axelarnetwork/axelar-core/x/nexus/exported"; - -import "gogoproto/gogo.proto"; -import "cosmos/base/v1beta1/coin.proto"; -import "axelar/tss/exported/v1beta1/types.proto"; - -option (gogoproto.goproto_getters_all) = false; - -// Chain represents the properties of a registered blockchain -message Chain { - reserved 2; // native_asset was removed in 0.14 - - string name = 1 [ (gogoproto.casttype) = "ChainName" ]; - bool supports_foreign_assets = 3; - tss.exported.v1beta1.KeyType key_type = 4; - string module = 5; -} - -// CrossChainAddress represents a generalized address on any registered chain -message CrossChainAddress { - Chain chain = 1 [ (gogoproto.nullable) = false ]; - string address = 2; -} - -// CrossChainTransfer represents a generalized transfer of some asset to a -// registered blockchain -message CrossChainTransfer { - CrossChainAddress recipient = 1 [ (gogoproto.nullable) = false ]; - cosmos.base.v1beta1.Coin asset = 2 [ (gogoproto.nullable) = false ]; - uint64 id = 3 - [ (gogoproto.customname) = "ID", (gogoproto.casttype) = "TransferID" ]; - TransferState state = 4; -} - -enum TransferState { - option (gogoproto.goproto_enum_prefix) = false; - option (gogoproto.goproto_enum_stringer) = true; - - TRANSFER_STATE_UNSPECIFIED = 0; - TRANSFER_STATE_PENDING = 1 [ (gogoproto.enumvalue_customname) = "Pending" ]; - TRANSFER_STATE_ARCHIVED = 2 [ (gogoproto.enumvalue_customname) = "Archived" ]; - TRANSFER_STATE_INSUFFICIENT_AMOUNT = 3 - [ (gogoproto.enumvalue_customname) = "InsufficientAmount" ]; -} - -// TransferFee represents accumulated fees generated by the network -message TransferFee { - repeated cosmos.base.v1beta1.Coin coins = 1 [ - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", - (gogoproto.nullable) = false - ]; -} - -message FeeInfo { - string chain = 1 [ (gogoproto.casttype) = "ChainName" ]; - string asset = 2; - bytes fee_rate = 3 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - bytes min_fee = 4 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.nullable) = false - ]; - bytes max_fee = 5 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.nullable) = false - ]; -} - -message Asset { - string denom = 1; - reserved 2; // min_amount was removed in v0.15 - bool is_native_asset = 3; -} - -enum TransferDirection { - option (gogoproto.goproto_enum_prefix) = false; - - TRANSFER_DIRECTION_UNSPECIFIED = 0 - [ (gogoproto.enumvalue_customname) = "Unspecified" ]; - TRANSFER_DIRECTION_FROM = 1 - [ (gogoproto.enumvalue_customname) = "TransferDirectionFrom" ]; - TRANSFER_DIRECTION_TO = 2 - [ (gogoproto.enumvalue_customname) = "TransferDirectionTo" ]; -} - -message GeneralMessage { - enum Status { - option (gogoproto.goproto_enum_prefix) = false; - option (gogoproto.goproto_enum_stringer) = true; - - STATUS_UNSPECIFIED = 0 [ (gogoproto.enumvalue_customname) = "NonExistent" ]; - STATUS_APPROVED = 1 [ (gogoproto.enumvalue_customname) = "Approved" ]; - STATUS_PROCESSING = 2 [ (gogoproto.enumvalue_customname) = "Processing" ]; - STATUS_EXECUTED = 3 [ (gogoproto.enumvalue_customname) = "Executed" ]; - STATUS_FAILED = 4 [ (gogoproto.enumvalue_customname) = "Failed" ]; - } - - string id = 1 [ (gogoproto.customname) = "ID" ]; - CrossChainAddress sender = 2 [ (gogoproto.nullable) = false ]; - CrossChainAddress recipient = 3 [ (gogoproto.nullable) = false ]; - bytes payload_hash = 4; - Status status = 5; - cosmos.base.v1beta1.Coin asset = 6; - bytes source_tx_id = 7 [ (gogoproto.customname) = "SourceTxID" ]; - uint64 source_tx_index = 8; -} - -message WasmMessage { - string source_chain = 1 [ (gogoproto.casttype) = "ChainName" ]; - string source_address = 2; - string destination_chain = 3 [ (gogoproto.casttype) = "ChainName" ]; - string destination_address = 4; - bytes payload_hash = 5 [ (gogoproto.casttype) = "WasmBytes" ]; - bytes source_tx_id = 6 [ - (gogoproto.customname) = "SourceTxID", - (gogoproto.casttype) = "WasmBytes" - ]; - uint64 source_tx_index = 7 [ (gogoproto.jsontag) = "source_tx_index" ]; - bytes sender = 8 [ (gogoproto.casttype) = - "github.com/cosmos/cosmos-sdk/types.AccAddress" ]; - string id = 9 [ - (gogoproto.customname) = "ID" - ]; -} diff --git a/ampd/proto/axelar/nexus/v1beta1/events.proto b/ampd/proto/axelar/nexus/v1beta1/events.proto deleted file mode 100644 index 7ec5ec829..000000000 --- a/ampd/proto/axelar/nexus/v1beta1/events.proto +++ /dev/null @@ -1,66 +0,0 @@ -syntax = "proto3"; -package axelar.nexus.v1beta1; - -option go_package = "github.com/axelarnetwork/axelar-core/x/nexus/types"; -option (gogoproto.messagename_all) = true; - -import "google/protobuf/duration.proto"; -import "gogoproto/gogo.proto"; -import "cosmos/base/v1beta1/coin.proto"; -import "axelar/nexus/exported/v1beta1/types.proto"; - -message FeeDeducted { - uint64 transfer_id = 1 [ - (gogoproto.customname) = "TransferID", - (gogoproto.casttype) = - "github.com/axelarnetwork/axelar-core/x/nexus/exported.TransferID" - ]; - string recipient_chain = 2 - [ (gogoproto.casttype) = - "github.com/axelarnetwork/axelar-core/x/nexus/exported.ChainName" ]; - string recipient_address = 3; - cosmos.base.v1beta1.Coin amount = 4 [ (gogoproto.nullable) = false ]; - cosmos.base.v1beta1.Coin fee = 5 [ (gogoproto.nullable) = false ]; -} - -message InsufficientFee { - uint64 transfer_id = 1 [ - (gogoproto.customname) = "TransferID", - (gogoproto.casttype) = - "github.com/axelarnetwork/axelar-core/x/nexus/exported.TransferID" - ]; - string recipient_chain = 2 - [ (gogoproto.casttype) = - "github.com/axelarnetwork/axelar-core/x/nexus/exported.ChainName" ]; - string recipient_address = 3; - cosmos.base.v1beta1.Coin amount = 4 [ (gogoproto.nullable) = false ]; - cosmos.base.v1beta1.Coin fee = 5 [ (gogoproto.nullable) = false ]; -} - -message RateLimitUpdated { - string chain = 1 - [ (gogoproto.casttype) = - "github.com/axelarnetwork/axelar-core/x/nexus/exported.ChainName" ]; - cosmos.base.v1beta1.Coin limit = 2 [ (gogoproto.nullable) = false ]; - google.protobuf.Duration window = 3 - [ (gogoproto.stdduration) = true, (gogoproto.nullable) = false ]; -} - -message MessageReceived { - string id = 1 [ (gogoproto.customname) = "ID" ]; - bytes payload_hash = 2; - exported.v1beta1.CrossChainAddress sender = 3 - [ (gogoproto.nullable) = false ]; - exported.v1beta1.CrossChainAddress recipient = 4 - [ (gogoproto.nullable) = false ]; -} - -message MessageProcessing { string id = 1 [ (gogoproto.customname) = "ID" ]; } - -message MessageExecuted { string id = 1 [ (gogoproto.customname) = "ID" ]; } - -message MessageFailed { string id = 1 [ (gogoproto.customname) = "ID" ]; } - -message WasmMessageRouted { - exported.v1beta1.WasmMessage message = 1 [ (gogoproto.nullable) = false ]; -} diff --git a/ampd/proto/axelar/nexus/v1beta1/genesis.proto b/ampd/proto/axelar/nexus/v1beta1/genesis.proto deleted file mode 100644 index 78011ebd7..000000000 --- a/ampd/proto/axelar/nexus/v1beta1/genesis.proto +++ /dev/null @@ -1,32 +0,0 @@ -syntax = "proto3"; -package axelar.nexus.v1beta1; -option go_package = "github.com/axelarnetwork/axelar-core/x/nexus/types"; - -import "gogoproto/gogo.proto"; -import "axelar/nexus/v1beta1/params.proto"; -import "axelar/nexus/exported/v1beta1/types.proto"; -import "axelar/nexus/v1beta1/types.proto"; - -option (gogoproto.goproto_getters_all) = false; - -// GenesisState represents the genesis state -message GenesisState { - Params params = 1 [ (gogoproto.nullable) = false ]; - - uint64 nonce = 2; - repeated nexus.exported.v1beta1.Chain chains = 3 - [ (gogoproto.nullable) = false ]; - repeated ChainState chain_states = 4 [ (gogoproto.nullable) = false ]; - repeated LinkedAddresses linked_addresses = 5 - [ (gogoproto.nullable) = false ]; - repeated nexus.exported.v1beta1.CrossChainTransfer transfers = 6 - [ (gogoproto.nullable) = false ]; - nexus.exported.v1beta1.TransferFee fee = 7 [ (gogoproto.nullable) = false ]; - repeated nexus.exported.v1beta1.FeeInfo fee_infos = 8 - [ (gogoproto.nullable) = false ]; - repeated RateLimit rate_limits = 9 [ (gogoproto.nullable) = false ]; - repeated TransferEpoch transfer_epochs = 10 [ (gogoproto.nullable) = false ]; - repeated nexus.exported.v1beta1.GeneralMessage messages = 11 - [ (gogoproto.nullable) = false ]; - uint64 message_nonce = 12; -} diff --git a/ampd/proto/axelar/nexus/v1beta1/params.proto b/ampd/proto/axelar/nexus/v1beta1/params.proto deleted file mode 100644 index 30c9074fa..000000000 --- a/ampd/proto/axelar/nexus/v1beta1/params.proto +++ /dev/null @@ -1,22 +0,0 @@ -syntax = "proto3"; -package axelar.nexus.v1beta1; -option go_package = "github.com/axelarnetwork/axelar-core/x/nexus/types"; - -import "gogoproto/gogo.proto"; -import "axelar/utils/v1beta1/threshold.proto"; - -option (gogoproto.goproto_getters_all) = false; - -// Params represent the genesis parameters for the module -message Params { - utils.v1beta1.Threshold chain_activation_threshold = 1 - [ (gogoproto.nullable) = false ]; - utils.v1beta1.Threshold chain_maintainer_missing_vote_threshold = 2 - [ (gogoproto.nullable) = false ]; - utils.v1beta1.Threshold chain_maintainer_incorrect_vote_threshold = 3 - [ (gogoproto.nullable) = false ]; - int32 chain_maintainer_check_window = 4; - bytes gateway = 5 [ (gogoproto.casttype) = - "github.com/cosmos/cosmos-sdk/types.AccAddress" ]; - uint64 end_blocker_limit = 6; -} diff --git a/ampd/proto/axelar/nexus/v1beta1/query.proto b/ampd/proto/axelar/nexus/v1beta1/query.proto deleted file mode 100644 index b6371f4a8..000000000 --- a/ampd/proto/axelar/nexus/v1beta1/query.proto +++ /dev/null @@ -1,175 +0,0 @@ -syntax = "proto3"; -package axelar.nexus.v1beta1; - -option go_package = "github.com/axelarnetwork/axelar-core/x/nexus/types"; - -import "google/protobuf/duration.proto"; -import "gogoproto/gogo.proto"; -import "axelar/nexus/exported/v1beta1/types.proto"; -import "axelar/nexus/v1beta1/types.proto"; -import "cosmos/base/query/v1beta1/pagination.proto"; -import "cosmos/base/v1beta1/coin.proto"; -import "axelar/nexus/v1beta1/params.proto"; - -option (gogoproto.goproto_getters_all) = false; - -// ChainMaintainersRequest represents a message that queries -// the chain maintainers for the specified chain -message ChainMaintainersRequest { string chain = 1; } - -message ChainMaintainersResponse { - repeated bytes maintainers = 1 - [ (gogoproto.casttype) = - "github.com/cosmos/cosmos-sdk/types.ValAddress" ]; -} - -// LatestDepositAddressRequest represents a message that queries a deposit -// address by recipient address -message LatestDepositAddressRequest { - string recipient_addr = 1; - string recipient_chain = 2; - string deposit_chain = 3; -} - -message LatestDepositAddressResponse { string deposit_addr = 1; }; - -// TransfersForChainRequest represents a message that queries the -// transfers for the specified chain -message TransfersForChainRequest { - string chain = 1; - exported.v1beta1.TransferState state = 2; - cosmos.base.query.v1beta1.PageRequest pagination = 3; -} - -message TransfersForChainResponse { - repeated exported.v1beta1.CrossChainTransfer transfers = 1 - [ (gogoproto.nullable) = false ]; - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -// FeeInfoRequest represents a message that queries the transfer fees associated -// to an asset on a chain -message FeeInfoRequest { - string chain = 1; - string asset = 2; -} - -message FeeInfoResponse { exported.v1beta1.FeeInfo fee_info = 1; } - -// TransferFeeRequest represents a message that queries the fees charged by -// the network for a cross-chain transfer -message TransferFeeRequest { - string source_chain = 1; - string destination_chain = 2; - string amount = 3; -} - -message TransferFeeResponse { - cosmos.base.v1beta1.Coin fee = 1 [ (gogoproto.nullable) = false ]; -} - -enum ChainStatus { - option (gogoproto.goproto_enum_prefix) = false; - - CHAIN_STATUS_UNSPECIFIED = 0 - [ (gogoproto.enumvalue_customname) = "Unspecified" ]; - CHAIN_STATUS_ACTIVATED = 1 [ (gogoproto.enumvalue_customname) = "Activated" ]; - CHAIN_STATUS_DEACTIVATED = 2 - [ (gogoproto.enumvalue_customname) = "Deactivated" ]; -} - -// ChainsRequest represents a message that queries the chains -// registered on the network -message ChainsRequest { ChainStatus status = 1; } - -message ChainsResponse { - repeated string chains = 1 - [ (gogoproto.casttype) = - "github.com/axelarnetwork/axelar-core/x/nexus/exported.ChainName" ]; -} - -// AssetsRequest represents a message that queries the registered assets of a -// chain -message AssetsRequest { string chain = 1; } - -message AssetsResponse { repeated string assets = 1; } - -// ChainStateRequest represents a message that queries the state of a chain -// registered on the network -message ChainStateRequest { string chain = 1; } - -message ChainStateResponse { - ChainState state = 1 [ (gogoproto.nullable) = false ]; -} - -// ChainsByAssetRequest represents a message that queries the chains -// that support an asset on the network -message ChainsByAssetRequest { string asset = 1; } - -message ChainsByAssetResponse { - repeated string chains = 1 - [ (gogoproto.casttype) = - "github.com/axelarnetwork/axelar-core/x/nexus/exported.ChainName" ]; -} - -// RecipientAddressRequest represents a message that queries the registered -// recipient address for a given deposit address -message RecipientAddressRequest { - string deposit_addr = 1; - string deposit_chain = 2; -} - -message RecipientAddressResponse { - string recipient_addr = 1; - string recipient_chain = 2; -}; - -// TransferRateLimitRequest represents a message that queries the registered -// transfer rate limit and current transfer amounts for a given chain and asset -message TransferRateLimitRequest { - string chain = 1; - string asset = 2; -} - -message TransferRateLimitResponse { TransferRateLimit transfer_rate_limit = 1; } - -message TransferRateLimit { - bytes limit = 1 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.nullable) = false - ]; - google.protobuf.Duration window = 2 - [ (gogoproto.stdduration) = true, (gogoproto.nullable) = false ]; - bytes incoming = 3 [ - deprecated = true, - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.nullable) = false - ]; - bytes outgoing = 4 [ - deprecated = true, - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.nullable) = false - ]; - // time_left indicates the time left in the rate limit window - google.protobuf.Duration time_left = 5 - [ (gogoproto.stdduration) = true, (gogoproto.nullable) = false ]; - bytes from = 6 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.nullable) = false - ]; - bytes to = 7 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.nullable) = false - ]; -} - -message MessageRequest { string id = 1 [ (gogoproto.customname) = "ID" ]; } - -message MessageResponse { - exported.v1beta1.GeneralMessage message = 1 [ (gogoproto.nullable) = false ]; -} - -// ParamsRequest represents a message that queries the params -message ParamsRequest {} - -message ParamsResponse { Params params = 1 [ (gogoproto.nullable) = false ]; } diff --git a/ampd/proto/axelar/nexus/v1beta1/service.proto b/ampd/proto/axelar/nexus/v1beta1/service.proto deleted file mode 100644 index 881d2a4d7..000000000 --- a/ampd/proto/axelar/nexus/v1beta1/service.proto +++ /dev/null @@ -1,150 +0,0 @@ -syntax = "proto3"; -package axelar.nexus.v1beta1; - -option go_package = "github.com/axelarnetwork/axelar-core/x/nexus/types"; - -import "gogoproto/gogo.proto"; -import "google/api/annotations.proto"; -import "axelar/nexus/v1beta1/tx.proto"; -import "axelar/nexus/v1beta1/query.proto"; - -option (gogoproto.goproto_registration) = true; - -// Msg defines the nexus Msg service. -service MsgService { - rpc RegisterChainMaintainer(RegisterChainMaintainerRequest) - returns (RegisterChainMaintainerResponse) { - option (google.api.http) = { - post : "/axelar/nexus/register_chain_maintainer" - body : "*" - }; - } - - rpc DeregisterChainMaintainer(DeregisterChainMaintainerRequest) - returns (DeregisterChainMaintainerResponse) { - option (google.api.http) = { - post : "/axelar/nexus/deregister_chain_maintainer" - body : "*" - }; - } - - rpc ActivateChain(ActivateChainRequest) returns (ActivateChainResponse) { - option (google.api.http) = { - post : "/axelar/nexus/activate_chain" - body : "*" - }; - } - - rpc DeactivateChain(axelar.nexus.v1beta1.DeactivateChainRequest) - returns (axelar.nexus.v1beta1.DeactivateChainResponse) { - option (google.api.http) = { - post : "/axelar/nexus/deactivate_chain" - body : "*" - }; - } - - rpc RegisterAssetFee(RegisterAssetFeeRequest) - returns (RegisterAssetFeeResponse) { - option (google.api.http) = { - post : "/axelar/nexus/register_asset_fee" - body : "*" - }; - } - - rpc SetTransferRateLimit(SetTransferRateLimitRequest) - returns (SetTransferRateLimitResponse) { - option (google.api.http) = { - post : "/axelar/nexus/set_transfer_rate_limit" - body : "*" - }; - } -} - -// QueryService defines the gRPC querier service. -service QueryService { - // LatestDepositAddress queries the a deposit address by recipient - rpc LatestDepositAddress(LatestDepositAddressRequest) - returns (LatestDepositAddressResponse) { - option (google.api.http).get = - "/axelar/nexus/v1beta1/latest_deposit_address/" - "{recipient_addr}/{recipient_chain}/{deposit_chain}"; - } - - // TransfersForChain queries transfers by chain - rpc TransfersForChain(TransfersForChainRequest) - returns (TransfersForChainResponse) { - option (google.api.http).get = - "/axelar/nexus/v1beta1/transfers_for_chain/{chain}/{state}"; - } - - // FeeInfo queries the fee info by chain and asset - rpc FeeInfo(FeeInfoRequest) returns (FeeInfoResponse) { - option (google.api.http) = { - get : "/axelar/nexus/v1beta1/fee_info/{chain}/{asset}" - additional_bindings : {get : "/axelar/nexus/v1beta1/fee"} - }; - } - - // TransferFee queries the transfer fee by the source, destination chain, - // and amount. If amount is 0, the min fee is returned - rpc TransferFee(TransferFeeRequest) returns (TransferFeeResponse) { - option (google.api.http) = { - get : "/axelar/nexus/v1beta1/transfer_fee/{source_chain}/" - "{destination_chain}/{amount}" - additional_bindings : {get : "/axelar/nexus/v1beta1/transfer_fee"} - }; - } - - // Chains queries the chains registered on the network - rpc Chains(ChainsRequest) returns (ChainsResponse) { - option (google.api.http).get = "/axelar/nexus/v1beta1/chains"; - } - - // Assets queries the assets registered for a chain - rpc Assets(AssetsRequest) returns (AssetsResponse) { - option (google.api.http).get = "/axelar/nexus/v1beta1/assets/{chain}"; - } - - // ChainState queries the state of a registered chain on the network - rpc ChainState(ChainStateRequest) returns (ChainStateResponse) { - option (google.api.http).get = "/axelar/nexus/v1beta1/chain_state/{chain}"; - } - - // ChainsByAsset queries the chains that support an asset on the network - rpc ChainsByAsset(ChainsByAssetRequest) returns (ChainsByAssetResponse) { - option (google.api.http).get = - "/axelar/nexus/v1beta1/chains_by_asset/{asset}"; - } - - // RecipientAddress queries the recipient address for a given deposit address - rpc RecipientAddress(RecipientAddressRequest) - returns (RecipientAddressResponse) { - option (google.api.http).get = "/axelar/nexus/v1beta1/recipient_address/" - "{deposit_chain}/{deposit_addr}"; - } - - // ChainMaintainers queries the chain maintainers for a given chain - rpc ChainMaintainers(ChainMaintainersRequest) - returns (ChainMaintainersResponse) { - option (google.api.http).get = - "/axelar/nexus/v1beta1/chain_maintainers/{chain}"; - } - - // TransferRateLimit queries the transfer rate limit for a given chain and - // asset. If a rate limit is not set, nil is returned. - rpc TransferRateLimit(TransferRateLimitRequest) - returns (TransferRateLimitResponse) { - option (google.api.http).get = "/axelar/nexus/v1beta1/transfer_rate_limit/" - "{chain}/{asset}"; - } - - rpc Message(MessageRequest) returns (MessageResponse) { - option (google.api.http).get = "/axelar/nexus/v1beta1/message"; - } - - rpc Params(ParamsRequest) returns (ParamsResponse) { - option (google.api.http) = { - get : "/axelar/nexus/v1beta1/params" - }; - } -} diff --git a/ampd/proto/axelar/nexus/v1beta1/tx.proto b/ampd/proto/axelar/nexus/v1beta1/tx.proto deleted file mode 100644 index 555930043..000000000 --- a/ampd/proto/axelar/nexus/v1beta1/tx.proto +++ /dev/null @@ -1,87 +0,0 @@ -syntax = "proto3"; -package axelar.nexus.v1beta1; - -option go_package = "github.com/axelarnetwork/axelar-core/x/nexus/types"; - -import "google/api/annotations.proto"; -import "google/protobuf/duration.proto"; -import "gogoproto/gogo.proto"; -import "cosmos/base/v1beta1/coin.proto"; -import "axelar/nexus/exported/v1beta1/types.proto"; -import "axelar/permission/exported/v1beta1/types.proto"; - -option (gogoproto.goproto_getters_all) = false; - -message RegisterChainMaintainerRequest { - option (permission.exported.v1beta1.permission_role) = ROLE_UNRESTRICTED; - bytes sender = 1 [ (gogoproto.casttype) = - "github.com/cosmos/cosmos-sdk/types.AccAddress" ]; - repeated string chains = 2 - [ (gogoproto.casttype) = - "github.com/axelarnetwork/axelar-core/x/nexus/exported.ChainName" ]; -} - -message RegisterChainMaintainerResponse {} - -message DeregisterChainMaintainerRequest { - option (permission.exported.v1beta1.permission_role) = ROLE_UNRESTRICTED; - bytes sender = 1 [ (gogoproto.casttype) = - "github.com/cosmos/cosmos-sdk/types.AccAddress" ]; - repeated string chains = 2 - [ (gogoproto.casttype) = - "github.com/axelarnetwork/axelar-core/x/nexus/exported.ChainName" ]; -} - -message DeregisterChainMaintainerResponse {} - -// ActivateChainRequest represents a message to activate chains -message ActivateChainRequest { - option (permission.exported.v1beta1.permission_role) = ROLE_ACCESS_CONTROL; - bytes sender = 1 [ (gogoproto.casttype) = - "github.com/cosmos/cosmos-sdk/types.AccAddress" ]; - repeated string chains = 2 - [ (gogoproto.casttype) = - "github.com/axelarnetwork/axelar-core/x/nexus/exported.ChainName" ]; -} - -message ActivateChainResponse {} - -// DeactivateChainRequest represents a message to deactivate chains -message DeactivateChainRequest { - option (permission.exported.v1beta1.permission_role) = ROLE_ACCESS_CONTROL; - bytes sender = 1 [ (gogoproto.casttype) = - "github.com/cosmos/cosmos-sdk/types.AccAddress" ]; - repeated string chains = 2 - [ (gogoproto.casttype) = - "github.com/axelarnetwork/axelar-core/x/nexus/exported.ChainName" ]; -} - -message DeactivateChainResponse {} - -// RegisterAssetFeeRequest represents a message to register the transfer fee -// info associated to an asset on a chain -message RegisterAssetFeeRequest { - option (permission.exported.v1beta1.permission_role) = ROLE_CHAIN_MANAGEMENT; - bytes sender = 1 [ (gogoproto.casttype) = - "github.com/cosmos/cosmos-sdk/types.AccAddress" ]; - nexus.exported.v1beta1.FeeInfo fee_info = 2 [ (gogoproto.nullable) = false ]; -} - -message RegisterAssetFeeResponse {} - -// SetTransferRateLimitRequest represents a message to set rate limits on -// transfers -message SetTransferRateLimitRequest { - option (permission.exported.v1beta1.permission_role) = ROLE_ACCESS_CONTROL; - - bytes sender = 1 [ (gogoproto.casttype) = - "github.com/cosmos/cosmos-sdk/types.AccAddress" ]; - string chain = 2 - [ (gogoproto.casttype) = - "github.com/axelarnetwork/axelar-core/x/nexus/exported.ChainName" ]; - cosmos.base.v1beta1.Coin limit = 3 [ (gogoproto.nullable) = false ]; - google.protobuf.Duration window = 4 - [ (gogoproto.stdduration) = true, (gogoproto.nullable) = false ]; -} - -message SetTransferRateLimitResponse {} diff --git a/ampd/proto/axelar/nexus/v1beta1/types.proto b/ampd/proto/axelar/nexus/v1beta1/types.proto deleted file mode 100644 index 14503683f..000000000 --- a/ampd/proto/axelar/nexus/v1beta1/types.proto +++ /dev/null @@ -1,65 +0,0 @@ -syntax = "proto3"; -package axelar.nexus.v1beta1; - -option go_package = "github.com/axelarnetwork/axelar-core/x/nexus/types"; - -import "google/protobuf/duration.proto"; -import "gogoproto/gogo.proto"; -import "cosmos/base/v1beta1/coin.proto"; -import "axelar/nexus/exported/v1beta1/types.proto"; -import "axelar/utils/v1beta1/bitmap.proto"; - -option (gogoproto.goproto_getters_all) = false; - -message MaintainerState { - bytes address = 1 [ (gogoproto.casttype) = - "github.com/cosmos/cosmos-sdk/types.ValAddress" ]; - axelar.utils.v1beta1.Bitmap missing_votes = 2 - [ (gogoproto.nullable) = false ]; - axelar.utils.v1beta1.Bitmap incorrect_votes = 3 - [ (gogoproto.nullable) = false ]; - string chain = 4 - [ (gogoproto.casttype) = - "github.com/axelarnetwork/axelar-core/x/nexus/exported.ChainName" ]; -} - -// ChainState represents the state of a registered blockchain -message ChainState { - reserved 4; // total was removed in v0.13 - reserved 2; // maintainers was removed in v0.24 - - axelar.nexus.exported.v1beta1.Chain chain = 1 - [ (gogoproto.nullable) = false ]; - bool activated = 3; - repeated axelar.nexus.exported.v1beta1.Asset assets = 5 - [ (gogoproto.nullable) = false ]; - repeated MaintainerState maintainer_states = 6 - [ (gogoproto.nullable) = false, deprecated = true ]; -} - -message LinkedAddresses { - axelar.nexus.exported.v1beta1.CrossChainAddress deposit_address = 1 - [ (gogoproto.nullable) = false ]; - axelar.nexus.exported.v1beta1.CrossChainAddress recipient_address = 2 - [ (gogoproto.nullable) = false ]; -} - -message RateLimit { - string chain = 1 - [ (gogoproto.casttype) = - "github.com/axelarnetwork/axelar-core/x/nexus/exported.ChainName" ]; - cosmos.base.v1beta1.Coin limit = 2 [ (gogoproto.nullable) = false ]; - google.protobuf.Duration window = 3 - [ (gogoproto.stdduration) = true, (gogoproto.nullable) = false ]; -} - -message TransferEpoch { - string chain = 1 - [ (gogoproto.casttype) = - "github.com/axelarnetwork/axelar-core/x/nexus/exported.ChainName" ]; - cosmos.base.v1beta1.Coin amount = 2 [ (gogoproto.nullable) = false ]; - uint64 epoch = 3; - axelar.nexus.exported.v1beta1.TransferDirection direction = - 4; // indicates whether the rate tracking is for transfers going - // to that chain or coming from it -} diff --git a/ampd/proto/axelar/permission/exported/v1beta1/types.proto b/ampd/proto/axelar/permission/exported/v1beta1/types.proto deleted file mode 100644 index 7251daa8e..000000000 --- a/ampd/proto/axelar/permission/exported/v1beta1/types.proto +++ /dev/null @@ -1,24 +0,0 @@ -syntax = "proto3"; -package axelar.permission.exported.v1beta1; - -option go_package = "github.com/axelarnetwork/axelar-core/x/permission/exported"; - -import "gogoproto/gogo.proto"; -import "google/protobuf/descriptor.proto"; - -option (gogoproto.goproto_getters_all) = false; - -enum Role { - option (gogoproto.goproto_enum_prefix) = false; - option (gogoproto.goproto_enum_stringer) = true; - - ROLE_UNSPECIFIED = 0; - ROLE_UNRESTRICTED = 1; - ROLE_CHAIN_MANAGEMENT = 2; - ROLE_ACCESS_CONTROL = 3; -} - -extend google.protobuf.MessageOptions { - permission.exported.v1beta1.Role permission_role = - 50000; // 50000-99999 reserved for use withing individual organizations -} diff --git a/ampd/proto/axelar/permission/v1beta1/genesis.proto b/ampd/proto/axelar/permission/v1beta1/genesis.proto deleted file mode 100644 index 7eef9a82e..000000000 --- a/ampd/proto/axelar/permission/v1beta1/genesis.proto +++ /dev/null @@ -1,19 +0,0 @@ -syntax = "proto3"; -package axelar.permission.v1beta1; - -option go_package = "github.com/axelarnetwork/axelar-core/x/permission/types"; - -import "gogoproto/gogo.proto"; -import "cosmos/crypto/multisig/keys.proto"; -import "axelar/permission/v1beta1/types.proto"; -import "axelar/permission/v1beta1/params.proto"; - -option (gogoproto.goproto_getters_all) = false; - -// GenesisState represents the genesis state -message GenesisState { - Params params = 1 [ (gogoproto.nullable) = false ]; - - cosmos.crypto.multisig.LegacyAminoPubKey governance_key = 2; - repeated GovAccount gov_accounts = 3 [ (gogoproto.nullable) = false ]; -} diff --git a/ampd/proto/axelar/permission/v1beta1/params.proto b/ampd/proto/axelar/permission/v1beta1/params.proto deleted file mode 100644 index 232900e1b..000000000 --- a/ampd/proto/axelar/permission/v1beta1/params.proto +++ /dev/null @@ -1,10 +0,0 @@ -syntax = "proto3"; -package axelar.permission.v1beta1; -option go_package = "github.com/axelarnetwork/axelar-core/x/permission/types"; - -import "gogoproto/gogo.proto"; - -option (gogoproto.goproto_getters_all) = false; - -// Params represent the genesis parameters for the module -message Params {} diff --git a/ampd/proto/axelar/permission/v1beta1/query.proto b/ampd/proto/axelar/permission/v1beta1/query.proto deleted file mode 100644 index 997d72a8a..000000000 --- a/ampd/proto/axelar/permission/v1beta1/query.proto +++ /dev/null @@ -1,27 +0,0 @@ -syntax = "proto3"; -package axelar.permission.v1beta1; - -option go_package = "github.com/axelarnetwork/axelar-core/x/permission/types"; - -import "gogoproto/gogo.proto"; -import "google/protobuf/timestamp.proto"; -import "cosmos/crypto/multisig/keys.proto"; -import "axelar/permission/v1beta1/params.proto"; - -option (gogoproto.goproto_getters_all) = false; - -// QueryGovernanceKeyRequest is the request type for the -// Query/GovernanceKey RPC method -message QueryGovernanceKeyRequest {} - -// QueryGovernanceKeyResponse is the response type for the -// Query/GovernanceKey RPC method -message QueryGovernanceKeyResponse { - cosmos.crypto.multisig.LegacyAminoPubKey governance_key = 1 - [ (gogoproto.nullable) = false ]; -} - -// ParamsRequest represents a message that queries the params -message ParamsRequest {} - -message ParamsResponse { Params params = 1 [ (gogoproto.nullable) = false ]; } diff --git a/ampd/proto/axelar/permission/v1beta1/service.proto b/ampd/proto/axelar/permission/v1beta1/service.proto deleted file mode 100644 index 02767573f..000000000 --- a/ampd/proto/axelar/permission/v1beta1/service.proto +++ /dev/null @@ -1,54 +0,0 @@ -syntax = "proto3"; -package axelar.permission.v1beta1; - -option go_package = "github.com/axelarnetwork/axelar-core/x/permission/types"; - -import "gogoproto/gogo.proto"; -import "google/api/annotations.proto"; -import "axelar/permission/v1beta1/tx.proto"; -import "axelar/permission/v1beta1/query.proto"; - -option (gogoproto.goproto_registration) = true; - -// Msg defines the gov Msg service. -service Msg { - rpc RegisterController(axelar.permission.v1beta1.RegisterControllerRequest) - returns (axelar.permission.v1beta1.RegisterControllerResponse) { - option (google.api.http) = { - post : "/axelar/permission/register_controller" - body : "*" - }; - } - - rpc DeregisterController( - axelar.permission.v1beta1.DeregisterControllerRequest) - returns (axelar.permission.v1beta1.DeregisterControllerResponse) { - option (google.api.http) = { - post : "/axelar/permission/deregister_controller" - body : "*" - }; - } - - rpc UpdateGovernanceKey(axelar.permission.v1beta1.UpdateGovernanceKeyRequest) - returns (axelar.permission.v1beta1.UpdateGovernanceKeyResponse) { - option (google.api.http) = { - post : "/axelar/permission/update_governance_key" - body : "*" - }; - } -} - -// Query defines the gRPC querier service. -service Query { - // GovernanceKey returns the multisig governance key - rpc GovernanceKey(QueryGovernanceKeyRequest) - returns (QueryGovernanceKeyResponse) { - option (google.api.http).get = "/axelar/permission/v1beta1/governance_key"; - } - - rpc Params(ParamsRequest) returns (ParamsResponse) { - option (google.api.http) = { - get : "/axelar/permission/v1beta1/params" - }; - } -} diff --git a/ampd/proto/axelar/permission/v1beta1/tx.proto b/ampd/proto/axelar/permission/v1beta1/tx.proto deleted file mode 100644 index c06b467f3..000000000 --- a/ampd/proto/axelar/permission/v1beta1/tx.proto +++ /dev/null @@ -1,41 +0,0 @@ -syntax = "proto3"; -package axelar.permission.v1beta1; - -option go_package = "github.com/axelarnetwork/axelar-core/x/permission/types"; - -import "gogoproto/gogo.proto"; -import "cosmos/crypto/multisig/keys.proto"; -import "axelar/permission/exported/v1beta1/types.proto"; - -option (gogoproto.goproto_getters_all) = false; - -message UpdateGovernanceKeyRequest { - option (permission.exported.v1beta1.permission_role) = ROLE_ACCESS_CONTROL; - bytes sender = 1 [ (gogoproto.casttype) = - "github.com/cosmos/cosmos-sdk/types.AccAddress" ]; - cosmos.crypto.multisig.LegacyAminoPubKey governance_key = 2 - [ (gogoproto.nullable) = false ]; -} - -message UpdateGovernanceKeyResponse {} - -// MsgRegisterController represents a message to register a controller account -message RegisterControllerRequest { - option (permission.exported.v1beta1.permission_role) = ROLE_ACCESS_CONTROL; - bytes sender = 1 [ (gogoproto.casttype) = - "github.com/cosmos/cosmos-sdk/types.AccAddress" ]; - bytes controller = 2 [ (gogoproto.casttype) = - "github.com/cosmos/cosmos-sdk/types.AccAddress" ]; -} - -message RegisterControllerResponse {} - -// DeregisterController represents a message to deregister a controller account -message DeregisterControllerRequest { - option (permission.exported.v1beta1.permission_role) = ROLE_ACCESS_CONTROL; - bytes sender = 1 [ (gogoproto.casttype) = - "github.com/cosmos/cosmos-sdk/types.AccAddress" ]; - bytes controller = 2 [ (gogoproto.casttype) = - "github.com/cosmos/cosmos-sdk/types.AccAddress" ]; -} -message DeregisterControllerResponse {} diff --git a/ampd/proto/axelar/permission/v1beta1/types.proto b/ampd/proto/axelar/permission/v1beta1/types.proto deleted file mode 100644 index beb401ed0..000000000 --- a/ampd/proto/axelar/permission/v1beta1/types.proto +++ /dev/null @@ -1,15 +0,0 @@ -syntax = "proto3"; -package axelar.permission.v1beta1; - -option go_package = "github.com/axelarnetwork/axelar-core/x/permission/types"; - -import "gogoproto/gogo.proto"; -import "axelar/permission/exported/v1beta1/types.proto"; - -option (gogoproto.goproto_getters_all) = false; - -message GovAccount { - bytes address = 1 [ (gogoproto.casttype) = - "github.com/cosmos/cosmos-sdk/types.AccAddress" ]; - permission.exported.v1beta1.Role role = 2; -} diff --git a/ampd/proto/axelar/reward/v1beta1/genesis.proto b/ampd/proto/axelar/reward/v1beta1/genesis.proto deleted file mode 100644 index a805e07e9..000000000 --- a/ampd/proto/axelar/reward/v1beta1/genesis.proto +++ /dev/null @@ -1,17 +0,0 @@ -syntax = "proto3"; -package axelar.reward.v1beta1; - -option go_package = "github.com/axelarnetwork/axelar-core/x/reward/types"; - -import "gogoproto/gogo.proto"; -import "axelar/reward/v1beta1/params.proto"; -import "axelar/reward/v1beta1/types.proto"; - -option (gogoproto.goproto_getters_all) = false; - -// GenesisState represents the genesis state -message GenesisState { - Params params = 1 [ (gogoproto.nullable) = false ]; - - repeated Pool pools = 2 [ (gogoproto.nullable) = false ]; -} diff --git a/ampd/proto/axelar/reward/v1beta1/params.proto b/ampd/proto/axelar/reward/v1beta1/params.proto deleted file mode 100644 index 8fba73ecf..000000000 --- a/ampd/proto/axelar/reward/v1beta1/params.proto +++ /dev/null @@ -1,20 +0,0 @@ -syntax = "proto3"; -package axelar.reward.v1beta1; - -option go_package = "github.com/axelarnetwork/axelar-core/x/reward/types"; - -import "gogoproto/gogo.proto"; - -option (gogoproto.goproto_getters_all) = false; - -// Params represent the genesis parameters for the module -message Params { - bytes external_chain_voting_inflation_rate = 1 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - bytes key_mgmt_relative_inflation_rate = 2 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; -} diff --git a/ampd/proto/axelar/reward/v1beta1/query.proto b/ampd/proto/axelar/reward/v1beta1/query.proto deleted file mode 100644 index f3f7225ad..000000000 --- a/ampd/proto/axelar/reward/v1beta1/query.proto +++ /dev/null @@ -1,28 +0,0 @@ -syntax = "proto3"; -package axelar.reward.v1beta1; - -option go_package = "github.com/axelarnetwork/axelar-core/x/reward/types"; - -import "gogoproto/gogo.proto"; -import "axelar/reward/v1beta1/params.proto"; - -option (gogoproto.goproto_getters_all) = false; - -// InflationRateRequest represents a message that queries the Axelar specific -// inflation RPC method. Ideally, this would use ValAddress as the validator -// field type. However, this makes it awkward for REST-based calls, because it -// would expect a byte array as part of the url. So, the bech32 encoded address -// string is used for this request instead. -message InflationRateRequest { string validator = 1; } - -message InflationRateResponse { - bytes inflation_rate = 1 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; -} - -// ParamsRequest represents a message that queries the params -message ParamsRequest {} - -message ParamsResponse { Params params = 1 [ (gogoproto.nullable) = false ]; } diff --git a/ampd/proto/axelar/reward/v1beta1/service.proto b/ampd/proto/axelar/reward/v1beta1/service.proto deleted file mode 100644 index 363f136e9..000000000 --- a/ampd/proto/axelar/reward/v1beta1/service.proto +++ /dev/null @@ -1,42 +0,0 @@ -syntax = "proto3"; -package axelar.reward.v1beta1; - -option go_package = "github.com/axelarnetwork/axelar-core/x/reward/types"; - -import "gogoproto/gogo.proto"; -import "google/api/annotations.proto"; -import "axelar/reward/v1beta1/tx.proto"; -import "axelar/reward/v1beta1/query.proto"; - -option (gogoproto.goproto_registration) = true; - -// Msg defines the axelarnet Msg service. -service MsgService { - rpc RefundMsg(RefundMsgRequest) returns (RefundMsgResponse) { - option (google.api.http) = { - post : "/axelar/reward/refund_message" - body : "*" - }; - } -} - -// QueryService defines the gRPC querier service. -service QueryService { - rpc InflationRate(InflationRateRequest) returns (InflationRateResponse) { - option (google.api.http) = { - get : "/axelar/reward/v1beta1/inflation_rate/{validator}", - additional_bindings : { - get : "/axelar/reward/v1beta1/inflation_rate" // query network inflation - // rate, without having to - // pass empty validator - // `.../inflation_rate//` - } - }; - } - - rpc Params(ParamsRequest) returns (ParamsResponse) { - option (google.api.http) = { - get : "/axelar/reward/v1beta1/params" - }; - } -} diff --git a/ampd/proto/axelar/reward/v1beta1/tx.proto b/ampd/proto/axelar/reward/v1beta1/tx.proto deleted file mode 100644 index ec472dd52..000000000 --- a/ampd/proto/axelar/reward/v1beta1/tx.proto +++ /dev/null @@ -1,24 +0,0 @@ -syntax = "proto3"; -package axelar.reward.v1beta1; - -option go_package = "github.com/axelarnetwork/axelar-core/x/reward/types"; - -import "google/protobuf/any.proto"; -import "gogoproto/gogo.proto"; -import "cosmos_proto/cosmos.proto"; -import "axelar/permission/exported/v1beta1/types.proto"; - -option (gogoproto.goproto_getters_all) = false; - -message RefundMsgRequest { - option (permission.exported.v1beta1.permission_role) = ROLE_UNRESTRICTED; - bytes sender = 1 [ (gogoproto.casttype) = - "github.com/cosmos/cosmos-sdk/types.AccAddress" ]; - google.protobuf.Any inner_message = 2 - [ (cosmos_proto.accepts_interface) = "Refundable" ]; -} - -message RefundMsgResponse { - bytes data = 1; - string log = 2; -} diff --git a/ampd/proto/axelar/reward/v1beta1/types.proto b/ampd/proto/axelar/reward/v1beta1/types.proto deleted file mode 100644 index b025a95c0..000000000 --- a/ampd/proto/axelar/reward/v1beta1/types.proto +++ /dev/null @@ -1,33 +0,0 @@ -syntax = "proto3"; -package axelar.reward.v1beta1; - -option go_package = "github.com/axelarnetwork/axelar-core/x/reward/types"; - -import "gogoproto/gogo.proto"; -import "cosmos/base/v1beta1/coin.proto"; - -option (gogoproto.goproto_getters_all) = false; - -message Pool { - message Reward { - bytes validator = 1 [ (gogoproto.casttype) = - "github.com/cosmos/cosmos-sdk/types.ValAddress" ]; - repeated cosmos.base.v1beta1.Coin coins = 2 [ - (gogoproto.nullable) = false, - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" - ]; - } - - string name = 1; - repeated Reward rewards = 2 [ (gogoproto.nullable) = false ]; -} - -message Refund { - bytes payer = 1 [ (gogoproto.casttype) = - "github.com/cosmos/cosmos-sdk/types.AccAddress" ]; - - repeated cosmos.base.v1beta1.Coin fees = 2 [ - (gogoproto.nullable) = false, - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" - ]; -} diff --git a/ampd/proto/axelar/snapshot/exported/v1beta1/types.proto b/ampd/proto/axelar/snapshot/exported/v1beta1/types.proto deleted file mode 100644 index 80d4a4435..000000000 --- a/ampd/proto/axelar/snapshot/exported/v1beta1/types.proto +++ /dev/null @@ -1,39 +0,0 @@ -syntax = "proto3"; -package axelar.snapshot.exported.v1beta1; - -option go_package = "github.com/axelarnetwork/axelar-core/x/snapshot/exported"; - -import "gogoproto/gogo.proto"; -import "google/protobuf/timestamp.proto"; -import "google/protobuf/any.proto"; -import "cosmos/base/v1beta1/coin.proto"; -import "axelar/tss/exported/v1beta1/types.proto"; -import "cosmos_proto/cosmos.proto"; -import "cosmos/staking/v1beta1/staking.proto"; - -option (gogoproto.goproto_getters_all) = false; - -message Participant { - bytes address = 1 [ (gogoproto.casttype) = - "github.com/cosmos/cosmos-sdk/types.ValAddress" ]; - bytes weight = 2 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Uint", - (gogoproto.nullable) = false - ]; -} - -message Snapshot { - reserved 1, 4, 5, 6, 7; // validators, total_share_count, counter and - // corruption_threshold were deleted in v0.26 - - option (gogoproto.stable_marshaler) = true; - - google.protobuf.Timestamp timestamp = 2 - [ (gogoproto.nullable) = false, (gogoproto.stdtime) = true ]; - int64 height = 3; - map participants = 8 [ (gogoproto.nullable) = false ]; - bytes bonded_weight = 9 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Uint", - (gogoproto.nullable) = false - ]; -} diff --git a/ampd/proto/axelar/snapshot/v1beta1/genesis.proto b/ampd/proto/axelar/snapshot/v1beta1/genesis.proto deleted file mode 100644 index 08d954526..000000000 --- a/ampd/proto/axelar/snapshot/v1beta1/genesis.proto +++ /dev/null @@ -1,18 +0,0 @@ -syntax = "proto3"; -package axelar.snapshot.v1beta1; - -option go_package = "github.com/axelarnetwork/axelar-core/x/snapshot/types"; - -import "gogoproto/gogo.proto"; -import "axelar/snapshot/v1beta1/params.proto"; -import "axelar/snapshot/v1beta1/types.proto"; - -option (gogoproto.goproto_getters_all) = false; - -// GenesisState represents the genesis state -message GenesisState { - Params params = 1 [ (gogoproto.nullable) = false ]; - - repeated ProxiedValidator proxied_validators = 2 - [ (gogoproto.nullable) = false ]; -} diff --git a/ampd/proto/axelar/snapshot/v1beta1/params.proto b/ampd/proto/axelar/snapshot/v1beta1/params.proto deleted file mode 100644 index c22c60186..000000000 --- a/ampd/proto/axelar/snapshot/v1beta1/params.proto +++ /dev/null @@ -1,11 +0,0 @@ -syntax = "proto3"; -package axelar.snapshot.v1beta1; -option go_package = "github.com/axelarnetwork/axelar-core/x/snapshot/types"; - -import "gogoproto/gogo.proto"; -import "google/protobuf/duration.proto"; - -option (gogoproto.goproto_getters_all) = false; - -// Params represent the genesis parameters for the module -message Params { int64 min_proxy_balance = 1; } diff --git a/ampd/proto/axelar/snapshot/v1beta1/query.proto b/ampd/proto/axelar/snapshot/v1beta1/query.proto deleted file mode 100644 index 0e9f53def..000000000 --- a/ampd/proto/axelar/snapshot/v1beta1/query.proto +++ /dev/null @@ -1,35 +0,0 @@ -syntax = "proto3"; -package axelar.snapshot.v1beta1; - -option go_package = "github.com/axelarnetwork/axelar-core/x/snapshot/types"; - -import "gogoproto/gogo.proto"; -import "axelar/snapshot/v1beta1/params.proto"; - -option (gogoproto.goproto_getters_all) = false; - -message QueryValidatorsResponse { - message TssIllegibilityInfo { - bool tombstoned = 1; - bool jailed = 2; - bool missed_too_many_blocks = 3; - bool no_proxy_registered = 4; - bool tss_suspended = 5; - bool proxy_insuficient_funds = 6; - bool stale_tss_heartbeat = 7; - } - - message Validator { - string operator_address = 1; - string moniker = 2; - TssIllegibilityInfo tss_illegibility_info = 3 - [ (gogoproto.nullable) = false ]; - } - - repeated Validator validators = 1; -} - -// ParamsRequest represents a message that queries the params -message ParamsRequest {} - -message ParamsResponse { Params params = 1 [ (gogoproto.nullable) = false ]; } diff --git a/ampd/proto/axelar/snapshot/v1beta1/service.proto b/ampd/proto/axelar/snapshot/v1beta1/service.proto deleted file mode 100644 index 82f430fd9..000000000 --- a/ampd/proto/axelar/snapshot/v1beta1/service.proto +++ /dev/null @@ -1,41 +0,0 @@ -syntax = "proto3"; -package axelar.snapshot.v1beta1; - -option go_package = "github.com/axelarnetwork/axelar-core/x/snapshot/types"; - -import "gogoproto/gogo.proto"; -import "google/api/annotations.proto"; -import "axelar/snapshot/v1beta1/tx.proto"; -import "axelar/snapshot/v1beta1/query.proto"; - -option (gogoproto.goproto_registration) = true; - -// Msg defines the snapshot Msg service. -service MsgService { - // RegisterProxy defines a method for registering a proxy account that can act - // in a validator account's stead. - rpc RegisterProxy(RegisterProxyRequest) returns (RegisterProxyResponse) { - option (google.api.http) = { - post : "/axelar/snapshot/register_proxy" - body : "*" - }; - } - - // DeactivateProxy defines a method for deregistering a proxy account. - rpc DeactivateProxy(DeactivateProxyRequest) - returns (DeactivateProxyResponse) { - option (google.api.http) = { - post : "/axelar/snapshot/deactivate_proxy" - body : "*" - }; - } -} - -// QueryService defines the gRPC querier service. -service QueryService { - rpc Params(ParamsRequest) returns (ParamsResponse) { - option (google.api.http) = { - get : "/axelar/snapshot/v1beta1/params" - }; - } -} diff --git a/ampd/proto/axelar/snapshot/v1beta1/tx.proto b/ampd/proto/axelar/snapshot/v1beta1/tx.proto deleted file mode 100644 index 70a1c2c0e..000000000 --- a/ampd/proto/axelar/snapshot/v1beta1/tx.proto +++ /dev/null @@ -1,28 +0,0 @@ -syntax = "proto3"; -package axelar.snapshot.v1beta1; - -option go_package = "github.com/axelarnetwork/axelar-core/x/snapshot/types"; - -import "gogoproto/gogo.proto"; -import "google/api/annotations.proto"; -import "axelar/permission/exported/v1beta1/types.proto"; - -option (gogoproto.goproto_getters_all) = false; - -message RegisterProxyRequest { - option (permission.exported.v1beta1.permission_role) = ROLE_UNRESTRICTED; - bytes sender = 1 [ (gogoproto.casttype) = - "github.com/cosmos/cosmos-sdk/types.ValAddress" ]; - bytes proxy_addr = 2 [ (gogoproto.casttype) = - "github.com/cosmos/cosmos-sdk/types.AccAddress" ]; -} - -message RegisterProxyResponse {} - -message DeactivateProxyRequest { - option (permission.exported.v1beta1.permission_role) = ROLE_UNRESTRICTED; - bytes sender = 1 [ (gogoproto.casttype) = - "github.com/cosmos/cosmos-sdk/types.ValAddress" ]; -} - -message DeactivateProxyResponse {} diff --git a/ampd/proto/axelar/snapshot/v1beta1/types.proto b/ampd/proto/axelar/snapshot/v1beta1/types.proto deleted file mode 100644 index 279c6e6fd..000000000 --- a/ampd/proto/axelar/snapshot/v1beta1/types.proto +++ /dev/null @@ -1,17 +0,0 @@ -syntax = "proto3"; -package axelar.snapshot.v1beta1; - -option go_package = "github.com/axelarnetwork/axelar-core/x/snapshot/types"; - -import "gogoproto/gogo.proto"; -import "google/api/annotations.proto"; - -option (gogoproto.goproto_getters_all) = false; - -message ProxiedValidator { - bytes validator = 1 [ (gogoproto.casttype) = - "github.com/cosmos/cosmos-sdk/types.ValAddress" ]; - bytes proxy = 2 [ (gogoproto.casttype) = - "github.com/cosmos/cosmos-sdk/types.AccAddress" ]; - bool active = 3; -} diff --git a/ampd/proto/axelar/tss/exported/v1beta1/types.proto b/ampd/proto/axelar/tss/exported/v1beta1/types.proto deleted file mode 100644 index 4b0d8bf1d..000000000 --- a/ampd/proto/axelar/tss/exported/v1beta1/types.proto +++ /dev/null @@ -1,68 +0,0 @@ -syntax = "proto3"; -package axelar.tss.exported.v1beta1; - -option go_package = "github.com/axelarnetwork/axelar-core/x/tss/exported"; - -import "google/protobuf/any.proto"; -import "google/protobuf/timestamp.proto"; -import "cosmos_proto/cosmos.proto"; -import "axelar/utils/v1beta1/threshold.proto"; -import "gogoproto/gogo.proto"; - -// KeyRequirement defines requirements for keys -message KeyRequirement { - KeyRole key_role = 1; - KeyType key_type = 2; - utils.v1beta1.Threshold min_keygen_threshold = 3 - [ (gogoproto.nullable) = false ]; - utils.v1beta1.Threshold safety_threshold = 4 [ (gogoproto.nullable) = false ]; - KeyShareDistributionPolicy key_share_distribution_policy = 5; - int64 max_total_share_count = 6; - int64 min_total_share_count = 7; - utils.v1beta1.Threshold keygen_voting_threshold = 8 - [ (gogoproto.nullable) = false ]; - utils.v1beta1.Threshold sign_voting_threshold = 9 - [ (gogoproto.nullable) = false ]; - int64 keygen_timeout = 10; - int64 sign_timeout = 11; -} - -enum KeyRole { - option (gogoproto.goproto_enum_prefix) = false; - option (gogoproto.goproto_enum_stringer) = true; - - KEY_ROLE_UNSPECIFIED = 0 [ (gogoproto.enumvalue_customname) = "Unknown" ]; - KEY_ROLE_MASTER_KEY = 1 [ (gogoproto.enumvalue_customname) = "MasterKey" ]; - KEY_ROLE_SECONDARY_KEY = 2 - [ (gogoproto.enumvalue_customname) = "SecondaryKey" ]; - KEY_ROLE_EXTERNAL_KEY = 3 - [ (gogoproto.enumvalue_customname) = "ExternalKey" ]; -} - -enum KeyType { - option (gogoproto.goproto_enum_prefix) = false; - option (gogoproto.goproto_enum_stringer) = true; - - KEY_TYPE_UNSPECIFIED = 0; - KEY_TYPE_NONE = 1 [ (gogoproto.enumvalue_customname) = "None" ]; - KEY_TYPE_THRESHOLD = 2 [ (gogoproto.enumvalue_customname) = "Threshold" ]; - KEY_TYPE_MULTISIG = 3 [ (gogoproto.enumvalue_customname) = "Multisig" ]; -} - -enum KeyShareDistributionPolicy { - option (gogoproto.goproto_enum_prefix) = false; - option (gogoproto.goproto_enum_stringer) = true; - - KEY_SHARE_DISTRIBUTION_POLICY_UNSPECIFIED = 0 - [ (gogoproto.enumvalue_customname) = "Unspecified" ]; - KEY_SHARE_DISTRIBUTION_POLICY_WEIGHTED_BY_STAKE = 1 - [ (gogoproto.enumvalue_customname) = "WeightedByStake" ]; - KEY_SHARE_DISTRIBUTION_POLICY_ONE_PER_VALIDATOR = 2 - [ (gogoproto.enumvalue_customname) = "OnePerValidator" ]; -} - -// PubKeyInfo holds a pubkey and a signature -message SigKeyPair { - bytes pub_key = 1; - bytes signature = 2; -} diff --git a/ampd/proto/axelar/tss/tofnd/v1beta1/common.proto b/ampd/proto/axelar/tss/tofnd/v1beta1/common.proto deleted file mode 100644 index 0683c5189..000000000 --- a/ampd/proto/axelar/tss/tofnd/v1beta1/common.proto +++ /dev/null @@ -1,28 +0,0 @@ -// File copied from golang tofnd with minor tweaks -syntax = "proto3"; - -option go_package = "github.com/axelarnetwork/axelar-core/x/tss/tofnd"; - -import "gogoproto/gogo.proto"; - -package axelar.tss.tofnd.v1beta1; - -// Key presence check types -message KeyPresenceRequest { - string key_uid = 1; - bytes pub_key = 2; // SEC1-encoded compressed pub key bytes to find the right - // mnemonic. Latest is used, if empty. -} - -message KeyPresenceResponse { - enum Response { - option (gogoproto.goproto_enum_prefix) = false; - - RESPONSE_UNSPECIFIED = 0; - RESPONSE_PRESENT = 1; - RESPONSE_ABSENT = 2; - RESPONSE_FAIL = 3; - } - - Response response = 1; -} diff --git a/ampd/proto/axelar/tss/tofnd/v1beta1/multisig.proto b/ampd/proto/axelar/tss/tofnd/v1beta1/multisig.proto deleted file mode 100644 index 82abaaf56..000000000 --- a/ampd/proto/axelar/tss/tofnd/v1beta1/multisig.proto +++ /dev/null @@ -1,40 +0,0 @@ -// File copied from golang tofnd with minor tweaks -syntax = "proto3"; - -option go_package = "github.com/axelarnetwork/axelar-core/x/tss/tofnd"; -import "axelar/tss/tofnd/v1beta1/common.proto"; // import key presence request/response - -package axelar.tss.tofnd.v1beta1; - -// service Multisig { -// rpc KeyPresence(KeyPresenceRequest) returns (KeyPresenceResponse); -// rpc Keygen(KeygenRequest) returns (KeygenResponse); -// rpc Sign(SignRequest) returns (SignResponse); -//} - -message KeygenRequest { - string key_uid = 1; - string party_uid = 2; // used only for logging -} - -message KeygenResponse { - oneof keygen_response { - bytes pub_key = 1; // SEC1-encoded compressed curve point - string error = 2; // reply with an error message if keygen fails - } -} - -message SignRequest { - string key_uid = 1; - bytes msg_to_sign = 2; // 32-byte pre-hashed message digest - string party_uid = 3; // used only for logging - bytes pub_key = 4; // SEC1-encoded compressed pub key bytes to find the right - // mnemonic. Latest is used, if empty. -} - -message SignResponse { - oneof sign_response { - bytes signature = 1; // ASN.1 DER-encoded ECDSA signature - string error = 2; // reply with an error message if sign fails - } -} diff --git a/ampd/proto/axelar/tss/tofnd/v1beta1/tofnd.proto b/ampd/proto/axelar/tss/tofnd/v1beta1/tofnd.proto deleted file mode 100644 index 96140268a..000000000 --- a/ampd/proto/axelar/tss/tofnd/v1beta1/tofnd.proto +++ /dev/null @@ -1,129 +0,0 @@ -// File copied from golang tofnd with minor tweaks -syntax = "proto3"; - -option go_package = "github.com/axelarnetwork/axelar-core/x/tss/tofnd"; -import "gogoproto/gogo.proto"; -import "axelar/tss/tofnd/v1beta1/common.proto"; // import key presence request/response - -package axelar.tss.tofnd.v1beta1; - -// TODO: figure out why gogoproto produces unusable services -// GG20 is the protocol https://eprint.iacr.org/2020/540 -// rpc definitions intended to wrap the API for this library: -// https://github.com/axelarnetwork/tofn -// service GG20 { -// rpc Recover(RecoverRequest) returns (RecoverResponse); -// rpc Keygen(stream MessageIn) returns (stream MessageOut); -// rpc Sign(stream MessageIn) returns (stream MessageOut); -// rpc KeyPresence(KeyPresenceRequest) returns (KeyPresenceResponse); -//} - -message RecoverRequest { - KeygenInit keygen_init = 1; - KeygenOutput keygen_output = 2; -} -message RecoverResponse { - enum Response { - RESPONSE_UNSPECIFIED = 0; - RESPONSE_SUCCESS = 1; - RESPONSE_FAIL = 2; - } - Response response = 1; -} - -// Keygen's success response -message KeygenOutput { - bytes pub_key = 1; // pub_key; common for all parties - bytes group_recover_info = - 2; // recover info of all parties' shares; common for all parties - bytes private_recover_info = - 3; // private recover info of this party's shares; unique for each party -} - -// generic message types shared by Keygen, Sign - -// TODO use nested message types -// eg. KeygenInit, SignInit should be defined inside MessageIn, etc. - -message MessageIn { - oneof data { // TODO don't reuse `data` - KeygenInit keygen_init = 1; // first message only, Keygen - SignInit sign_init = 2; // first message only, Sign - TrafficIn traffic = 3; // all subsequent messages - bool abort = 4; // abort the protocol, ignore the bool value - } -} - -message MessageOut { - oneof data { // TODO don't reuse `data` - TrafficOut traffic = 1; // all but final message - KeygenResult keygen_result = 2; // final message only, Keygen - SignResult sign_result = 3; // final message only, Sign - bool need_recover = 4; // issue recover from client - } - - // Keygen's response types - message KeygenResult { - oneof keygen_result_data { - KeygenOutput data = 1; // Success response - CriminalList criminals = 2; // Faiilure response - } - } - - // Sign's response types - message SignResult { - oneof sign_result_data { - bytes signature = 1; // Success response - CriminalList criminals = 2; // Failure response - } - } - - // Keygen/Sign failure response message - message CriminalList { - repeated Criminal criminals = 1; - - message Criminal { - string party_uid = 1; - - enum CrimeType { - option (gogoproto.goproto_enum_prefix) = false; - - CRIME_TYPE_UNSPECIFIED = 0; - CRIME_TYPE_NON_MALICIOUS = 1; - CRIME_TYPE_MALICIOUS = 2; - } - CrimeType crime_type = 2; - } - } -} - -message TrafficIn { - string from_party_uid = 1; - bytes payload = 2; - bool is_broadcast = 3; -} - -message TrafficOut { - string to_party_uid = 1; - bytes payload = 2; - bool is_broadcast = 3; -} - -// Keygen-specific message types - -message KeygenInit { - string new_key_uid = 1; - repeated string party_uids = 2; - repeated uint32 party_share_counts = 5; - uint32 my_party_index = 3; // parties[my_party_index] belongs to the server - uint32 threshold = 4; -} - -// Sign-specific message types - -message SignInit { - string new_sig_uid = 1; - string key_uid = 2; - repeated string party_uids = 3; // TODO replace this with a subset of indices? - bytes message_to_sign = 4; -} diff --git a/ampd/proto/axelar/tss/v1beta1/genesis.proto b/ampd/proto/axelar/tss/v1beta1/genesis.proto deleted file mode 100644 index 1e411bb56..000000000 --- a/ampd/proto/axelar/tss/v1beta1/genesis.proto +++ /dev/null @@ -1,12 +0,0 @@ -syntax = "proto3"; -package axelar.tss.v1beta1; -option go_package = "github.com/axelarnetwork/axelar-core/x/tss/types"; - -import "gogoproto/gogo.proto"; -import "axelar/tss/v1beta1/params.proto"; -import "axelar/tss/v1beta1/types.proto"; -import "axelar/tss/exported/v1beta1/types.proto"; - -option (gogoproto.goproto_getters_all) = false; - -message GenesisState { Params params = 1 [ (gogoproto.nullable) = false ]; } diff --git a/ampd/proto/axelar/tss/v1beta1/params.proto b/ampd/proto/axelar/tss/v1beta1/params.proto deleted file mode 100644 index ab44ac748..000000000 --- a/ampd/proto/axelar/tss/v1beta1/params.proto +++ /dev/null @@ -1,32 +0,0 @@ -syntax = "proto3"; - -package axelar.tss.v1beta1; -option go_package = "github.com/axelarnetwork/axelar-core/x/tss/types"; - -import "gogoproto/gogo.proto"; -import "axelar/utils/v1beta1/threshold.proto"; -import "axelar/tss/exported/v1beta1/types.proto"; - -option (gogoproto.goproto_getters_all) = false; - -// Params is the parameter set for this module -message Params { - // KeyRequirements defines the requirement for each key role - repeated tss.exported.v1beta1.KeyRequirement key_requirements = 1 - [ (gogoproto.nullable) = false ]; - // SuspendDurationInBlocks defines the number of blocks a - // validator is disallowed to participate in any TSS ceremony after - // committing a malicious behaviour during signing - int64 suspend_duration_in_blocks = 2; - // HeartBeatPeriodInBlocks defines the time period in blocks for tss to - // emit the event asking validators to send their heartbeats - int64 heartbeat_period_in_blocks = 3; - utils.v1beta1.Threshold max_missed_blocks_per_window = 4 - [ (gogoproto.nullable) = false ]; - int64 unbonding_locking_key_rotation_count = 5; - utils.v1beta1.Threshold external_multisig_threshold = 6 - [ (gogoproto.nullable) = false ]; - int64 max_sign_queue_size = 7; - int64 max_simultaneous_sign_shares = 8; - int64 tss_signed_blocks_window = 9; -} diff --git a/ampd/proto/axelar/tss/v1beta1/query.proto b/ampd/proto/axelar/tss/v1beta1/query.proto deleted file mode 100644 index 748cfefee..000000000 --- a/ampd/proto/axelar/tss/v1beta1/query.proto +++ /dev/null @@ -1,14 +0,0 @@ -syntax = "proto3"; -package axelar.tss.v1beta1; - -option go_package = "github.com/axelarnetwork/axelar-core/x/tss/types"; - -import "gogoproto/gogo.proto"; -import "axelar/tss/v1beta1/params.proto"; - -option (gogoproto.goproto_getters_all) = false; - -// ParamsRequest represents a message that queries the params -message ParamsRequest {} - -message ParamsResponse { Params params = 1 [ (gogoproto.nullable) = false ]; } diff --git a/ampd/proto/axelar/tss/v1beta1/service.proto b/ampd/proto/axelar/tss/v1beta1/service.proto deleted file mode 100644 index 01dfce6ec..000000000 --- a/ampd/proto/axelar/tss/v1beta1/service.proto +++ /dev/null @@ -1,32 +0,0 @@ -syntax = "proto3"; -package axelar.tss.v1beta1; - -option go_package = "github.com/axelarnetwork/axelar-core/x/tss/types"; - -import "gogoproto/gogo.proto"; -import "google/api/annotations.proto"; -import "axelar/snapshot/v1beta1/tx.proto"; -import "axelar/tss/v1beta1/tx.proto"; -import "axelar/tss/v1beta1/query.proto"; - -option (gogoproto.goproto_registration) = true; - -// Msg defines the tss Msg service. -service MsgService { - rpc HeartBeat(axelar.tss.v1beta1.HeartBeatRequest) - returns (axelar.tss.v1beta1.HeartBeatResponse) { - option (google.api.http) = { - post : "/axelar/tss/heartbeat" - body : "*" - }; - } -} - -// Query defines the gRPC querier service. -service QueryService { - rpc Params(ParamsRequest) returns (ParamsResponse) { - option (google.api.http) = { - get : "/axelar/tss/v1beta1/params" - }; - } -} diff --git a/ampd/proto/axelar/tss/v1beta1/tx.proto b/ampd/proto/axelar/tss/v1beta1/tx.proto deleted file mode 100644 index 2cc6981d1..000000000 --- a/ampd/proto/axelar/tss/v1beta1/tx.proto +++ /dev/null @@ -1,147 +0,0 @@ -syntax = "proto3"; -package axelar.tss.v1beta1; - -option go_package = "github.com/axelarnetwork/axelar-core/x/tss/types"; - -import "gogoproto/gogo.proto"; -import "axelar/tss/exported/v1beta1/types.proto"; -import "axelar/tss/v1beta1/types.proto"; -import "axelar/tss/tofnd/v1beta1/tofnd.proto"; -import "axelar/vote/exported/v1beta1/types.proto"; -import "cosmos/crypto/multisig/keys.proto"; -import "axelar/permission/exported/v1beta1/types.proto"; - -option (gogoproto.goproto_getters_all) = false; - -// StartKeygenRequest indicate the start of keygen -message StartKeygenRequest { - option (permission.exported.v1beta1.permission_role) = ROLE_CHAIN_MANAGEMENT; - string sender = 1 [ (gogoproto.casttype) = - "github.com/cosmos/cosmos-sdk/types.AccAddress" ]; - tss.v1beta1.KeyInfo key_info = 2 [ (gogoproto.nullable) = false ]; -} - -message StartKeygenResponse {} - -message RotateKeyRequest { - option (permission.exported.v1beta1.permission_role) = ROLE_CHAIN_MANAGEMENT; - bytes sender = 1 [ (gogoproto.casttype) = - "github.com/cosmos/cosmos-sdk/types.AccAddress" ]; - string chain = 2 - [ (gogoproto.casttype) = - "github.com/axelarnetwork/axelar-core/x/nexus/exported.ChainName" ]; - tss.exported.v1beta1.KeyRole key_role = 3; - string key_id = 4 [ - (gogoproto.customname) = "KeyID", - (gogoproto.casttype) = - "github.com/axelarnetwork/axelar-core/x/tss/exported.KeyID" - ]; -} - -message RotateKeyResponse {} - -// ProcessKeygenTrafficRequest protocol message -message ProcessKeygenTrafficRequest { - option (permission.exported.v1beta1.permission_role) = ROLE_UNRESTRICTED; - bytes sender = 1 [ (gogoproto.casttype) = - "github.com/cosmos/cosmos-sdk/types.AccAddress" ]; - string session_id = 2 [ (gogoproto.customname) = "SessionID" ]; - tss.tofnd.v1beta1.TrafficOut payload = 3 [ (gogoproto.nullable) = false ]; -} - -message ProcessKeygenTrafficResponse {} - -// ProcessSignTrafficRequest protocol message -message ProcessSignTrafficRequest { - option (permission.exported.v1beta1.permission_role) = ROLE_UNRESTRICTED; - bytes sender = 1 [ (gogoproto.casttype) = - "github.com/cosmos/cosmos-sdk/types.AccAddress" ]; - string session_id = 2 [ (gogoproto.customname) = "SessionID" ]; - tss.tofnd.v1beta1.TrafficOut payload = 3 [ (gogoproto.nullable) = false ]; -} - -message ProcessSignTrafficResponse {} - -// VotePubKeyRequest represents the message to vote on a public key -message VotePubKeyRequest { - option (permission.exported.v1beta1.permission_role) = ROLE_UNRESTRICTED; - bytes sender = 1 [ (gogoproto.casttype) = - "github.com/cosmos/cosmos-sdk/types.AccAddress" ]; - vote.exported.v1beta1.PollKey poll_key = 2 [ (gogoproto.nullable) = false ]; - tss.tofnd.v1beta1.MessageOut.KeygenResult result = 3 - [ (gogoproto.nullable) = false ]; -} -message VotePubKeyResponse { string log = 1; } - -// VoteSigRequest represents a message to vote for a signature -message VoteSigRequest { - option (permission.exported.v1beta1.permission_role) = ROLE_UNRESTRICTED; - bytes sender = 1 [ (gogoproto.casttype) = - "github.com/cosmos/cosmos-sdk/types.AccAddress" ]; - vote.exported.v1beta1.PollKey poll_key = 2 [ (gogoproto.nullable) = false ]; - tss.tofnd.v1beta1.MessageOut.SignResult result = 3 - [ (gogoproto.nullable) = false ]; -} - -message VoteSigResponse { string log = 1; } - -message HeartBeatRequest { - option (permission.exported.v1beta1.permission_role) = ROLE_UNRESTRICTED; - bytes sender = 1 [ (gogoproto.casttype) = - "github.com/cosmos/cosmos-sdk/types.AccAddress" ]; - - repeated string key_ids = 2 [ - (gogoproto.customname) = "KeyIDs", - (gogoproto.casttype) = - "github.com/axelarnetwork/axelar-core/x/tss/exported.KeyID" - ]; -} - -message HeartBeatResponse {} - -message RegisterExternalKeysRequest { - option (permission.exported.v1beta1.permission_role) = ROLE_CHAIN_MANAGEMENT; - message ExternalKey { - string id = 1 [ - (gogoproto.customname) = "ID", - (gogoproto.casttype) = - "github.com/axelarnetwork/axelar-core/x/tss/exported.KeyID" - ]; - bytes pub_key = 2; - } - - bytes sender = 1 [ (gogoproto.casttype) = - "github.com/cosmos/cosmos-sdk/types.AccAddress" ]; - string chain = 2 - [ (gogoproto.casttype) = - "github.com/axelarnetwork/axelar-core/x/nexus/exported.ChainName" ]; - repeated ExternalKey external_keys = 3 [ (gogoproto.nullable) = false ]; -} - -message RegisterExternalKeysResponse {}; - -message SubmitMultisigPubKeysRequest { - option (permission.exported.v1beta1.permission_role) = ROLE_UNRESTRICTED; - bytes sender = 1 [ (gogoproto.casttype) = - "github.com/cosmos/cosmos-sdk/types.AccAddress" ]; - string key_id = 2 [ - (gogoproto.customname) = "KeyID", - (gogoproto.casttype) = - "github.com/axelarnetwork/axelar-core/x/tss/exported.KeyID" - ]; - repeated exported.v1beta1.SigKeyPair sig_key_pairs = 3 - [ (gogoproto.nullable) = false ]; -} - -message SubmitMultisigPubKeysResponse {} - -message SubmitMultisigSignaturesRequest { - option (permission.exported.v1beta1.permission_role) = ROLE_UNRESTRICTED; - bytes sender = 1 [ (gogoproto.casttype) = - "github.com/cosmos/cosmos-sdk/types.AccAddress" ]; - string sig_id = 2 [ (gogoproto.customname) = "SigID" ]; - - repeated bytes signatures = 3; -} - -message SubmitMultisigSignaturesResponse {} diff --git a/ampd/proto/axelar/tss/v1beta1/types.proto b/ampd/proto/axelar/tss/v1beta1/types.proto deleted file mode 100644 index 86fd8dae2..000000000 --- a/ampd/proto/axelar/tss/v1beta1/types.proto +++ /dev/null @@ -1,63 +0,0 @@ -syntax = "proto3"; -package axelar.tss.v1beta1; - -option go_package = "github.com/axelarnetwork/axelar-core/x/tss/types"; - -import "gogoproto/gogo.proto"; -import "axelar/tss/exported/v1beta1/types.proto"; - -message KeygenVoteData { - bytes pub_key = 1; - bytes group_recovery_info = 2; -} - -// KeyInfo holds information about a key -message KeyInfo { - string key_id = 1 [ - (gogoproto.customname) = "KeyID", - (gogoproto.casttype) = - "github.com/axelarnetwork/axelar-core/x/tss/exported.KeyID" - ]; - tss.exported.v1beta1.KeyRole key_role = 2; - tss.exported.v1beta1.KeyType key_type = 3; -} - -message MultisigInfo { - message Info { - bytes participant = 1 - [ (gogoproto.casttype) = - "github.com/cosmos/cosmos-sdk/types.ValAddress" ]; - repeated bytes data = 2; - } - string id = 1 [ (gogoproto.customname) = "ID" ]; - int64 timeout = 2; - int64 target_num = 3; - repeated Info infos = 4; -} - -message KeyRecoveryInfo { - string key_id = 1 [ - (gogoproto.customname) = "KeyID", - (gogoproto.casttype) = - "github.com/axelarnetwork/axelar-core/x/tss/exported.KeyID" - ]; - bytes public = 2; - map private = 3 [ (gogoproto.nullable) = false ]; -} - -message ExternalKeys { - string chain = 1 - [ (gogoproto.casttype) = - "github.com/axelarnetwork/axelar-core/x/nexus/exported.ChainName" ]; - repeated string key_ids = 2 [ - (gogoproto.customname) = "KeyIDs", - (gogoproto.casttype) = - "github.com/axelarnetwork/axelar-core/x/tss/exported.KeyID" - ]; -} - -message ValidatorStatus { - bytes validator = 1 [ (gogoproto.casttype) = - "github.com/cosmos/cosmos-sdk/types.ValAddress" ]; - uint64 suspended_until = 2; -} diff --git a/ampd/proto/axelar/utils/v1beta1/bitmap.proto b/ampd/proto/axelar/utils/v1beta1/bitmap.proto deleted file mode 100644 index 4f9c714c2..000000000 --- a/ampd/proto/axelar/utils/v1beta1/bitmap.proto +++ /dev/null @@ -1,16 +0,0 @@ -syntax = "proto3"; -package axelar.utils.v1beta1; - -option go_package = "github.com/axelarnetwork/axelar-core/utils"; - -import "gogoproto/gogo.proto"; - -option (gogoproto.goproto_getters_all) = false; - -message Bitmap { CircularBuffer true_count_cache = 2; } - -message CircularBuffer { - repeated uint64 cumulative_value = 1; - int32 index = 2; - int32 max_size = 3; -} diff --git a/ampd/proto/axelar/utils/v1beta1/queuer.proto b/ampd/proto/axelar/utils/v1beta1/queuer.proto deleted file mode 100644 index 663d9b5a5..000000000 --- a/ampd/proto/axelar/utils/v1beta1/queuer.proto +++ /dev/null @@ -1,19 +0,0 @@ -syntax = "proto3"; -package axelar.utils.v1beta1; - -option go_package = "github.com/axelarnetwork/axelar-core/utils"; - -import "gogoproto/gogo.proto"; - -option (gogoproto.goproto_getters_all) = false; - -message QueueState { - option (gogoproto.stable_marshaler) = true; - - message Item { - bytes key = 1; - bytes value = 2; - } - - map items = 1 [ (gogoproto.nullable) = false ]; -} diff --git a/ampd/proto/axelar/utils/v1beta1/threshold.proto b/ampd/proto/axelar/utils/v1beta1/threshold.proto deleted file mode 100644 index 3d0f17a70..000000000 --- a/ampd/proto/axelar/utils/v1beta1/threshold.proto +++ /dev/null @@ -1,16 +0,0 @@ -syntax = "proto3"; -package axelar.utils.v1beta1; - -option go_package = "github.com/axelarnetwork/axelar-core/utils"; - -import "gogoproto/gogo.proto"; - -option (gogoproto.goproto_getters_all) = false; - -message Threshold { - option (gogoproto.goproto_stringer) = false; - // split threshold into Numerator and denominator to avoid floating point - // errors down the line - int64 numerator = 1; - int64 denominator = 2; -} diff --git a/ampd/proto/axelar/vote/exported/v1beta1/types.proto b/ampd/proto/axelar/vote/exported/v1beta1/types.proto deleted file mode 100644 index bc5e9f32e..000000000 --- a/ampd/proto/axelar/vote/exported/v1beta1/types.proto +++ /dev/null @@ -1,73 +0,0 @@ -syntax = "proto3"; -package axelar.vote.exported.v1beta1; - -option go_package = "github.com/axelarnetwork/axelar-core/x/vote/exported"; - -import "gogoproto/gogo.proto"; -import "google/protobuf/any.proto"; -import "cosmos_proto/cosmos.proto"; -import "axelar/snapshot/exported/v1beta1/types.proto"; -import "axelar/utils/v1beta1/threshold.proto"; - -option (gogoproto.goproto_getters_all) = false; - -// PollMetadata represents a poll with write-in voting, i.e. the result of the -// vote can have any data type -message PollMetadata { - reserved 1, 8, 9, 14; // deleted poll key, total voting power, voters and - // module_metadata in 0.20.x - - int64 expires_at = 3; - google.protobuf.Any result = 4 - [ (cosmos_proto.accepts_interface) = - "github.com/cosmos/codec/ProtoMarshaler" ]; - utils.v1beta1.Threshold voting_threshold = 5 [ (gogoproto.nullable) = false ]; - PollState state = 6; - int64 min_voter_count = 7; - string reward_pool_name = 10; - int64 grace_period = 11; - int64 completed_at = 12; - uint64 id = 13 [ - (gogoproto.customname) = "ID", - (gogoproto.customtype) = "PollID", - (gogoproto.nullable) = false - ]; - snapshot.exported.v1beta1.Snapshot snapshot = 15 - [ (gogoproto.nullable) = false ]; - string module = 16; - google.protobuf.Any module_metadata = 17 - [ (cosmos_proto.accepts_interface) = - "github.com/cosmos/codec/ProtoMarshaler" ]; -} - -// PollKey represents the key data for a poll -message PollKey { - option deprecated = true; - option (gogoproto.goproto_stringer) = false; - - string module = 1; - string id = 2 [ (gogoproto.customname) = "ID" ]; -} - -enum PollState { - option (gogoproto.goproto_enum_prefix) = false; - option (gogoproto.goproto_enum_stringer) = true; - - POLL_STATE_UNSPECIFIED = 0 - [ (gogoproto.enumvalue_customname) = "NonExistent" ]; - POLL_STATE_PENDING = 1 [ (gogoproto.enumvalue_customname) = "Pending" ]; - POLL_STATE_COMPLETED = 2 [ (gogoproto.enumvalue_customname) = "Completed" ]; - POLL_STATE_FAILED = 3 [ (gogoproto.enumvalue_customname) = "Failed" ]; -} - -// PollParticipants should be embedded in poll events in other modules -message PollParticipants { - uint64 poll_id = 1 [ - (gogoproto.customname) = "PollID", - (gogoproto.customtype) = "PollID", - (gogoproto.nullable) = false - ]; - repeated bytes participants = 2 - [ (gogoproto.casttype) = - "github.com/cosmos/cosmos-sdk/types.ValAddress" ]; -} diff --git a/ampd/proto/axelar/vote/v1beta1/events.proto b/ampd/proto/axelar/vote/v1beta1/events.proto deleted file mode 100644 index 8a81dad60..000000000 --- a/ampd/proto/axelar/vote/v1beta1/events.proto +++ /dev/null @@ -1,16 +0,0 @@ -syntax = "proto3"; - -package axelar.vote.v1beta1; -option go_package = "github.com/axelarnetwork/axelar-core/x/vote/types"; - -import "gogoproto/gogo.proto"; - -option (gogoproto.goproto_getters_all) = false; - -message Voted { - string module = 1; - string action = 2; - string poll = 3; - string voter = 4; - string state = 5; -} diff --git a/ampd/proto/axelar/vote/v1beta1/genesis.proto b/ampd/proto/axelar/vote/v1beta1/genesis.proto deleted file mode 100644 index b26503c51..000000000 --- a/ampd/proto/axelar/vote/v1beta1/genesis.proto +++ /dev/null @@ -1,17 +0,0 @@ -syntax = "proto3"; - -package axelar.vote.v1beta1; -option go_package = "github.com/axelarnetwork/axelar-core/x/vote/types"; - -import "gogoproto/gogo.proto"; -import "axelar/vote/v1beta1/params.proto"; -import "axelar/vote/exported/v1beta1/types.proto"; - -option (gogoproto.goproto_getters_all) = false; - -message GenesisState { - Params params = 1 [ (gogoproto.nullable) = false ]; - - repeated vote.exported.v1beta1.PollMetadata poll_metadatas = 2 - [ (gogoproto.nullable) = false ]; -} diff --git a/ampd/proto/axelar/vote/v1beta1/params.proto b/ampd/proto/axelar/vote/v1beta1/params.proto deleted file mode 100644 index 95f853532..000000000 --- a/ampd/proto/axelar/vote/v1beta1/params.proto +++ /dev/null @@ -1,16 +0,0 @@ -syntax = "proto3"; - -package axelar.vote.v1beta1; -option go_package = "github.com/axelarnetwork/axelar-core/x/vote/types"; - -import "gogoproto/gogo.proto"; -import "axelar/utils/v1beta1/threshold.proto"; - -option (gogoproto.goproto_getters_all) = false; - -// Params represent the genesis parameters for the module -message Params { - utils.v1beta1.Threshold default_voting_threshold = 1 - [ (gogoproto.nullable) = false ]; - int64 end_blocker_limit = 2; -} diff --git a/ampd/proto/axelar/vote/v1beta1/query.proto b/ampd/proto/axelar/vote/v1beta1/query.proto deleted file mode 100644 index d99457a28..000000000 --- a/ampd/proto/axelar/vote/v1beta1/query.proto +++ /dev/null @@ -1,14 +0,0 @@ -syntax = "proto3"; -package axelar.vote.v1beta1; - -option go_package = "github.com/axelarnetwork/axelar-core/x/vote/types"; - -import "gogoproto/gogo.proto"; -import "axelar/vote/v1beta1/params.proto"; - -option (gogoproto.goproto_getters_all) = false; - -// ParamsRequest represents a message that queries the params -message ParamsRequest {} - -message ParamsResponse { Params params = 1 [ (gogoproto.nullable) = false ]; } diff --git a/ampd/proto/axelar/vote/v1beta1/service.proto b/ampd/proto/axelar/vote/v1beta1/service.proto deleted file mode 100644 index 1dfd1574f..000000000 --- a/ampd/proto/axelar/vote/v1beta1/service.proto +++ /dev/null @@ -1,30 +0,0 @@ -syntax = "proto3"; -package axelar.vote.v1beta1; - -option go_package = "github.com/axelarnetwork/axelar-core/x/vote/types"; - -import "gogoproto/gogo.proto"; -import "google/api/annotations.proto"; -import "axelar/vote/v1beta1/tx.proto"; -import "axelar/vote/v1beta1/query.proto"; - -option (gogoproto.goproto_registration) = true; - -// Msg defines the vote Msg service. -service MsgService { - rpc Vote(VoteRequest) returns (VoteResponse) { - option (google.api.http) = { - post : "/axelar/vote/vote" - body : "*" - }; - } -} - -// QueryService defines the gRPC querier service. -service QueryService { - rpc Params(ParamsRequest) returns (ParamsResponse) { - option (google.api.http) = { - get : "/axelar/vote/v1beta1/params" - }; - } -} diff --git a/ampd/proto/axelar/vote/v1beta1/tx.proto b/ampd/proto/axelar/vote/v1beta1/tx.proto deleted file mode 100644 index 771005831..000000000 --- a/ampd/proto/axelar/vote/v1beta1/tx.proto +++ /dev/null @@ -1,31 +0,0 @@ -syntax = "proto3"; -package axelar.vote.v1beta1; - -option go_package = "github.com/axelarnetwork/axelar-core/x/vote/types"; - -import "google/protobuf/any.proto"; -import "gogoproto/gogo.proto"; -import "cosmos_proto/cosmos.proto"; -import "axelar/permission/exported/v1beta1/types.proto"; -import "axelar/vote/v1beta1/types.proto"; - -option (gogoproto.goproto_getters_all) = false; - -message VoteRequest { - option (permission.exported.v1beta1.permission_role) = ROLE_UNRESTRICTED; - - reserved 2, 3; // poll_key and vote were removed in v0.20 - - bytes sender = 1 [ (gogoproto.casttype) = - "github.com/cosmos/cosmos-sdk/types.AccAddress" ]; - uint64 poll_id = 4 [ - (gogoproto.customname) = "PollID", - (gogoproto.customtype) = - "github.com/axelarnetwork/axelar-core/x/vote/exported.PollID", - (gogoproto.nullable) = false - ]; - google.protobuf.Any vote = 5 [ (cosmos_proto.accepts_interface) = - "github.com/cosmos/codec/ProtoMarshaler" ]; -} - -message VoteResponse { string log = 1; } diff --git a/ampd/proto/axelar/vote/v1beta1/types.proto b/ampd/proto/axelar/vote/v1beta1/types.proto deleted file mode 100644 index 92b64ce57..000000000 --- a/ampd/proto/axelar/vote/v1beta1/types.proto +++ /dev/null @@ -1,33 +0,0 @@ -syntax = "proto3"; -package axelar.vote.v1beta1; - -option go_package = "github.com/axelarnetwork/axelar-core/x/vote/types"; - -import "google/protobuf/any.proto"; -import "gogoproto/gogo.proto"; -import "cosmos_proto/cosmos.proto"; -import "axelar/vote/exported/v1beta1/types.proto"; - -option (gogoproto.goproto_getters_all) = false; - -// TalliedVote represents a vote for a poll with the accumulated stake of all -// validators voting for the same data -message TalliedVote { - reserved 2; // voters is deleted in version 0.20.x - - option (gogoproto.stable_marshaler) = true; - - bytes tally = 1 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Uint", - (gogoproto.nullable) = false - ]; - google.protobuf.Any data = 3 [ (cosmos_proto.accepts_interface) = - "github.com/cosmos/codec/ProtoMarshaler" ]; - uint64 poll_id = 4 [ - (gogoproto.customname) = "PollID", - (gogoproto.customtype) = - "github.com/axelarnetwork/axelar-core/x/vote/exported.PollID", - (gogoproto.nullable) = false - ]; - map is_voter_late = 5; -} diff --git a/ampd/proto/third_party/buf.yaml b/ampd/proto/third_party/buf.yaml deleted file mode 100644 index aae636f0a..000000000 --- a/ampd/proto/third_party/buf.yaml +++ /dev/null @@ -1,20 +0,0 @@ -# Generated by "buf config migrate-v1beta1". Edit as necessary, and -# remove this comment when you're finished. -# -# This module represents the "proto" root found in -# the previous configuration. -version: v1 -breaking: - use: - - FILE -lint: - use: - - DEFAULT - - COMMENTS - - FILE_LOWER_SNAKE_CASE - except: - - UNARY_RPC - - COMMENT_FIELD - - SERVICE_SUFFIX - - PACKAGE_VERSION_SUFFIX - - RPC_REQUEST_STANDARD_NAME diff --git a/ampd/proto/third_party/cosmos/auth/v1beta1/auth.proto b/ampd/proto/third_party/cosmos/auth/v1beta1/auth.proto deleted file mode 100644 index 72e1d9ec2..000000000 --- a/ampd/proto/third_party/cosmos/auth/v1beta1/auth.proto +++ /dev/null @@ -1,50 +0,0 @@ -syntax = "proto3"; -package cosmos.auth.v1beta1; - -import "cosmos_proto/cosmos.proto"; -import "gogoproto/gogo.proto"; -import "google/protobuf/any.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/auth/types"; - -// BaseAccount defines a base account type. It contains all the necessary fields -// for basic account functionality. Any custom account type should extend this -// type for additional functionality (e.g. vesting). -message BaseAccount { - option (gogoproto.goproto_getters) = false; - option (gogoproto.goproto_stringer) = false; - option (gogoproto.equal) = false; - - option (cosmos_proto.implements_interface) = "AccountI"; - - string address = 1; - google.protobuf.Any pub_key = 2 - [(gogoproto.jsontag) = "public_key,omitempty", (gogoproto.moretags) = "yaml:\"public_key\""]; - uint64 account_number = 3 [(gogoproto.moretags) = "yaml:\"account_number\""]; - uint64 sequence = 4; -} - -// ModuleAccount defines an account for modules that holds coins on a pool. -message ModuleAccount { - option (gogoproto.goproto_getters) = false; - option (gogoproto.goproto_stringer) = false; - option (cosmos_proto.implements_interface) = "ModuleAccountI"; - - BaseAccount base_account = 1 [(gogoproto.embed) = true, (gogoproto.moretags) = "yaml:\"base_account\""]; - string name = 2; - repeated string permissions = 3; -} - -// Params defines the parameters for the auth module. -message Params { - option (gogoproto.equal) = true; - option (gogoproto.goproto_stringer) = false; - - uint64 max_memo_characters = 1 [(gogoproto.moretags) = "yaml:\"max_memo_characters\""]; - uint64 tx_sig_limit = 2 [(gogoproto.moretags) = "yaml:\"tx_sig_limit\""]; - uint64 tx_size_cost_per_byte = 3 [(gogoproto.moretags) = "yaml:\"tx_size_cost_per_byte\""]; - uint64 sig_verify_cost_ed25519 = 4 - [(gogoproto.customname) = "SigVerifyCostED25519", (gogoproto.moretags) = "yaml:\"sig_verify_cost_ed25519\""]; - uint64 sig_verify_cost_secp256k1 = 5 - [(gogoproto.customname) = "SigVerifyCostSecp256k1", (gogoproto.moretags) = "yaml:\"sig_verify_cost_secp256k1\""]; -} diff --git a/ampd/proto/third_party/cosmos/auth/v1beta1/genesis.proto b/ampd/proto/third_party/cosmos/auth/v1beta1/genesis.proto deleted file mode 100644 index c88b94ee4..000000000 --- a/ampd/proto/third_party/cosmos/auth/v1beta1/genesis.proto +++ /dev/null @@ -1,17 +0,0 @@ -syntax = "proto3"; -package cosmos.auth.v1beta1; - -import "google/protobuf/any.proto"; -import "gogoproto/gogo.proto"; -import "cosmos/auth/v1beta1/auth.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/auth/types"; - -// GenesisState defines the auth module's genesis state. -message GenesisState { - // params defines all the paramaters of the module. - Params params = 1 [(gogoproto.nullable) = false]; - - // accounts are the accounts present at genesis. - repeated google.protobuf.Any accounts = 2; -} diff --git a/ampd/proto/third_party/cosmos/auth/v1beta1/query.proto b/ampd/proto/third_party/cosmos/auth/v1beta1/query.proto deleted file mode 100644 index 79799a4b7..000000000 --- a/ampd/proto/third_party/cosmos/auth/v1beta1/query.proto +++ /dev/null @@ -1,89 +0,0 @@ -syntax = "proto3"; -package cosmos.auth.v1beta1; - -import "cosmos/base/query/v1beta1/pagination.proto"; -import "gogoproto/gogo.proto"; -import "google/protobuf/any.proto"; -import "google/api/annotations.proto"; -import "cosmos/auth/v1beta1/auth.proto"; -import "cosmos_proto/cosmos.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/auth/types"; - -// Query defines the gRPC querier service. -service Query { - // Accounts returns all the existing accounts - // - // Since: cosmos-sdk 0.43 - rpc Accounts(QueryAccountsRequest) returns (QueryAccountsResponse) { - option (google.api.http).get = "/cosmos/auth/v1beta1/accounts"; - } - - // Account returns account details based on address. - rpc Account(QueryAccountRequest) returns (QueryAccountResponse) { - option (google.api.http).get = "/cosmos/auth/v1beta1/accounts/{address}"; - } - - // Params queries all parameters. - rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { - option (google.api.http).get = "/cosmos/auth/v1beta1/params"; - } - - // ModuleAccountByName returns the module account info by module name - rpc ModuleAccountByName(QueryModuleAccountByNameRequest) returns (QueryModuleAccountByNameResponse) { - option (google.api.http).get = "/cosmos/auth/v1beta1/module_accounts/{name}"; - } -} - -// QueryAccountsRequest is the request type for the Query/Accounts RPC method. -// -// Since: cosmos-sdk 0.43 -message QueryAccountsRequest { - // pagination defines an optional pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 1; -} - -// QueryAccountsResponse is the response type for the Query/Accounts RPC method. -// -// Since: cosmos-sdk 0.43 -message QueryAccountsResponse { - // accounts are the existing accounts - repeated google.protobuf.Any accounts = 1 [(cosmos_proto.accepts_interface) = "AccountI"]; - - // pagination defines the pagination in the response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -// QueryAccountRequest is the request type for the Query/Account RPC method. -message QueryAccountRequest { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // address defines the address to query for. - string address = 1; -} - -// QueryAccountResponse is the response type for the Query/Account RPC method. -message QueryAccountResponse { - // account defines the account of the corresponding address. - google.protobuf.Any account = 1 [(cosmos_proto.accepts_interface) = "AccountI"]; -} - -// QueryParamsRequest is the request type for the Query/Params RPC method. -message QueryParamsRequest {} - -// QueryParamsResponse is the response type for the Query/Params RPC method. -message QueryParamsResponse { - // params defines the parameters of the module. - Params params = 1 [(gogoproto.nullable) = false]; -} - -// QueryModuleAccountByNameRequest is the request type for the Query/ModuleAccountByName RPC method. -message QueryModuleAccountByNameRequest { - string name = 1; -} - -// QueryModuleAccountByNameResponse is the response type for the Query/ModuleAccountByName RPC method. -message QueryModuleAccountByNameResponse { - google.protobuf.Any account = 1 [(cosmos_proto.accepts_interface) = "ModuleAccountI"]; -} \ No newline at end of file diff --git a/ampd/proto/third_party/cosmos/authz/v1beta1/authz.proto b/ampd/proto/third_party/cosmos/authz/v1beta1/authz.proto deleted file mode 100644 index 05b1feefa..000000000 --- a/ampd/proto/third_party/cosmos/authz/v1beta1/authz.proto +++ /dev/null @@ -1,39 +0,0 @@ -// Since: cosmos-sdk 0.43 -syntax = "proto3"; -package cosmos.authz.v1beta1; - -import "cosmos_proto/cosmos.proto"; -import "google/protobuf/timestamp.proto"; -import "gogoproto/gogo.proto"; -import "google/protobuf/any.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/authz"; -option (gogoproto.goproto_getters_all) = false; - -// GenericAuthorization gives the grantee unrestricted permissions to execute -// the provided method on behalf of the granter's account. -message GenericAuthorization { - option (cosmos_proto.implements_interface) = "Authorization"; - - // Msg, identified by it's type URL, to grant unrestricted permissions to execute - string msg = 1; -} - -// Grant gives permissions to execute -// the provide method with expiration time. -message Grant { - google.protobuf.Any authorization = 1 [(cosmos_proto.accepts_interface) = "Authorization"]; - google.protobuf.Timestamp expiration = 2 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false]; -} - -// GrantAuthorization extends a grant with both the addresses of the grantee and granter. -// It is used in genesis.proto and query.proto -// -// Since: cosmos-sdk 0.45.2 -message GrantAuthorization { - string granter = 1; - string grantee = 2; - - google.protobuf.Any authorization = 3 [(cosmos_proto.accepts_interface) = "Authorization"]; - google.protobuf.Timestamp expiration = 4 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; -} diff --git a/ampd/proto/third_party/cosmos/authz/v1beta1/event.proto b/ampd/proto/third_party/cosmos/authz/v1beta1/event.proto deleted file mode 100644 index 7a3cf7c8c..000000000 --- a/ampd/proto/third_party/cosmos/authz/v1beta1/event.proto +++ /dev/null @@ -1,25 +0,0 @@ -// Since: cosmos-sdk 0.43 -syntax = "proto3"; -package cosmos.authz.v1beta1; - -option go_package = "github.com/cosmos/cosmos-sdk/x/authz"; - -// EventGrant is emitted on Msg/Grant -message EventGrant { - // Msg type URL for which an autorization is granted - string msg_type_url = 2; - // Granter account address - string granter = 3; - // Grantee account address - string grantee = 4; -} - -// EventRevoke is emitted on Msg/Revoke -message EventRevoke { - // Msg type URL for which an autorization is revoked - string msg_type_url = 2; - // Granter account address - string granter = 3; - // Grantee account address - string grantee = 4; -} diff --git a/ampd/proto/third_party/cosmos/authz/v1beta1/genesis.proto b/ampd/proto/third_party/cosmos/authz/v1beta1/genesis.proto deleted file mode 100644 index 310f62656..000000000 --- a/ampd/proto/third_party/cosmos/authz/v1beta1/genesis.proto +++ /dev/null @@ -1,13 +0,0 @@ -// Since: cosmos-sdk 0.43 -syntax = "proto3"; -package cosmos.authz.v1beta1; - -import "gogoproto/gogo.proto"; -import "cosmos/authz/v1beta1/authz.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/authz"; - -// GenesisState defines the authz module's genesis state. -message GenesisState { - repeated GrantAuthorization authorization = 1 [(gogoproto.nullable) = false]; -} diff --git a/ampd/proto/third_party/cosmos/authz/v1beta1/query.proto b/ampd/proto/third_party/cosmos/authz/v1beta1/query.proto deleted file mode 100644 index f668309be..000000000 --- a/ampd/proto/third_party/cosmos/authz/v1beta1/query.proto +++ /dev/null @@ -1,81 +0,0 @@ -// Since: cosmos-sdk 0.43 -syntax = "proto3"; -package cosmos.authz.v1beta1; - -import "google/api/annotations.proto"; -import "cosmos/base/query/v1beta1/pagination.proto"; -import "cosmos/authz/v1beta1/authz.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/authz"; - -// Query defines the gRPC querier service. -service Query { - // Returns list of `Authorization`, granted to the grantee by the granter. - rpc Grants(QueryGrantsRequest) returns (QueryGrantsResponse) { - option (google.api.http).get = "/cosmos/authz/v1beta1/grants"; - } - - // GranterGrants returns list of `GrantAuthorization`, granted by granter. - // - // Since: cosmos-sdk 0.45.2 - rpc GranterGrants(QueryGranterGrantsRequest) returns (QueryGranterGrantsResponse) { - option (google.api.http).get = "/cosmos/authz/v1beta1/grants/granter/{granter}"; - } - - // GranteeGrants returns a list of `GrantAuthorization` by grantee. - // - // Since: cosmos-sdk 0.45.2 - rpc GranteeGrants(QueryGranteeGrantsRequest) returns (QueryGranteeGrantsResponse) { - option (google.api.http).get = "/cosmos/authz/v1beta1/grants/grantee/{grantee}"; - } -} - -// QueryGrantsRequest is the request type for the Query/Grants RPC method. -message QueryGrantsRequest { - string granter = 1; - string grantee = 2; - // Optional, msg_type_url, when set, will query only grants matching given msg type. - string msg_type_url = 3; - // pagination defines an pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 4; -} - -// QueryGrantsResponse is the response type for the Query/Authorizations RPC method. -message QueryGrantsResponse { - // authorizations is a list of grants granted for grantee by granter. - repeated Grant grants = 1; - // pagination defines an pagination for the response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -// QueryGranterGrantsRequest is the request type for the Query/GranterGrants RPC method. -message QueryGranterGrantsRequest { - string granter = 1; - - // pagination defines an pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 2; -} - -// QueryGranterGrantsResponse is the response type for the Query/GranterGrants RPC method. -message QueryGranterGrantsResponse { - // grants is a list of grants granted by the granter. - repeated GrantAuthorization grants = 1; - // pagination defines an pagination for the response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -// QueryGranteeGrantsRequest is the request type for the Query/IssuedGrants RPC method. -message QueryGranteeGrantsRequest { - string grantee = 1; - - // pagination defines an pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 2; -} - -// QueryGranteeGrantsResponse is the response type for the Query/GranteeGrants RPC method. -message QueryGranteeGrantsResponse { - // grants is a list of grants granted to the grantee. - repeated GrantAuthorization grants = 1; - // pagination defines an pagination for the response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} diff --git a/ampd/proto/third_party/cosmos/authz/v1beta1/tx.proto b/ampd/proto/third_party/cosmos/authz/v1beta1/tx.proto deleted file mode 100644 index 457f0d662..000000000 --- a/ampd/proto/third_party/cosmos/authz/v1beta1/tx.proto +++ /dev/null @@ -1,70 +0,0 @@ -// Since: cosmos-sdk 0.43 -syntax = "proto3"; -package cosmos.authz.v1beta1; - -import "cosmos_proto/cosmos.proto"; -import "gogoproto/gogo.proto"; -import "google/protobuf/timestamp.proto"; -import "google/protobuf/any.proto"; -import "cosmos/base/abci/v1beta1/abci.proto"; -import "cosmos/authz/v1beta1/authz.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/authz"; -option (gogoproto.goproto_getters_all) = false; - -// Msg defines the authz Msg service. -service Msg { - // Grant grants the provided authorization to the grantee on the granter's - // account with the provided expiration time. If there is already a grant - // for the given (granter, grantee, Authorization) triple, then the grant - // will be overwritten. - rpc Grant(MsgGrant) returns (MsgGrantResponse); - - // Exec attempts to execute the provided messages using - // authorizations granted to the grantee. Each message should have only - // one signer corresponding to the granter of the authorization. - rpc Exec(MsgExec) returns (MsgExecResponse); - - // Revoke revokes any authorization corresponding to the provided method name on the - // granter's account that has been granted to the grantee. - rpc Revoke(MsgRevoke) returns (MsgRevokeResponse); -} - -// MsgGrant is a request type for Grant method. It declares authorization to the grantee -// on behalf of the granter with the provided expiration time. -message MsgGrant { - string granter = 1; - string grantee = 2; - - cosmos.authz.v1beta1.Grant grant = 3 [(gogoproto.nullable) = false]; -} - -// MsgExecResponse defines the Msg/MsgExecResponse response type. -message MsgExecResponse { - repeated bytes results = 1; -} - -// MsgExec attempts to execute the provided messages using -// authorizations granted to the grantee. Each message should have only -// one signer corresponding to the granter of the authorization. -message MsgExec { - string grantee = 1; - // Authorization Msg requests to execute. Each msg must implement Authorization interface - // The x/authz will try to find a grant matching (msg.signers[0], grantee, MsgTypeURL(msg)) - // triple and validate it. - repeated google.protobuf.Any msgs = 2 [(cosmos_proto.accepts_interface) = "sdk.Msg, authz.Authorization"]; -} - -// MsgGrantResponse defines the Msg/MsgGrant response type. -message MsgGrantResponse {} - -// MsgRevoke revokes any authorization with the provided sdk.Msg type on the -// granter's account with that has been granted to the grantee. -message MsgRevoke { - string granter = 1; - string grantee = 2; - string msg_type_url = 3; -} - -// MsgRevokeResponse defines the Msg/MsgRevokeResponse response type. -message MsgRevokeResponse {} diff --git a/ampd/proto/third_party/cosmos/bank/v1beta1/authz.proto b/ampd/proto/third_party/cosmos/bank/v1beta1/authz.proto deleted file mode 100644 index 4f58b15e4..000000000 --- a/ampd/proto/third_party/cosmos/bank/v1beta1/authz.proto +++ /dev/null @@ -1,19 +0,0 @@ -syntax = "proto3"; -package cosmos.bank.v1beta1; - -import "gogoproto/gogo.proto"; -import "cosmos_proto/cosmos.proto"; -import "cosmos/base/v1beta1/coin.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/bank/types"; - -// SendAuthorization allows the grantee to spend up to spend_limit coins from -// the granter's account. -// -// Since: cosmos-sdk 0.43 -message SendAuthorization { - option (cosmos_proto.implements_interface) = "Authorization"; - - repeated cosmos.base.v1beta1.Coin spend_limit = 1 - [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; -} diff --git a/ampd/proto/third_party/cosmos/bank/v1beta1/bank.proto b/ampd/proto/third_party/cosmos/bank/v1beta1/bank.proto deleted file mode 100644 index df91008df..000000000 --- a/ampd/proto/third_party/cosmos/bank/v1beta1/bank.proto +++ /dev/null @@ -1,96 +0,0 @@ -syntax = "proto3"; -package cosmos.bank.v1beta1; - -import "gogoproto/gogo.proto"; -import "cosmos_proto/cosmos.proto"; -import "cosmos/base/v1beta1/coin.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/bank/types"; - -// Params defines the parameters for the bank module. -message Params { - option (gogoproto.goproto_stringer) = false; - repeated SendEnabled send_enabled = 1 [(gogoproto.moretags) = "yaml:\"send_enabled,omitempty\""]; - bool default_send_enabled = 2 [(gogoproto.moretags) = "yaml:\"default_send_enabled,omitempty\""]; -} - -// SendEnabled maps coin denom to a send_enabled status (whether a denom is -// sendable). -message SendEnabled { - option (gogoproto.equal) = true; - option (gogoproto.goproto_stringer) = false; - string denom = 1; - bool enabled = 2; -} - -// Input models transaction input. -message Input { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - string address = 1; - repeated cosmos.base.v1beta1.Coin coins = 2 - [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; -} - -// Output models transaction outputs. -message Output { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - string address = 1; - repeated cosmos.base.v1beta1.Coin coins = 2 - [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; -} - -// Supply represents a struct that passively keeps track of the total supply -// amounts in the network. -// This message is deprecated now that supply is indexed by denom. -message Supply { - option deprecated = true; - - option (gogoproto.equal) = true; - option (gogoproto.goproto_getters) = false; - - option (cosmos_proto.implements_interface) = "*github.com/cosmos/cosmos-sdk/x/bank/legacy/v040.SupplyI"; - - repeated cosmos.base.v1beta1.Coin total = 1 - [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; -} - -// DenomUnit represents a struct that describes a given -// denomination unit of the basic token. -message DenomUnit { - // denom represents the string name of the given denom unit (e.g uatom). - string denom = 1; - // exponent represents power of 10 exponent that one must - // raise the base_denom to in order to equal the given DenomUnit's denom - // 1 denom = 1^exponent base_denom - // (e.g. with a base_denom of uatom, one can create a DenomUnit of 'atom' with - // exponent = 6, thus: 1 atom = 10^6 uatom). - uint32 exponent = 2; - // aliases is a list of string aliases for the given denom - repeated string aliases = 3; -} - -// Metadata represents a struct that describes -// a basic token. -message Metadata { - string description = 1; - // denom_units represents the list of DenomUnit's for a given coin - repeated DenomUnit denom_units = 2; - // base represents the base denom (should be the DenomUnit with exponent = 0). - string base = 3; - // display indicates the suggested denom that should be - // displayed in clients. - string display = 4; - // name defines the name of the token (eg: Cosmos Atom) - // - // Since: cosmos-sdk 0.43 - string name = 5; - // symbol is the token symbol usually shown on exchanges (eg: ATOM). This can - // be the same as the display. - // - // Since: cosmos-sdk 0.43 - string symbol = 6; -} diff --git a/ampd/proto/third_party/cosmos/bank/v1beta1/genesis.proto b/ampd/proto/third_party/cosmos/bank/v1beta1/genesis.proto deleted file mode 100644 index 8fd7329a0..000000000 --- a/ampd/proto/third_party/cosmos/bank/v1beta1/genesis.proto +++ /dev/null @@ -1,39 +0,0 @@ -syntax = "proto3"; -package cosmos.bank.v1beta1; - -import "gogoproto/gogo.proto"; -import "cosmos/base/v1beta1/coin.proto"; -import "cosmos/bank/v1beta1/bank.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/bank/types"; - -// GenesisState defines the bank module's genesis state. -message GenesisState { - // params defines all the paramaters of the module. - Params params = 1 [(gogoproto.nullable) = false]; - - // balances is an array containing the balances of all the accounts. - repeated Balance balances = 2 [(gogoproto.nullable) = false]; - - // supply represents the total supply. If it is left empty, then supply will be calculated based on the provided - // balances. Otherwise, it will be used to validate that the sum of the balances equals this amount. - repeated cosmos.base.v1beta1.Coin supply = 3 - [(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", (gogoproto.nullable) = false]; - - // denom_metadata defines the metadata of the differents coins. - repeated Metadata denom_metadata = 4 [(gogoproto.moretags) = "yaml:\"denom_metadata\"", (gogoproto.nullable) = false]; -} - -// Balance defines an account address and balance pair used in the bank module's -// genesis state. -message Balance { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // address is the address of the balance holder. - string address = 1; - - // coins defines the different coins this balance holds. - repeated cosmos.base.v1beta1.Coin coins = 2 - [(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", (gogoproto.nullable) = false]; -} diff --git a/ampd/proto/third_party/cosmos/bank/v1beta1/query.proto b/ampd/proto/third_party/cosmos/bank/v1beta1/query.proto deleted file mode 100644 index a567e073f..000000000 --- a/ampd/proto/third_party/cosmos/bank/v1beta1/query.proto +++ /dev/null @@ -1,193 +0,0 @@ -syntax = "proto3"; -package cosmos.bank.v1beta1; - -import "cosmos/base/query/v1beta1/pagination.proto"; -import "gogoproto/gogo.proto"; -import "google/api/annotations.proto"; -import "cosmos/base/v1beta1/coin.proto"; -import "cosmos/bank/v1beta1/bank.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/bank/types"; - -// Query defines the gRPC querier service. -service Query { - // Balance queries the balance of a single coin for a single account. - rpc Balance(QueryBalanceRequest) returns (QueryBalanceResponse) { - option (google.api.http).get = "/cosmos/bank/v1beta1/balances/{address}/by_denom"; - } - - // AllBalances queries the balance of all coins for a single account. - rpc AllBalances(QueryAllBalancesRequest) returns (QueryAllBalancesResponse) { - option (google.api.http).get = "/cosmos/bank/v1beta1/balances/{address}"; - } - - // SpendableBalances queries the spenable balance of all coins for a single - // account. - rpc SpendableBalances(QuerySpendableBalancesRequest) returns (QuerySpendableBalancesResponse) { - option (google.api.http).get = "/cosmos/bank/v1beta1/spendable_balances/{address}"; - } - - // TotalSupply queries the total supply of all coins. - rpc TotalSupply(QueryTotalSupplyRequest) returns (QueryTotalSupplyResponse) { - option (google.api.http).get = "/cosmos/bank/v1beta1/supply"; - } - - // SupplyOf queries the supply of a single coin. - rpc SupplyOf(QuerySupplyOfRequest) returns (QuerySupplyOfResponse) { - option (google.api.http).get = "/cosmos/bank/v1beta1/supply/{denom}"; - } - - // Params queries the parameters of x/bank module. - rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { - option (google.api.http).get = "/cosmos/bank/v1beta1/params"; - } - - // DenomsMetadata queries the client metadata of a given coin denomination. - rpc DenomMetadata(QueryDenomMetadataRequest) returns (QueryDenomMetadataResponse) { - option (google.api.http).get = "/cosmos/bank/v1beta1/denoms_metadata/{denom}"; - } - - // DenomsMetadata queries the client metadata for all registered coin denominations. - rpc DenomsMetadata(QueryDenomsMetadataRequest) returns (QueryDenomsMetadataResponse) { - option (google.api.http).get = "/cosmos/bank/v1beta1/denoms_metadata"; - } -} - -// QueryBalanceRequest is the request type for the Query/Balance RPC method. -message QueryBalanceRequest { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // address is the address to query balances for. - string address = 1; - - // denom is the coin denom to query balances for. - string denom = 2; -} - -// QueryBalanceResponse is the response type for the Query/Balance RPC method. -message QueryBalanceResponse { - // balance is the balance of the coin. - cosmos.base.v1beta1.Coin balance = 1; -} - -// QueryBalanceRequest is the request type for the Query/AllBalances RPC method. -message QueryAllBalancesRequest { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // address is the address to query balances for. - string address = 1; - - // pagination defines an optional pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 2; -} - -// QueryAllBalancesResponse is the response type for the Query/AllBalances RPC -// method. -message QueryAllBalancesResponse { - // balances is the balances of all the coins. - repeated cosmos.base.v1beta1.Coin balances = 1 - [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; - - // pagination defines the pagination in the response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -// QuerySpendableBalancesRequest defines the gRPC request structure for querying -// an account's spendable balances. -message QuerySpendableBalancesRequest { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // address is the address to query spendable balances for. - string address = 1; - - // pagination defines an optional pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 2; -} - -// QuerySpendableBalancesResponse defines the gRPC response structure for querying -// an account's spendable balances. -message QuerySpendableBalancesResponse { - // balances is the spendable balances of all the coins. - repeated cosmos.base.v1beta1.Coin balances = 1 - [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; - - // pagination defines the pagination in the response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -// QueryTotalSupplyRequest is the request type for the Query/TotalSupply RPC -// method. -message QueryTotalSupplyRequest { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // pagination defines an optional pagination for the request. - // - // Since: cosmos-sdk 0.43 - cosmos.base.query.v1beta1.PageRequest pagination = 1; -} - -// QueryTotalSupplyResponse is the response type for the Query/TotalSupply RPC -// method -message QueryTotalSupplyResponse { - // supply is the supply of the coins - repeated cosmos.base.v1beta1.Coin supply = 1 - [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; - - // pagination defines the pagination in the response. - // - // Since: cosmos-sdk 0.43 - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -// QuerySupplyOfRequest is the request type for the Query/SupplyOf RPC method. -message QuerySupplyOfRequest { - // denom is the coin denom to query balances for. - string denom = 1; -} - -// QuerySupplyOfResponse is the response type for the Query/SupplyOf RPC method. -message QuerySupplyOfResponse { - // amount is the supply of the coin. - cosmos.base.v1beta1.Coin amount = 1 [(gogoproto.nullable) = false]; -} - -// QueryParamsRequest defines the request type for querying x/bank parameters. -message QueryParamsRequest {} - -// QueryParamsResponse defines the response type for querying x/bank parameters. -message QueryParamsResponse { - Params params = 1 [(gogoproto.nullable) = false]; -} - -// QueryDenomsMetadataRequest is the request type for the Query/DenomsMetadata RPC method. -message QueryDenomsMetadataRequest { - // pagination defines an optional pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 1; -} - -// QueryDenomsMetadataResponse is the response type for the Query/DenomsMetadata RPC -// method. -message QueryDenomsMetadataResponse { - // metadata provides the client information for all the registered tokens. - repeated Metadata metadatas = 1 [(gogoproto.nullable) = false]; - - // pagination defines the pagination in the response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -// QueryDenomMetadataRequest is the request type for the Query/DenomMetadata RPC method. -message QueryDenomMetadataRequest { - // denom is the coin denom to query the metadata for. - string denom = 1; -} - -// QueryDenomMetadataResponse is the response type for the Query/DenomMetadata RPC -// method. -message QueryDenomMetadataResponse { - // metadata describes and provides all the client information for the requested token. - Metadata metadata = 1 [(gogoproto.nullable) = false]; -} diff --git a/ampd/proto/third_party/cosmos/bank/v1beta1/tx.proto b/ampd/proto/third_party/cosmos/bank/v1beta1/tx.proto deleted file mode 100644 index 26b2ab41f..000000000 --- a/ampd/proto/third_party/cosmos/bank/v1beta1/tx.proto +++ /dev/null @@ -1,42 +0,0 @@ -syntax = "proto3"; -package cosmos.bank.v1beta1; - -import "gogoproto/gogo.proto"; -import "cosmos/base/v1beta1/coin.proto"; -import "cosmos/bank/v1beta1/bank.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/bank/types"; - -// Msg defines the bank Msg service. -service Msg { - // Send defines a method for sending coins from one account to another account. - rpc Send(MsgSend) returns (MsgSendResponse); - - // MultiSend defines a method for sending coins from some accounts to other accounts. - rpc MultiSend(MsgMultiSend) returns (MsgMultiSendResponse); -} - -// MsgSend represents a message to send coins from one account to another. -message MsgSend { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - string from_address = 1 [(gogoproto.moretags) = "yaml:\"from_address\""]; - string to_address = 2 [(gogoproto.moretags) = "yaml:\"to_address\""]; - repeated cosmos.base.v1beta1.Coin amount = 3 - [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; -} - -// MsgSendResponse defines the Msg/Send response type. -message MsgSendResponse {} - -// MsgMultiSend represents an arbitrary multi-in, multi-out send message. -message MsgMultiSend { - option (gogoproto.equal) = false; - - repeated Input inputs = 1 [(gogoproto.nullable) = false]; - repeated Output outputs = 2 [(gogoproto.nullable) = false]; -} - -// MsgMultiSendResponse defines the Msg/MultiSend response type. -message MsgMultiSendResponse {} diff --git a/ampd/proto/third_party/cosmos/base/abci/v1beta1/abci.proto b/ampd/proto/third_party/cosmos/base/abci/v1beta1/abci.proto deleted file mode 100644 index e24ae7bd5..000000000 --- a/ampd/proto/third_party/cosmos/base/abci/v1beta1/abci.proto +++ /dev/null @@ -1,144 +0,0 @@ -syntax = "proto3"; -package cosmos.base.abci.v1beta1; - -import "gogoproto/gogo.proto"; -import "tendermint/abci/types.proto"; -import "google/protobuf/any.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/types"; -option (gogoproto.goproto_stringer_all) = false; - -// TxResponse defines a structure containing relevant tx data and metadata. The -// tags are stringified and the log is JSON decoded. -message TxResponse { - option (gogoproto.goproto_getters) = false; - // The block height - int64 height = 1; - // The transaction hash. - string txhash = 2 [(gogoproto.customname) = "TxHash"]; - // Namespace for the Code - string codespace = 3; - // Response code. - uint32 code = 4; - // Result bytes, if any. - string data = 5; - // The output of the application's logger (raw string). May be - // non-deterministic. - string raw_log = 6; - // The output of the application's logger (typed). May be non-deterministic. - repeated ABCIMessageLog logs = 7 [(gogoproto.castrepeated) = "ABCIMessageLogs", (gogoproto.nullable) = false]; - // Additional information. May be non-deterministic. - string info = 8; - // Amount of gas requested for transaction. - int64 gas_wanted = 9; - // Amount of gas consumed by transaction. - int64 gas_used = 10; - // The request transaction bytes. - google.protobuf.Any tx = 11; - // Time of the previous block. For heights > 1, it's the weighted median of - // the timestamps of the valid votes in the block.LastCommit. For height == 1, - // it's genesis time. - string timestamp = 12; - // Events defines all the events emitted by processing a transaction. Note, - // these events include those emitted by processing all the messages and those - // emitted from the ante handler. Whereas Logs contains the events, with - // additional metadata, emitted only by processing the messages. - // - // Since: cosmos-sdk 0.42.11, 0.44.5, 0.45 - repeated tendermint.abci.Event events = 13 [(gogoproto.nullable) = false]; -} - -// ABCIMessageLog defines a structure containing an indexed tx ABCI message log. -message ABCIMessageLog { - option (gogoproto.stringer) = true; - - uint32 msg_index = 1; - string log = 2; - - // Events contains a slice of Event objects that were emitted during some - // execution. - repeated StringEvent events = 3 [(gogoproto.castrepeated) = "StringEvents", (gogoproto.nullable) = false]; -} - -// StringEvent defines en Event object wrapper where all the attributes -// contain key/value pairs that are strings instead of raw bytes. -message StringEvent { - option (gogoproto.stringer) = true; - - string type = 1; - repeated Attribute attributes = 2 [(gogoproto.nullable) = false]; -} - -// Attribute defines an attribute wrapper where the key and value are -// strings instead of raw bytes. -message Attribute { - string key = 1; - string value = 2; -} - -// GasInfo defines tx execution gas context. -message GasInfo { - // GasWanted is the maximum units of work we allow this tx to perform. - uint64 gas_wanted = 1 [(gogoproto.moretags) = "yaml:\"gas_wanted\""]; - - // GasUsed is the amount of gas actually consumed. - uint64 gas_used = 2 [(gogoproto.moretags) = "yaml:\"gas_used\""]; -} - -// Result is the union of ResponseFormat and ResponseCheckTx. -message Result { - option (gogoproto.goproto_getters) = false; - - // Data is any data returned from message or handler execution. It MUST be - // length prefixed in order to separate data from multiple message executions. - bytes data = 1; - - // Log contains the log information from message or handler execution. - string log = 2; - - // Events contains a slice of Event objects that were emitted during message - // or handler execution. - repeated tendermint.abci.Event events = 3 [(gogoproto.nullable) = false]; -} - -// SimulationResponse defines the response generated when a transaction is -// successfully simulated. -message SimulationResponse { - GasInfo gas_info = 1 [(gogoproto.embed) = true, (gogoproto.nullable) = false]; - Result result = 2; -} - -// MsgData defines the data returned in a Result object during message -// execution. -message MsgData { - option (gogoproto.stringer) = true; - - string msg_type = 1; - bytes data = 2; -} - -// TxMsgData defines a list of MsgData. A transaction will have a MsgData object -// for each message. -message TxMsgData { - option (gogoproto.stringer) = true; - - repeated MsgData data = 1; -} - -// SearchTxsResult defines a structure for querying txs pageable -message SearchTxsResult { - option (gogoproto.stringer) = true; - - // Count of all txs - uint64 total_count = 1 [(gogoproto.moretags) = "yaml:\"total_count\"", (gogoproto.jsontag) = "total_count"]; - // Count of txs in current page - uint64 count = 2; - // Index of current page, start from 1 - uint64 page_number = 3 [(gogoproto.moretags) = "yaml:\"page_number\"", (gogoproto.jsontag) = "page_number"]; - // Count of total pages - uint64 page_total = 4 [(gogoproto.moretags) = "yaml:\"page_total\"", (gogoproto.jsontag) = "page_total"]; - // Max count txs per page - uint64 limit = 5; - // List of txs in current page - repeated TxResponse txs = 6; -} diff --git a/ampd/proto/third_party/cosmos/base/kv/v1beta1/kv.proto b/ampd/proto/third_party/cosmos/base/kv/v1beta1/kv.proto deleted file mode 100644 index 4e9b8d285..000000000 --- a/ampd/proto/third_party/cosmos/base/kv/v1beta1/kv.proto +++ /dev/null @@ -1,17 +0,0 @@ -syntax = "proto3"; -package cosmos.base.kv.v1beta1; - -import "gogoproto/gogo.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/types/kv"; - -// Pairs defines a repeated slice of Pair objects. -message Pairs { - repeated Pair pairs = 1 [(gogoproto.nullable) = false]; -} - -// Pair defines a key/value bytes tuple. -message Pair { - bytes key = 1; - bytes value = 2; -} diff --git a/ampd/proto/third_party/cosmos/base/node/v1beta1/query.proto b/ampd/proto/third_party/cosmos/base/node/v1beta1/query.proto deleted file mode 100644 index 8070f7b90..000000000 --- a/ampd/proto/third_party/cosmos/base/node/v1beta1/query.proto +++ /dev/null @@ -1,22 +0,0 @@ -syntax = "proto3"; -package cosmos.base.node.v1beta1; - -import "google/api/annotations.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/client/grpc/node"; - -// Service defines the gRPC querier service for node related queries. -service Service { - // Config queries for the operator configuration. - rpc Config(ConfigRequest) returns (ConfigResponse) { - option (google.api.http).get = "/cosmos/base/node/v1beta1/config"; - } -} - -// ConfigRequest defines the request structure for the Config gRPC query. -message ConfigRequest {} - -// ConfigResponse defines the response structure for the Config gRPC query. -message ConfigResponse { - string minimum_gas_price = 1; -} diff --git a/ampd/proto/third_party/cosmos/base/query/v1beta1/pagination.proto b/ampd/proto/third_party/cosmos/base/query/v1beta1/pagination.proto deleted file mode 100644 index cd5eb066d..000000000 --- a/ampd/proto/third_party/cosmos/base/query/v1beta1/pagination.proto +++ /dev/null @@ -1,55 +0,0 @@ -syntax = "proto3"; -package cosmos.base.query.v1beta1; - -option go_package = "github.com/cosmos/cosmos-sdk/types/query"; - -// PageRequest is to be embedded in gRPC request messages for efficient -// pagination. Ex: -// -// message SomeRequest { -// Foo some_parameter = 1; -// PageRequest pagination = 2; -// } -message PageRequest { - // key is a value returned in PageResponse.next_key to begin - // querying the next page most efficiently. Only one of offset or key - // should be set. - bytes key = 1; - - // offset is a numeric offset that can be used when key is unavailable. - // It is less efficient than using key. Only one of offset or key should - // be set. - uint64 offset = 2; - - // limit is the total number of results to be returned in the result page. - // If left empty it will default to a value to be set by each app. - uint64 limit = 3; - - // count_total is set to true to indicate that the result set should include - // a count of the total number of items available for pagination in UIs. - // count_total is only respected when offset is used. It is ignored when key - // is set. - bool count_total = 4; - - // reverse is set to true if results are to be returned in the descending order. - // - // Since: cosmos-sdk 0.43 - bool reverse = 5; -} - -// PageResponse is to be embedded in gRPC response messages where the -// corresponding request message has used PageRequest. -// -// message SomeResponse { -// repeated Bar results = 1; -// PageResponse page = 2; -// } -message PageResponse { - // next_key is the key to be passed to PageRequest.key to - // query the next page most efficiently - bytes next_key = 1; - - // total is total number of results available if PageRequest.count_total - // was set, its value is undefined otherwise - uint64 total = 2; -} diff --git a/ampd/proto/third_party/cosmos/base/reflection/v1beta1/reflection.proto b/ampd/proto/third_party/cosmos/base/reflection/v1beta1/reflection.proto deleted file mode 100644 index 22670e72b..000000000 --- a/ampd/proto/third_party/cosmos/base/reflection/v1beta1/reflection.proto +++ /dev/null @@ -1,44 +0,0 @@ -syntax = "proto3"; -package cosmos.base.reflection.v1beta1; - -import "google/api/annotations.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/client/grpc/reflection"; - -// ReflectionService defines a service for interface reflection. -service ReflectionService { - // ListAllInterfaces lists all the interfaces registered in the interface - // registry. - rpc ListAllInterfaces(ListAllInterfacesRequest) returns (ListAllInterfacesResponse) { - option (google.api.http).get = "/cosmos/base/reflection/v1beta1/interfaces"; - }; - - // ListImplementations list all the concrete types that implement a given - // interface. - rpc ListImplementations(ListImplementationsRequest) returns (ListImplementationsResponse) { - option (google.api.http).get = "/cosmos/base/reflection/v1beta1/interfaces/" - "{interface_name}/implementations"; - }; -} - -// ListAllInterfacesRequest is the request type of the ListAllInterfaces RPC. -message ListAllInterfacesRequest {} - -// ListAllInterfacesResponse is the response type of the ListAllInterfaces RPC. -message ListAllInterfacesResponse { - // interface_names is an array of all the registered interfaces. - repeated string interface_names = 1; -} - -// ListImplementationsRequest is the request type of the ListImplementations -// RPC. -message ListImplementationsRequest { - // interface_name defines the interface to query the implementations for. - string interface_name = 1; -} - -// ListImplementationsResponse is the response type of the ListImplementations -// RPC. -message ListImplementationsResponse { - repeated string implementation_message_names = 1; -} diff --git a/ampd/proto/third_party/cosmos/base/reflection/v2alpha1/reflection.proto b/ampd/proto/third_party/cosmos/base/reflection/v2alpha1/reflection.proto deleted file mode 100644 index d5b048558..000000000 --- a/ampd/proto/third_party/cosmos/base/reflection/v2alpha1/reflection.proto +++ /dev/null @@ -1,218 +0,0 @@ -// Since: cosmos-sdk 0.43 -syntax = "proto3"; -package cosmos.base.reflection.v2alpha1; - -import "google/api/annotations.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/server/grpc/reflection/v2alpha1"; - -// AppDescriptor describes a cosmos-sdk based application -message AppDescriptor { - // AuthnDescriptor provides information on how to authenticate transactions on the application - // NOTE: experimental and subject to change in future releases. - AuthnDescriptor authn = 1; - // chain provides the chain descriptor - ChainDescriptor chain = 2; - // codec provides metadata information regarding codec related types - CodecDescriptor codec = 3; - // configuration provides metadata information regarding the sdk.Config type - ConfigurationDescriptor configuration = 4; - // query_services provides metadata information regarding the available queriable endpoints - QueryServicesDescriptor query_services = 5; - // tx provides metadata information regarding how to send transactions to the given application - TxDescriptor tx = 6; -} - -// TxDescriptor describes the accepted transaction type -message TxDescriptor { - // fullname is the protobuf fullname of the raw transaction type (for instance the tx.Tx type) - // it is not meant to support polymorphism of transaction types, it is supposed to be used by - // reflection clients to understand if they can handle a specific transaction type in an application. - string fullname = 1; - // msgs lists the accepted application messages (sdk.Msg) - repeated MsgDescriptor msgs = 2; -} - -// AuthnDescriptor provides information on how to sign transactions without relying -// on the online RPCs GetTxMetadata and CombineUnsignedTxAndSignatures -message AuthnDescriptor { - // sign_modes defines the supported signature algorithm - repeated SigningModeDescriptor sign_modes = 1; -} - -// SigningModeDescriptor provides information on a signing flow of the application -// NOTE(fdymylja): here we could go as far as providing an entire flow on how -// to sign a message given a SigningModeDescriptor, but it's better to think about -// this another time -message SigningModeDescriptor { - // name defines the unique name of the signing mode - string name = 1; - // number is the unique int32 identifier for the sign_mode enum - int32 number = 2; - // authn_info_provider_method_fullname defines the fullname of the method to call to get - // the metadata required to authenticate using the provided sign_modes - string authn_info_provider_method_fullname = 3; -} - -// ChainDescriptor describes chain information of the application -message ChainDescriptor { - // id is the chain id - string id = 1; -} - -// CodecDescriptor describes the registered interfaces and provides metadata information on the types -message CodecDescriptor { - // interfaces is a list of the registerted interfaces descriptors - repeated InterfaceDescriptor interfaces = 1; -} - -// InterfaceDescriptor describes the implementation of an interface -message InterfaceDescriptor { - // fullname is the name of the interface - string fullname = 1; - // interface_accepting_messages contains information regarding the proto messages which contain the interface as - // google.protobuf.Any field - repeated InterfaceAcceptingMessageDescriptor interface_accepting_messages = 2; - // interface_implementers is a list of the descriptors of the interface implementers - repeated InterfaceImplementerDescriptor interface_implementers = 3; -} - -// InterfaceImplementerDescriptor describes an interface implementer -message InterfaceImplementerDescriptor { - // fullname is the protobuf queryable name of the interface implementer - string fullname = 1; - // type_url defines the type URL used when marshalling the type as any - // this is required so we can provide type safe google.protobuf.Any marshalling and - // unmarshalling, making sure that we don't accept just 'any' type - // in our interface fields - string type_url = 2; -} - -// InterfaceAcceptingMessageDescriptor describes a protobuf message which contains -// an interface represented as a google.protobuf.Any -message InterfaceAcceptingMessageDescriptor { - // fullname is the protobuf fullname of the type containing the interface - string fullname = 1; - // field_descriptor_names is a list of the protobuf name (not fullname) of the field - // which contains the interface as google.protobuf.Any (the interface is the same, but - // it can be in multiple fields of the same proto message) - repeated string field_descriptor_names = 2; -} - -// ConfigurationDescriptor contains metadata information on the sdk.Config -message ConfigurationDescriptor { - // bech32_account_address_prefix is the account address prefix - string bech32_account_address_prefix = 1; -} - -// MsgDescriptor describes a cosmos-sdk message that can be delivered with a transaction -message MsgDescriptor { - // msg_type_url contains the TypeURL of a sdk.Msg. - string msg_type_url = 1; -} - -// ReflectionService defines a service for application reflection. -service ReflectionService { - // GetAuthnDescriptor returns information on how to authenticate transactions in the application - // NOTE: this RPC is still experimental and might be subject to breaking changes or removal in - // future releases of the cosmos-sdk. - rpc GetAuthnDescriptor(GetAuthnDescriptorRequest) returns (GetAuthnDescriptorResponse) { - option (google.api.http).get = "/cosmos/base/reflection/v1beta1/app_descriptor/authn"; - } - // GetChainDescriptor returns the description of the chain - rpc GetChainDescriptor(GetChainDescriptorRequest) returns (GetChainDescriptorResponse) { - option (google.api.http).get = "/cosmos/base/reflection/v1beta1/app_descriptor/chain"; - }; - // GetCodecDescriptor returns the descriptor of the codec of the application - rpc GetCodecDescriptor(GetCodecDescriptorRequest) returns (GetCodecDescriptorResponse) { - option (google.api.http).get = "/cosmos/base/reflection/v1beta1/app_descriptor/codec"; - } - // GetConfigurationDescriptor returns the descriptor for the sdk.Config of the application - rpc GetConfigurationDescriptor(GetConfigurationDescriptorRequest) returns (GetConfigurationDescriptorResponse) { - option (google.api.http).get = "/cosmos/base/reflection/v1beta1/app_descriptor/configuration"; - } - // GetQueryServicesDescriptor returns the available gRPC queryable services of the application - rpc GetQueryServicesDescriptor(GetQueryServicesDescriptorRequest) returns (GetQueryServicesDescriptorResponse) { - option (google.api.http).get = "/cosmos/base/reflection/v1beta1/app_descriptor/query_services"; - } - // GetTxDescriptor returns information on the used transaction object and available msgs that can be used - rpc GetTxDescriptor(GetTxDescriptorRequest) returns (GetTxDescriptorResponse) { - option (google.api.http).get = "/cosmos/base/reflection/v1beta1/app_descriptor/tx_descriptor"; - } -} - -// GetAuthnDescriptorRequest is the request used for the GetAuthnDescriptor RPC -message GetAuthnDescriptorRequest {} -// GetAuthnDescriptorResponse is the response returned by the GetAuthnDescriptor RPC -message GetAuthnDescriptorResponse { - // authn describes how to authenticate to the application when sending transactions - AuthnDescriptor authn = 1; -} - -// GetChainDescriptorRequest is the request used for the GetChainDescriptor RPC -message GetChainDescriptorRequest {} -// GetChainDescriptorResponse is the response returned by the GetChainDescriptor RPC -message GetChainDescriptorResponse { - // chain describes application chain information - ChainDescriptor chain = 1; -} - -// GetCodecDescriptorRequest is the request used for the GetCodecDescriptor RPC -message GetCodecDescriptorRequest {} -// GetCodecDescriptorResponse is the response returned by the GetCodecDescriptor RPC -message GetCodecDescriptorResponse { - // codec describes the application codec such as registered interfaces and implementations - CodecDescriptor codec = 1; -} - -// GetConfigurationDescriptorRequest is the request used for the GetConfigurationDescriptor RPC -message GetConfigurationDescriptorRequest {} -// GetConfigurationDescriptorResponse is the response returned by the GetConfigurationDescriptor RPC -message GetConfigurationDescriptorResponse { - // config describes the application's sdk.Config - ConfigurationDescriptor config = 1; -} - -// GetQueryServicesDescriptorRequest is the request used for the GetQueryServicesDescriptor RPC -message GetQueryServicesDescriptorRequest {} -// GetQueryServicesDescriptorResponse is the response returned by the GetQueryServicesDescriptor RPC -message GetQueryServicesDescriptorResponse { - // queries provides information on the available queryable services - QueryServicesDescriptor queries = 1; -} - -// GetTxDescriptorRequest is the request used for the GetTxDescriptor RPC -message GetTxDescriptorRequest {} -// GetTxDescriptorResponse is the response returned by the GetTxDescriptor RPC -message GetTxDescriptorResponse { - // tx provides information on msgs that can be forwarded to the application - // alongside the accepted transaction protobuf type - TxDescriptor tx = 1; -} - -// QueryServicesDescriptor contains the list of cosmos-sdk queriable services -message QueryServicesDescriptor { - // query_services is a list of cosmos-sdk QueryServiceDescriptor - repeated QueryServiceDescriptor query_services = 1; -} - -// QueryServiceDescriptor describes a cosmos-sdk queryable service -message QueryServiceDescriptor { - // fullname is the protobuf fullname of the service descriptor - string fullname = 1; - // is_module describes if this service is actually exposed by an application's module - bool is_module = 2; - // methods provides a list of query service methods - repeated QueryMethodDescriptor methods = 3; -} - -// QueryMethodDescriptor describes a queryable method of a query service -// no other info is provided beside method name and tendermint queryable path -// because it would be redundant with the grpc reflection service -message QueryMethodDescriptor { - // name is the protobuf name (not fullname) of the method - string name = 1; - // full_query_path is the path that can be used to query - // this method via tendermint abci.Query - string full_query_path = 2; -} diff --git a/ampd/proto/third_party/cosmos/base/snapshots/v1beta1/snapshot.proto b/ampd/proto/third_party/cosmos/base/snapshots/v1beta1/snapshot.proto deleted file mode 100644 index 6dcc4a933..000000000 --- a/ampd/proto/third_party/cosmos/base/snapshots/v1beta1/snapshot.proto +++ /dev/null @@ -1,57 +0,0 @@ -syntax = "proto3"; -package cosmos.base.snapshots.v1beta1; - -import "gogoproto/gogo.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/snapshots/types"; - -// Snapshot contains Tendermint state sync snapshot info. -message Snapshot { - uint64 height = 1; - uint32 format = 2; - uint32 chunks = 3; - bytes hash = 4; - Metadata metadata = 5 [(gogoproto.nullable) = false]; -} - -// Metadata contains SDK-specific snapshot metadata. -message Metadata { - repeated bytes chunk_hashes = 1; // SHA-256 chunk hashes -} - -// SnapshotItem is an item contained in a rootmulti.Store snapshot. -message SnapshotItem { - // item is the specific type of snapshot item. - oneof item { - SnapshotStoreItem store = 1; - SnapshotIAVLItem iavl = 2 [(gogoproto.customname) = "IAVL"]; - SnapshotExtensionMeta extension = 3; - SnapshotExtensionPayload extension_payload = 4; - } -} - -// SnapshotStoreItem contains metadata about a snapshotted store. -message SnapshotStoreItem { - string name = 1; -} - -// SnapshotIAVLItem is an exported IAVL node. -message SnapshotIAVLItem { - bytes key = 1; - bytes value = 2; - // version is block height - int64 version = 3; - // height is depth of the tree. - int32 height = 4; -} - -// SnapshotExtensionMeta contains metadata about an external snapshotter. -message SnapshotExtensionMeta { - string name = 1; - uint32 format = 2; -} - -// SnapshotExtensionPayload contains payloads of an external snapshotter. -message SnapshotExtensionPayload { - bytes payload = 1; -} diff --git a/ampd/proto/third_party/cosmos/base/store/v1beta1/commit_info.proto b/ampd/proto/third_party/cosmos/base/store/v1beta1/commit_info.proto deleted file mode 100644 index 98a33d30e..000000000 --- a/ampd/proto/third_party/cosmos/base/store/v1beta1/commit_info.proto +++ /dev/null @@ -1,29 +0,0 @@ -syntax = "proto3"; -package cosmos.base.store.v1beta1; - -import "gogoproto/gogo.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/store/types"; - -// CommitInfo defines commit information used by the multi-store when committing -// a version/height. -message CommitInfo { - int64 version = 1; - repeated StoreInfo store_infos = 2 [(gogoproto.nullable) = false]; -} - -// StoreInfo defines store-specific commit information. It contains a reference -// between a store name and the commit ID. -message StoreInfo { - string name = 1; - CommitID commit_id = 2 [(gogoproto.nullable) = false]; -} - -// CommitID defines the committment information when a specific store is -// committed. -message CommitID { - option (gogoproto.goproto_stringer) = false; - - int64 version = 1; - bytes hash = 2; -} diff --git a/ampd/proto/third_party/cosmos/base/store/v1beta1/listening.proto b/ampd/proto/third_party/cosmos/base/store/v1beta1/listening.proto deleted file mode 100644 index 753f7c165..000000000 --- a/ampd/proto/third_party/cosmos/base/store/v1beta1/listening.proto +++ /dev/null @@ -1,34 +0,0 @@ -syntax = "proto3"; -package cosmos.base.store.v1beta1; - -import "tendermint/abci/types.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/store/types"; - -// StoreKVPair is a KVStore KVPair used for listening to state changes (Sets and Deletes) -// It optionally includes the StoreKey for the originating KVStore and a Boolean flag to distinguish between Sets and -// Deletes -// -// Since: cosmos-sdk 0.43 -message StoreKVPair { - string store_key = 1; // the store key for the KVStore this pair originates from - bool delete = 2; // true indicates a delete operation, false indicates a set operation - bytes key = 3; - bytes value = 4; -} - -// BlockMetadata contains all the abci event data of a block -// the file streamer dump them into files together with the state changes. -message BlockMetadata { - // DeliverTx encapulate deliver tx request and response. - message DeliverTx { - tendermint.abci.RequestDeliverTx request = 1; - tendermint.abci.ResponseDeliverTx response = 2; - } - tendermint.abci.RequestBeginBlock request_begin_block = 1; - tendermint.abci.ResponseBeginBlock response_begin_block = 2; - repeated DeliverTx deliver_txs = 3; - tendermint.abci.RequestEndBlock request_end_block = 4; - tendermint.abci.ResponseEndBlock response_end_block = 5; - tendermint.abci.ResponseCommit response_commit = 6; -} diff --git a/ampd/proto/third_party/cosmos/base/tendermint/v1beta1/query.proto b/ampd/proto/third_party/cosmos/base/tendermint/v1beta1/query.proto deleted file mode 100644 index 98542d23d..000000000 --- a/ampd/proto/third_party/cosmos/base/tendermint/v1beta1/query.proto +++ /dev/null @@ -1,138 +0,0 @@ -syntax = "proto3"; -package cosmos.base.tendermint.v1beta1; - -import "gogoproto/gogo.proto"; -import "google/protobuf/any.proto"; -import "google/api/annotations.proto"; -import "tendermint/p2p/types.proto"; -import "tendermint/types/block.proto"; -import "tendermint/types/types.proto"; -import "cosmos/base/query/v1beta1/pagination.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/client/grpc/tmservice"; - -// Service defines the gRPC querier service for tendermint queries. -service Service { - // GetNodeInfo queries the current node info. - rpc GetNodeInfo(GetNodeInfoRequest) returns (GetNodeInfoResponse) { - option (google.api.http).get = "/cosmos/base/tendermint/v1beta1/node_info"; - } - // GetSyncing queries node syncing. - rpc GetSyncing(GetSyncingRequest) returns (GetSyncingResponse) { - option (google.api.http).get = "/cosmos/base/tendermint/v1beta1/syncing"; - } - // GetLatestBlock returns the latest block. - rpc GetLatestBlock(GetLatestBlockRequest) returns (GetLatestBlockResponse) { - option (google.api.http).get = "/cosmos/base/tendermint/v1beta1/blocks/latest"; - } - // GetBlockByHeight queries block for given height. - rpc GetBlockByHeight(GetBlockByHeightRequest) returns (GetBlockByHeightResponse) { - option (google.api.http).get = "/cosmos/base/tendermint/v1beta1/blocks/{height}"; - } - - // GetLatestValidatorSet queries latest validator-set. - rpc GetLatestValidatorSet(GetLatestValidatorSetRequest) returns (GetLatestValidatorSetResponse) { - option (google.api.http).get = "/cosmos/base/tendermint/v1beta1/validatorsets/latest"; - } - // GetValidatorSetByHeight queries validator-set at a given height. - rpc GetValidatorSetByHeight(GetValidatorSetByHeightRequest) returns (GetValidatorSetByHeightResponse) { - option (google.api.http).get = "/cosmos/base/tendermint/v1beta1/validatorsets/{height}"; - } -} - -// GetValidatorSetByHeightRequest is the request type for the Query/GetValidatorSetByHeight RPC method. -message GetValidatorSetByHeightRequest { - int64 height = 1; - // pagination defines an pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 2; -} - -// GetValidatorSetByHeightResponse is the response type for the Query/GetValidatorSetByHeight RPC method. -message GetValidatorSetByHeightResponse { - int64 block_height = 1; - repeated Validator validators = 2; - // pagination defines an pagination for the response. - cosmos.base.query.v1beta1.PageResponse pagination = 3; -} - -// GetLatestValidatorSetRequest is the request type for the Query/GetValidatorSetByHeight RPC method. -message GetLatestValidatorSetRequest { - // pagination defines an pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 1; -} - -// GetLatestValidatorSetResponse is the response type for the Query/GetValidatorSetByHeight RPC method. -message GetLatestValidatorSetResponse { - int64 block_height = 1; - repeated Validator validators = 2; - // pagination defines an pagination for the response. - cosmos.base.query.v1beta1.PageResponse pagination = 3; -} - -// Validator is the type for the validator-set. -message Validator { - string address = 1; - google.protobuf.Any pub_key = 2; - int64 voting_power = 3; - int64 proposer_priority = 4; -} - -// GetBlockByHeightRequest is the request type for the Query/GetBlockByHeight RPC method. -message GetBlockByHeightRequest { - int64 height = 1; -} - -// GetBlockByHeightResponse is the response type for the Query/GetBlockByHeight RPC method. -message GetBlockByHeightResponse { - .tendermint.types.BlockID block_id = 1; - .tendermint.types.Block block = 2; -} - -// GetLatestBlockRequest is the request type for the Query/GetLatestBlock RPC method. -message GetLatestBlockRequest {} - -// GetLatestBlockResponse is the response type for the Query/GetLatestBlock RPC method. -message GetLatestBlockResponse { - .tendermint.types.BlockID block_id = 1; - .tendermint.types.Block block = 2; -} - -// GetSyncingRequest is the request type for the Query/GetSyncing RPC method. -message GetSyncingRequest {} - -// GetSyncingResponse is the response type for the Query/GetSyncing RPC method. -message GetSyncingResponse { - bool syncing = 1; -} - -// GetNodeInfoRequest is the request type for the Query/GetNodeInfo RPC method. -message GetNodeInfoRequest {} - -// GetNodeInfoResponse is the request type for the Query/GetNodeInfo RPC method. -message GetNodeInfoResponse { - .tendermint.p2p.DefaultNodeInfo default_node_info = 1; - VersionInfo application_version = 2; -} - -// VersionInfo is the type for the GetNodeInfoResponse message. -message VersionInfo { - string name = 1; - string app_name = 2; - string version = 3; - string git_commit = 4; - string build_tags = 5; - string go_version = 6; - repeated Module build_deps = 7; - // Since: cosmos-sdk 0.43 - string cosmos_sdk_version = 8; -} - -// Module is the type for VersionInfo -message Module { - // module path - string path = 1; - // module version - string version = 2; - // checksum - string sum = 3; -} diff --git a/ampd/proto/third_party/cosmos/base/v1beta1/coin.proto b/ampd/proto/third_party/cosmos/base/v1beta1/coin.proto deleted file mode 100644 index fab75284b..000000000 --- a/ampd/proto/third_party/cosmos/base/v1beta1/coin.proto +++ /dev/null @@ -1,40 +0,0 @@ -syntax = "proto3"; -package cosmos.base.v1beta1; - -import "gogoproto/gogo.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/types"; -option (gogoproto.goproto_stringer_all) = false; -option (gogoproto.stringer_all) = false; - -// Coin defines a token with a denomination and an amount. -// -// NOTE: The amount field is an Int which implements the custom method -// signatures required by gogoproto. -message Coin { - option (gogoproto.equal) = true; - - string denom = 1; - string amount = 2 [(gogoproto.customtype) = "Int", (gogoproto.nullable) = false]; -} - -// DecCoin defines a token with a denomination and a decimal amount. -// -// NOTE: The amount field is an Dec which implements the custom method -// signatures required by gogoproto. -message DecCoin { - option (gogoproto.equal) = true; - - string denom = 1; - string amount = 2 [(gogoproto.customtype) = "Dec", (gogoproto.nullable) = false]; -} - -// IntProto defines a Protobuf wrapper around an Int object. -message IntProto { - string int = 1 [(gogoproto.customtype) = "Int", (gogoproto.nullable) = false]; -} - -// DecProto defines a Protobuf wrapper around a Dec object. -message DecProto { - string dec = 1 [(gogoproto.customtype) = "Dec", (gogoproto.nullable) = false]; -} diff --git a/ampd/proto/third_party/cosmos/capability/v1beta1/capability.proto b/ampd/proto/third_party/cosmos/capability/v1beta1/capability.proto deleted file mode 100644 index 1c8332f34..000000000 --- a/ampd/proto/third_party/cosmos/capability/v1beta1/capability.proto +++ /dev/null @@ -1,30 +0,0 @@ -syntax = "proto3"; -package cosmos.capability.v1beta1; - -option go_package = "github.com/cosmos/cosmos-sdk/x/capability/types"; - -import "gogoproto/gogo.proto"; - -// Capability defines an implementation of an object capability. The index -// provided to a Capability must be globally unique. -message Capability { - option (gogoproto.goproto_stringer) = false; - - uint64 index = 1 [(gogoproto.moretags) = "yaml:\"index\""]; -} - -// Owner defines a single capability owner. An owner is defined by the name of -// capability and the module name. -message Owner { - option (gogoproto.goproto_stringer) = false; - option (gogoproto.goproto_getters) = false; - - string module = 1 [(gogoproto.moretags) = "yaml:\"module\""]; - string name = 2 [(gogoproto.moretags) = "yaml:\"name\""]; -} - -// CapabilityOwners defines a set of owners of a single Capability. The set of -// owners must be unique. -message CapabilityOwners { - repeated Owner owners = 1 [(gogoproto.nullable) = false]; -} diff --git a/ampd/proto/third_party/cosmos/capability/v1beta1/genesis.proto b/ampd/proto/third_party/cosmos/capability/v1beta1/genesis.proto deleted file mode 100644 index 05bb0afc4..000000000 --- a/ampd/proto/third_party/cosmos/capability/v1beta1/genesis.proto +++ /dev/null @@ -1,26 +0,0 @@ -syntax = "proto3"; -package cosmos.capability.v1beta1; - -import "gogoproto/gogo.proto"; -import "cosmos/capability/v1beta1/capability.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/capability/types"; - -// GenesisOwners defines the capability owners with their corresponding index. -message GenesisOwners { - // index is the index of the capability owner. - uint64 index = 1; - - // index_owners are the owners at the given index. - CapabilityOwners index_owners = 2 [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"index_owners\""]; -} - -// GenesisState defines the capability module's genesis state. -message GenesisState { - // index is the capability global index. - uint64 index = 1; - - // owners represents a map from index to owners of the capability index - // index key is string to allow amino marshalling. - repeated GenesisOwners owners = 2 [(gogoproto.nullable) = false]; -} diff --git a/ampd/proto/third_party/cosmos/crisis/v1beta1/genesis.proto b/ampd/proto/third_party/cosmos/crisis/v1beta1/genesis.proto deleted file mode 100644 index 5b0ff7ec7..000000000 --- a/ampd/proto/third_party/cosmos/crisis/v1beta1/genesis.proto +++ /dev/null @@ -1,15 +0,0 @@ -syntax = "proto3"; -package cosmos.crisis.v1beta1; - -option go_package = "github.com/cosmos/cosmos-sdk/x/crisis/types"; - -import "gogoproto/gogo.proto"; -import "cosmos/base/v1beta1/coin.proto"; - -// GenesisState defines the crisis module's genesis state. -message GenesisState { - // constant_fee is the fee used to verify the invariant in the crisis - // module. - cosmos.base.v1beta1.Coin constant_fee = 3 - [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"constant_fee\""]; -} diff --git a/ampd/proto/third_party/cosmos/crisis/v1beta1/tx.proto b/ampd/proto/third_party/cosmos/crisis/v1beta1/tx.proto deleted file mode 100644 index 26457ad6d..000000000 --- a/ampd/proto/third_party/cosmos/crisis/v1beta1/tx.proto +++ /dev/null @@ -1,25 +0,0 @@ -syntax = "proto3"; -package cosmos.crisis.v1beta1; - -option go_package = "github.com/cosmos/cosmos-sdk/x/crisis/types"; - -import "gogoproto/gogo.proto"; - -// Msg defines the bank Msg service. -service Msg { - // VerifyInvariant defines a method to verify a particular invariance. - rpc VerifyInvariant(MsgVerifyInvariant) returns (MsgVerifyInvariantResponse); -} - -// MsgVerifyInvariant represents a message to verify a particular invariance. -message MsgVerifyInvariant { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - string sender = 1; - string invariant_module_name = 2 [(gogoproto.moretags) = "yaml:\"invariant_module_name\""]; - string invariant_route = 3 [(gogoproto.moretags) = "yaml:\"invariant_route\""]; -} - -// MsgVerifyInvariantResponse defines the Msg/VerifyInvariant response type. -message MsgVerifyInvariantResponse {} diff --git a/ampd/proto/third_party/cosmos/crypto/ed25519/keys.proto b/ampd/proto/third_party/cosmos/crypto/ed25519/keys.proto deleted file mode 100644 index 6ffec3448..000000000 --- a/ampd/proto/third_party/cosmos/crypto/ed25519/keys.proto +++ /dev/null @@ -1,23 +0,0 @@ -syntax = "proto3"; -package cosmos.crypto.ed25519; - -import "gogoproto/gogo.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519"; - -// PubKey is an ed25519 public key for handling Tendermint keys in SDK. -// It's needed for Any serialization and SDK compatibility. -// It must not be used in a non Tendermint key context because it doesn't implement -// ADR-28. Nevertheless, you will like to use ed25519 in app user level -// then you must create a new proto message and follow ADR-28 for Address construction. -message PubKey { - option (gogoproto.goproto_stringer) = false; - - bytes key = 1 [(gogoproto.casttype) = "crypto/ed25519.PublicKey"]; -} - -// Deprecated: PrivKey defines a ed25519 private key. -// NOTE: ed25519 keys must not be used in SDK apps except in a tendermint validator context. -message PrivKey { - bytes key = 1 [(gogoproto.casttype) = "crypto/ed25519.PrivateKey"]; -} diff --git a/ampd/proto/third_party/cosmos/crypto/multisig/keys.proto b/ampd/proto/third_party/cosmos/crypto/multisig/keys.proto deleted file mode 100644 index f8398e805..000000000 --- a/ampd/proto/third_party/cosmos/crypto/multisig/keys.proto +++ /dev/null @@ -1,18 +0,0 @@ -syntax = "proto3"; -package cosmos.crypto.multisig; - -import "gogoproto/gogo.proto"; -import "google/protobuf/any.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/crypto/keys/multisig"; - -// LegacyAminoPubKey specifies a public key type -// which nests multiple public keys and a threshold, -// it uses legacy amino address rules. -message LegacyAminoPubKey { - option (gogoproto.goproto_getters) = false; - - uint32 threshold = 1 [(gogoproto.moretags) = "yaml:\"threshold\""]; - repeated google.protobuf.Any public_keys = 2 - [(gogoproto.customname) = "PubKeys", (gogoproto.moretags) = "yaml:\"pubkeys\""]; -} diff --git a/ampd/proto/third_party/cosmos/crypto/multisig/v1beta1/multisig.proto b/ampd/proto/third_party/cosmos/crypto/multisig/v1beta1/multisig.proto deleted file mode 100644 index bf671f171..000000000 --- a/ampd/proto/third_party/cosmos/crypto/multisig/v1beta1/multisig.proto +++ /dev/null @@ -1,25 +0,0 @@ -syntax = "proto3"; -package cosmos.crypto.multisig.v1beta1; - -import "gogoproto/gogo.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/crypto/types"; - -// MultiSignature wraps the signatures from a multisig.LegacyAminoPubKey. -// See cosmos.tx.v1betata1.ModeInfo.Multi for how to specify which signers -// signed and with which modes. -message MultiSignature { - option (gogoproto.goproto_unrecognized) = true; - repeated bytes signatures = 1; -} - -// CompactBitArray is an implementation of a space efficient bit array. -// This is used to ensure that the encoded data takes up a minimal amount of -// space after proto encoding. -// This is not thread safe, and is not intended for concurrent usage. -message CompactBitArray { - option (gogoproto.goproto_stringer) = false; - - uint32 extra_bits_stored = 1; - bytes elems = 2; -} diff --git a/ampd/proto/third_party/cosmos/crypto/secp256k1/keys.proto b/ampd/proto/third_party/cosmos/crypto/secp256k1/keys.proto deleted file mode 100644 index a22725713..000000000 --- a/ampd/proto/third_party/cosmos/crypto/secp256k1/keys.proto +++ /dev/null @@ -1,22 +0,0 @@ -syntax = "proto3"; -package cosmos.crypto.secp256k1; - -import "gogoproto/gogo.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1"; - -// PubKey defines a secp256k1 public key -// Key is the compressed form of the pubkey. The first byte depends is a 0x02 byte -// if the y-coordinate is the lexicographically largest of the two associated with -// the x-coordinate. Otherwise the first byte is a 0x03. -// This prefix is followed with the x-coordinate. -message PubKey { - option (gogoproto.goproto_stringer) = false; - - bytes key = 1; -} - -// PrivKey defines a secp256k1 private key. -message PrivKey { - bytes key = 1; -} diff --git a/ampd/proto/third_party/cosmos/crypto/secp256r1/keys.proto b/ampd/proto/third_party/cosmos/crypto/secp256r1/keys.proto deleted file mode 100644 index 2e96c6e3c..000000000 --- a/ampd/proto/third_party/cosmos/crypto/secp256r1/keys.proto +++ /dev/null @@ -1,23 +0,0 @@ -// Since: cosmos-sdk 0.43 -syntax = "proto3"; -package cosmos.crypto.secp256r1; - -import "gogoproto/gogo.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/crypto/keys/secp256r1"; -option (gogoproto.messagename_all) = true; -option (gogoproto.goproto_stringer_all) = false; -option (gogoproto.goproto_getters_all) = false; - -// PubKey defines a secp256r1 ECDSA public key. -message PubKey { - // Point on secp256r1 curve in a compressed representation as specified in section - // 4.3.6 of ANSI X9.62: https://webstore.ansi.org/standards/ascx9/ansix9621998 - bytes key = 1 [(gogoproto.customtype) = "ecdsaPK"]; -} - -// PrivKey defines a secp256r1 ECDSA private key. -message PrivKey { - // secret number serialized using big-endian encoding - bytes secret = 1 [(gogoproto.customtype) = "ecdsaSK"]; -} diff --git a/ampd/proto/third_party/cosmos/distribution/v1beta1/distribution.proto b/ampd/proto/third_party/cosmos/distribution/v1beta1/distribution.proto deleted file mode 100644 index ae98ec0b9..000000000 --- a/ampd/proto/third_party/cosmos/distribution/v1beta1/distribution.proto +++ /dev/null @@ -1,157 +0,0 @@ -syntax = "proto3"; -package cosmos.distribution.v1beta1; - -option go_package = "github.com/cosmos/cosmos-sdk/x/distribution/types"; -option (gogoproto.equal_all) = true; - -import "gogoproto/gogo.proto"; -import "cosmos/base/v1beta1/coin.proto"; - -// Params defines the set of params for the distribution module. -message Params { - option (gogoproto.goproto_stringer) = false; - string community_tax = 1 [ - (gogoproto.moretags) = "yaml:\"community_tax\"", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - string base_proposer_reward = 2 [ - (gogoproto.moretags) = "yaml:\"base_proposer_reward\"", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - string bonus_proposer_reward = 3 [ - (gogoproto.moretags) = "yaml:\"bonus_proposer_reward\"", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - bool withdraw_addr_enabled = 4 [(gogoproto.moretags) = "yaml:\"withdraw_addr_enabled\""]; -} - -// ValidatorHistoricalRewards represents historical rewards for a validator. -// Height is implicit within the store key. -// Cumulative reward ratio is the sum from the zeroeth period -// until this period of rewards / tokens, per the spec. -// The reference count indicates the number of objects -// which might need to reference this historical entry at any point. -// ReferenceCount = -// number of outstanding delegations which ended the associated period (and -// might need to read that record) -// + number of slashes which ended the associated period (and might need to -// read that record) -// + one per validator for the zeroeth period, set on initialization -message ValidatorHistoricalRewards { - repeated cosmos.base.v1beta1.DecCoin cumulative_reward_ratio = 1 [ - (gogoproto.moretags) = "yaml:\"cumulative_reward_ratio\"", - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins", - (gogoproto.nullable) = false - ]; - uint32 reference_count = 2 [(gogoproto.moretags) = "yaml:\"reference_count\""]; -} - -// ValidatorCurrentRewards represents current rewards and current -// period for a validator kept as a running counter and incremented -// each block as long as the validator's tokens remain constant. -message ValidatorCurrentRewards { - repeated cosmos.base.v1beta1.DecCoin rewards = 1 - [(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins", (gogoproto.nullable) = false]; - uint64 period = 2; -} - -// ValidatorAccumulatedCommission represents accumulated commission -// for a validator kept as a running counter, can be withdrawn at any time. -message ValidatorAccumulatedCommission { - repeated cosmos.base.v1beta1.DecCoin commission = 1 - [(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins", (gogoproto.nullable) = false]; -} - -// ValidatorOutstandingRewards represents outstanding (un-withdrawn) rewards -// for a validator inexpensive to track, allows simple sanity checks. -message ValidatorOutstandingRewards { - repeated cosmos.base.v1beta1.DecCoin rewards = 1 [ - (gogoproto.moretags) = "yaml:\"rewards\"", - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins", - (gogoproto.nullable) = false - ]; -} - -// ValidatorSlashEvent represents a validator slash event. -// Height is implicit within the store key. -// This is needed to calculate appropriate amount of staking tokens -// for delegations which are withdrawn after a slash has occurred. -message ValidatorSlashEvent { - uint64 validator_period = 1 [(gogoproto.moretags) = "yaml:\"validator_period\""]; - string fraction = 2 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false]; -} - -// ValidatorSlashEvents is a collection of ValidatorSlashEvent messages. -message ValidatorSlashEvents { - option (gogoproto.goproto_stringer) = false; - repeated ValidatorSlashEvent validator_slash_events = 1 - [(gogoproto.moretags) = "yaml:\"validator_slash_events\"", (gogoproto.nullable) = false]; -} - -// FeePool is the global fee pool for distribution. -message FeePool { - repeated cosmos.base.v1beta1.DecCoin community_pool = 1 [ - (gogoproto.nullable) = false, - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins", - (gogoproto.moretags) = "yaml:\"community_pool\"" - ]; -} - -// CommunityPoolSpendProposal details a proposal for use of community funds, -// together with how many coins are proposed to be spent, and to which -// recipient account. -message CommunityPoolSpendProposal { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - option (gogoproto.goproto_stringer) = false; - - string title = 1; - string description = 2; - string recipient = 3; - repeated cosmos.base.v1beta1.Coin amount = 4 - [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; -} - -// DelegatorStartingInfo represents the starting info for a delegator reward -// period. It tracks the previous validator period, the delegation's amount of -// staking token, and the creation height (to check later on if any slashes have -// occurred). NOTE: Even though validators are slashed to whole staking tokens, -// the delegators within the validator may be left with less than a full token, -// thus sdk.Dec is used. -message DelegatorStartingInfo { - uint64 previous_period = 1 [(gogoproto.moretags) = "yaml:\"previous_period\""]; - string stake = 2 [ - (gogoproto.moretags) = "yaml:\"stake\"", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - uint64 height = 3 [(gogoproto.moretags) = "yaml:\"creation_height\"", (gogoproto.jsontag) = "creation_height"]; -} - -// DelegationDelegatorReward represents the properties -// of a delegator's delegation reward. -message DelegationDelegatorReward { - option (gogoproto.goproto_getters) = false; - option (gogoproto.goproto_stringer) = true; - - string validator_address = 1 [(gogoproto.moretags) = "yaml:\"validator_address\""]; - - repeated cosmos.base.v1beta1.DecCoin reward = 2 - [(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins", (gogoproto.nullable) = false]; -} - -// CommunityPoolSpendProposalWithDeposit defines a CommunityPoolSpendProposal -// with a deposit -message CommunityPoolSpendProposalWithDeposit { - option (gogoproto.goproto_getters) = false; - option (gogoproto.goproto_stringer) = true; - - string title = 1 [(gogoproto.moretags) = "yaml:\"title\""]; - string description = 2 [(gogoproto.moretags) = "yaml:\"description\""]; - string recipient = 3 [(gogoproto.moretags) = "yaml:\"recipient\""]; - string amount = 4 [(gogoproto.moretags) = "yaml:\"amount\""]; - string deposit = 5 [(gogoproto.moretags) = "yaml:\"deposit\""]; -} diff --git a/ampd/proto/third_party/cosmos/distribution/v1beta1/genesis.proto b/ampd/proto/third_party/cosmos/distribution/v1beta1/genesis.proto deleted file mode 100644 index c0b17cdf1..000000000 --- a/ampd/proto/third_party/cosmos/distribution/v1beta1/genesis.proto +++ /dev/null @@ -1,155 +0,0 @@ -syntax = "proto3"; -package cosmos.distribution.v1beta1; - -option go_package = "github.com/cosmos/cosmos-sdk/x/distribution/types"; -option (gogoproto.equal_all) = true; - -import "gogoproto/gogo.proto"; -import "cosmos/base/v1beta1/coin.proto"; -import "cosmos/distribution/v1beta1/distribution.proto"; - -// DelegatorWithdrawInfo is the address for where distributions rewards are -// withdrawn to by default this struct is only used at genesis to feed in -// default withdraw addresses. -message DelegatorWithdrawInfo { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // delegator_address is the address of the delegator. - string delegator_address = 1 [(gogoproto.moretags) = "yaml:\"delegator_address\""]; - - // withdraw_address is the address to withdraw the delegation rewards to. - string withdraw_address = 2 [(gogoproto.moretags) = "yaml:\"withdraw_address\""]; -} - -// ValidatorOutstandingRewardsRecord is used for import/export via genesis json. -message ValidatorOutstandingRewardsRecord { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // validator_address is the address of the validator. - string validator_address = 1 [(gogoproto.moretags) = "yaml:\"validator_address\""]; - - // outstanding_rewards represents the oustanding rewards of a validator. - repeated cosmos.base.v1beta1.DecCoin outstanding_rewards = 2 [ - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins", - (gogoproto.nullable) = false, - (gogoproto.moretags) = "yaml:\"outstanding_rewards\"" - ]; -} - -// ValidatorAccumulatedCommissionRecord is used for import / export via genesis -// json. -message ValidatorAccumulatedCommissionRecord { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // validator_address is the address of the validator. - string validator_address = 1 [(gogoproto.moretags) = "yaml:\"validator_address\""]; - - // accumulated is the accumulated commission of a validator. - ValidatorAccumulatedCommission accumulated = 2 - [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"accumulated\""]; -} - -// ValidatorHistoricalRewardsRecord is used for import / export via genesis -// json. -message ValidatorHistoricalRewardsRecord { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // validator_address is the address of the validator. - string validator_address = 1 [(gogoproto.moretags) = "yaml:\"validator_address\""]; - - // period defines the period the historical rewards apply to. - uint64 period = 2; - - // rewards defines the historical rewards of a validator. - ValidatorHistoricalRewards rewards = 3 [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"rewards\""]; -} - -// ValidatorCurrentRewardsRecord is used for import / export via genesis json. -message ValidatorCurrentRewardsRecord { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // validator_address is the address of the validator. - string validator_address = 1 [(gogoproto.moretags) = "yaml:\"validator_address\""]; - - // rewards defines the current rewards of a validator. - ValidatorCurrentRewards rewards = 2 [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"rewards\""]; -} - -// DelegatorStartingInfoRecord used for import / export via genesis json. -message DelegatorStartingInfoRecord { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // delegator_address is the address of the delegator. - string delegator_address = 1 [(gogoproto.moretags) = "yaml:\"delegator_address\""]; - - // validator_address is the address of the validator. - string validator_address = 2 [(gogoproto.moretags) = "yaml:\"validator_address\""]; - - // starting_info defines the starting info of a delegator. - DelegatorStartingInfo starting_info = 3 - [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"starting_info\""]; -} - -// ValidatorSlashEventRecord is used for import / export via genesis json. -message ValidatorSlashEventRecord { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // validator_address is the address of the validator. - string validator_address = 1 [(gogoproto.moretags) = "yaml:\"validator_address\""]; - // height defines the block height at which the slash event occured. - uint64 height = 2; - // period is the period of the slash event. - uint64 period = 3; - // validator_slash_event describes the slash event. - ValidatorSlashEvent validator_slash_event = 4 [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"event\""]; -} - -// GenesisState defines the distribution module's genesis state. -message GenesisState { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // params defines all the paramaters of the module. - Params params = 1 [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"params\""]; - - // fee_pool defines the fee pool at genesis. - FeePool fee_pool = 2 [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"fee_pool\""]; - - // fee_pool defines the delegator withdraw infos at genesis. - repeated DelegatorWithdrawInfo delegator_withdraw_infos = 3 - [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"delegator_withdraw_infos\""]; - - // fee_pool defines the previous proposer at genesis. - string previous_proposer = 4 [(gogoproto.moretags) = "yaml:\"previous_proposer\""]; - - // fee_pool defines the outstanding rewards of all validators at genesis. - repeated ValidatorOutstandingRewardsRecord outstanding_rewards = 5 - [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"outstanding_rewards\""]; - - // fee_pool defines the accumulated commisions of all validators at genesis. - repeated ValidatorAccumulatedCommissionRecord validator_accumulated_commissions = 6 - [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"validator_accumulated_commissions\""]; - - // fee_pool defines the historical rewards of all validators at genesis. - repeated ValidatorHistoricalRewardsRecord validator_historical_rewards = 7 - [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"validator_historical_rewards\""]; - - // fee_pool defines the current rewards of all validators at genesis. - repeated ValidatorCurrentRewardsRecord validator_current_rewards = 8 - [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"validator_current_rewards\""]; - - // fee_pool defines the delegator starting infos at genesis. - repeated DelegatorStartingInfoRecord delegator_starting_infos = 9 - [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"delegator_starting_infos\""]; - - // fee_pool defines the validator slash events at genesis. - repeated ValidatorSlashEventRecord validator_slash_events = 10 - [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"validator_slash_events\""]; -} diff --git a/ampd/proto/third_party/cosmos/distribution/v1beta1/query.proto b/ampd/proto/third_party/cosmos/distribution/v1beta1/query.proto deleted file mode 100644 index 2991218d8..000000000 --- a/ampd/proto/third_party/cosmos/distribution/v1beta1/query.proto +++ /dev/null @@ -1,218 +0,0 @@ -syntax = "proto3"; -package cosmos.distribution.v1beta1; - -import "cosmos/base/query/v1beta1/pagination.proto"; -import "gogoproto/gogo.proto"; -import "google/api/annotations.proto"; -import "cosmos/base/v1beta1/coin.proto"; -import "cosmos/distribution/v1beta1/distribution.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/distribution/types"; - -// Query defines the gRPC querier service for distribution module. -service Query { - // Params queries params of the distribution module. - rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { - option (google.api.http).get = "/cosmos/distribution/v1beta1/params"; - } - - // ValidatorOutstandingRewards queries rewards of a validator address. - rpc ValidatorOutstandingRewards(QueryValidatorOutstandingRewardsRequest) - returns (QueryValidatorOutstandingRewardsResponse) { - option (google.api.http).get = "/cosmos/distribution/v1beta1/validators/" - "{validator_address}/outstanding_rewards"; - } - - // ValidatorCommission queries accumulated commission for a validator. - rpc ValidatorCommission(QueryValidatorCommissionRequest) returns (QueryValidatorCommissionResponse) { - option (google.api.http).get = "/cosmos/distribution/v1beta1/validators/" - "{validator_address}/commission"; - } - - // ValidatorSlashes queries slash events of a validator. - rpc ValidatorSlashes(QueryValidatorSlashesRequest) returns (QueryValidatorSlashesResponse) { - option (google.api.http).get = "/cosmos/distribution/v1beta1/validators/{validator_address}/slashes"; - } - - // DelegationRewards queries the total rewards accrued by a delegation. - rpc DelegationRewards(QueryDelegationRewardsRequest) returns (QueryDelegationRewardsResponse) { - option (google.api.http).get = "/cosmos/distribution/v1beta1/delegators/{delegator_address}/rewards/" - "{validator_address}"; - } - - // DelegationTotalRewards queries the total rewards accrued by a each - // validator. - rpc DelegationTotalRewards(QueryDelegationTotalRewardsRequest) returns (QueryDelegationTotalRewardsResponse) { - option (google.api.http).get = "/cosmos/distribution/v1beta1/delegators/{delegator_address}/rewards"; - } - - // DelegatorValidators queries the validators of a delegator. - rpc DelegatorValidators(QueryDelegatorValidatorsRequest) returns (QueryDelegatorValidatorsResponse) { - option (google.api.http).get = "/cosmos/distribution/v1beta1/delegators/" - "{delegator_address}/validators"; - } - - // DelegatorWithdrawAddress queries withdraw address of a delegator. - rpc DelegatorWithdrawAddress(QueryDelegatorWithdrawAddressRequest) returns (QueryDelegatorWithdrawAddressResponse) { - option (google.api.http).get = "/cosmos/distribution/v1beta1/delegators/" - "{delegator_address}/withdraw_address"; - } - - // CommunityPool queries the community pool coins. - rpc CommunityPool(QueryCommunityPoolRequest) returns (QueryCommunityPoolResponse) { - option (google.api.http).get = "/cosmos/distribution/v1beta1/community_pool"; - } -} - -// QueryParamsRequest is the request type for the Query/Params RPC method. -message QueryParamsRequest {} - -// QueryParamsResponse is the response type for the Query/Params RPC method. -message QueryParamsResponse { - // params defines the parameters of the module. - Params params = 1 [(gogoproto.nullable) = false]; -} - -// QueryValidatorOutstandingRewardsRequest is the request type for the -// Query/ValidatorOutstandingRewards RPC method. -message QueryValidatorOutstandingRewardsRequest { - // validator_address defines the validator address to query for. - string validator_address = 1; -} - -// QueryValidatorOutstandingRewardsResponse is the response type for the -// Query/ValidatorOutstandingRewards RPC method. -message QueryValidatorOutstandingRewardsResponse { - ValidatorOutstandingRewards rewards = 1 [(gogoproto.nullable) = false]; -} - -// QueryValidatorCommissionRequest is the request type for the -// Query/ValidatorCommission RPC method -message QueryValidatorCommissionRequest { - // validator_address defines the validator address to query for. - string validator_address = 1; -} - -// QueryValidatorCommissionResponse is the response type for the -// Query/ValidatorCommission RPC method -message QueryValidatorCommissionResponse { - // commission defines the commision the validator received. - ValidatorAccumulatedCommission commission = 1 [(gogoproto.nullable) = false]; -} - -// QueryValidatorSlashesRequest is the request type for the -// Query/ValidatorSlashes RPC method -message QueryValidatorSlashesRequest { - option (gogoproto.goproto_getters) = false; - option (gogoproto.goproto_stringer) = true; - - // validator_address defines the validator address to query for. - string validator_address = 1; - // starting_height defines the optional starting height to query the slashes. - uint64 starting_height = 2; - // starting_height defines the optional ending height to query the slashes. - uint64 ending_height = 3; - // pagination defines an optional pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 4; -} - -// QueryValidatorSlashesResponse is the response type for the -// Query/ValidatorSlashes RPC method. -message QueryValidatorSlashesResponse { - // slashes defines the slashes the validator received. - repeated ValidatorSlashEvent slashes = 1 [(gogoproto.nullable) = false]; - - // pagination defines the pagination in the response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -// QueryDelegationRewardsRequest is the request type for the -// Query/DelegationRewards RPC method. -message QueryDelegationRewardsRequest { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // delegator_address defines the delegator address to query for. - string delegator_address = 1; - // validator_address defines the validator address to query for. - string validator_address = 2; -} - -// QueryDelegationRewardsResponse is the response type for the -// Query/DelegationRewards RPC method. -message QueryDelegationRewardsResponse { - // rewards defines the rewards accrued by a delegation. - repeated cosmos.base.v1beta1.DecCoin rewards = 1 - [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins"]; -} - -// QueryDelegationTotalRewardsRequest is the request type for the -// Query/DelegationTotalRewards RPC method. -message QueryDelegationTotalRewardsRequest { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - // delegator_address defines the delegator address to query for. - string delegator_address = 1; -} - -// QueryDelegationTotalRewardsResponse is the response type for the -// Query/DelegationTotalRewards RPC method. -message QueryDelegationTotalRewardsResponse { - // rewards defines all the rewards accrued by a delegator. - repeated DelegationDelegatorReward rewards = 1 [(gogoproto.nullable) = false]; - // total defines the sum of all the rewards. - repeated cosmos.base.v1beta1.DecCoin total = 2 - [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins"]; -} - -// QueryDelegatorValidatorsRequest is the request type for the -// Query/DelegatorValidators RPC method. -message QueryDelegatorValidatorsRequest { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // delegator_address defines the delegator address to query for. - string delegator_address = 1; -} - -// QueryDelegatorValidatorsResponse is the response type for the -// Query/DelegatorValidators RPC method. -message QueryDelegatorValidatorsResponse { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // validators defines the validators a delegator is delegating for. - repeated string validators = 1; -} - -// QueryDelegatorWithdrawAddressRequest is the request type for the -// Query/DelegatorWithdrawAddress RPC method. -message QueryDelegatorWithdrawAddressRequest { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // delegator_address defines the delegator address to query for. - string delegator_address = 1; -} - -// QueryDelegatorWithdrawAddressResponse is the response type for the -// Query/DelegatorWithdrawAddress RPC method. -message QueryDelegatorWithdrawAddressResponse { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // withdraw_address defines the delegator address to query for. - string withdraw_address = 1; -} - -// QueryCommunityPoolRequest is the request type for the Query/CommunityPool RPC -// method. -message QueryCommunityPoolRequest {} - -// QueryCommunityPoolResponse is the response type for the Query/CommunityPool -// RPC method. -message QueryCommunityPoolResponse { - // pool defines community pool's coins. - repeated cosmos.base.v1beta1.DecCoin pool = 1 - [(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins", (gogoproto.nullable) = false]; -} diff --git a/ampd/proto/third_party/cosmos/distribution/v1beta1/tx.proto b/ampd/proto/third_party/cosmos/distribution/v1beta1/tx.proto deleted file mode 100644 index e6ce478bc..000000000 --- a/ampd/proto/third_party/cosmos/distribution/v1beta1/tx.proto +++ /dev/null @@ -1,79 +0,0 @@ -syntax = "proto3"; -package cosmos.distribution.v1beta1; - -option go_package = "github.com/cosmos/cosmos-sdk/x/distribution/types"; -option (gogoproto.equal_all) = true; - -import "gogoproto/gogo.proto"; -import "cosmos/base/v1beta1/coin.proto"; - -// Msg defines the distribution Msg service. -service Msg { - // SetWithdrawAddress defines a method to change the withdraw address - // for a delegator (or validator self-delegation). - rpc SetWithdrawAddress(MsgSetWithdrawAddress) returns (MsgSetWithdrawAddressResponse); - - // WithdrawDelegatorReward defines a method to withdraw rewards of delegator - // from a single validator. - rpc WithdrawDelegatorReward(MsgWithdrawDelegatorReward) returns (MsgWithdrawDelegatorRewardResponse); - - // WithdrawValidatorCommission defines a method to withdraw the - // full commission to the validator address. - rpc WithdrawValidatorCommission(MsgWithdrawValidatorCommission) returns (MsgWithdrawValidatorCommissionResponse); - - // FundCommunityPool defines a method to allow an account to directly - // fund the community pool. - rpc FundCommunityPool(MsgFundCommunityPool) returns (MsgFundCommunityPoolResponse); -} - -// MsgSetWithdrawAddress sets the withdraw address for -// a delegator (or validator self-delegation). -message MsgSetWithdrawAddress { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - string delegator_address = 1 [(gogoproto.moretags) = "yaml:\"delegator_address\""]; - string withdraw_address = 2 [(gogoproto.moretags) = "yaml:\"withdraw_address\""]; -} - -// MsgSetWithdrawAddressResponse defines the Msg/SetWithdrawAddress response type. -message MsgSetWithdrawAddressResponse {} - -// MsgWithdrawDelegatorReward represents delegation withdrawal to a delegator -// from a single validator. -message MsgWithdrawDelegatorReward { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - string delegator_address = 1 [(gogoproto.moretags) = "yaml:\"delegator_address\""]; - string validator_address = 2 [(gogoproto.moretags) = "yaml:\"validator_address\""]; -} - -// MsgWithdrawDelegatorRewardResponse defines the Msg/WithdrawDelegatorReward response type. -message MsgWithdrawDelegatorRewardResponse {} - -// MsgWithdrawValidatorCommission withdraws the full commission to the validator -// address. -message MsgWithdrawValidatorCommission { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - string validator_address = 1 [(gogoproto.moretags) = "yaml:\"validator_address\""]; -} - -// MsgWithdrawValidatorCommissionResponse defines the Msg/WithdrawValidatorCommission response type. -message MsgWithdrawValidatorCommissionResponse {} - -// MsgFundCommunityPool allows an account to directly -// fund the community pool. -message MsgFundCommunityPool { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - repeated cosmos.base.v1beta1.Coin amount = 1 - [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; - string depositor = 2; -} - -// MsgFundCommunityPoolResponse defines the Msg/FundCommunityPool response type. -message MsgFundCommunityPoolResponse {} diff --git a/ampd/proto/third_party/cosmos/evidence/v1beta1/evidence.proto b/ampd/proto/third_party/cosmos/evidence/v1beta1/evidence.proto deleted file mode 100644 index 14612c314..000000000 --- a/ampd/proto/third_party/cosmos/evidence/v1beta1/evidence.proto +++ /dev/null @@ -1,21 +0,0 @@ -syntax = "proto3"; -package cosmos.evidence.v1beta1; - -option go_package = "github.com/cosmos/cosmos-sdk/x/evidence/types"; -option (gogoproto.equal_all) = true; - -import "gogoproto/gogo.proto"; -import "google/protobuf/timestamp.proto"; - -// Equivocation implements the Evidence interface and defines evidence of double -// signing misbehavior. -message Equivocation { - option (gogoproto.goproto_stringer) = false; - option (gogoproto.goproto_getters) = false; - option (gogoproto.equal) = false; - - int64 height = 1; - google.protobuf.Timestamp time = 2 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; - int64 power = 3; - string consensus_address = 4 [(gogoproto.moretags) = "yaml:\"consensus_address\""]; -} \ No newline at end of file diff --git a/ampd/proto/third_party/cosmos/evidence/v1beta1/genesis.proto b/ampd/proto/third_party/cosmos/evidence/v1beta1/genesis.proto deleted file mode 100644 index 199f446f7..000000000 --- a/ampd/proto/third_party/cosmos/evidence/v1beta1/genesis.proto +++ /dev/null @@ -1,12 +0,0 @@ -syntax = "proto3"; -package cosmos.evidence.v1beta1; - -option go_package = "github.com/cosmos/cosmos-sdk/x/evidence/types"; - -import "google/protobuf/any.proto"; - -// GenesisState defines the evidence module's genesis state. -message GenesisState { - // evidence defines all the evidence at genesis. - repeated google.protobuf.Any evidence = 1; -} diff --git a/ampd/proto/third_party/cosmos/evidence/v1beta1/query.proto b/ampd/proto/third_party/cosmos/evidence/v1beta1/query.proto deleted file mode 100644 index eda00544c..000000000 --- a/ampd/proto/third_party/cosmos/evidence/v1beta1/query.proto +++ /dev/null @@ -1,51 +0,0 @@ -syntax = "proto3"; -package cosmos.evidence.v1beta1; - -import "cosmos/base/query/v1beta1/pagination.proto"; -import "gogoproto/gogo.proto"; -import "google/protobuf/any.proto"; -import "google/api/annotations.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/evidence/types"; - -// Query defines the gRPC querier service. -service Query { - // Evidence queries evidence based on evidence hash. - rpc Evidence(QueryEvidenceRequest) returns (QueryEvidenceResponse) { - option (google.api.http).get = "/cosmos/evidence/v1beta1/evidence/{evidence_hash}"; - } - - // AllEvidence queries all evidence. - rpc AllEvidence(QueryAllEvidenceRequest) returns (QueryAllEvidenceResponse) { - option (google.api.http).get = "/cosmos/evidence/v1beta1/evidence"; - } -} - -// QueryEvidenceRequest is the request type for the Query/Evidence RPC method. -message QueryEvidenceRequest { - // evidence_hash defines the hash of the requested evidence. - bytes evidence_hash = 1 [(gogoproto.casttype) = "github.com/tendermint/tendermint/libs/bytes.HexBytes"]; -} - -// QueryEvidenceResponse is the response type for the Query/Evidence RPC method. -message QueryEvidenceResponse { - // evidence returns the requested evidence. - google.protobuf.Any evidence = 1; -} - -// QueryEvidenceRequest is the request type for the Query/AllEvidence RPC -// method. -message QueryAllEvidenceRequest { - // pagination defines an optional pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 1; -} - -// QueryAllEvidenceResponse is the response type for the Query/AllEvidence RPC -// method. -message QueryAllEvidenceResponse { - // evidence returns all evidences. - repeated google.protobuf.Any evidence = 1; - - // pagination defines the pagination in the response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} diff --git a/ampd/proto/third_party/cosmos/evidence/v1beta1/tx.proto b/ampd/proto/third_party/cosmos/evidence/v1beta1/tx.proto deleted file mode 100644 index 38795f25d..000000000 --- a/ampd/proto/third_party/cosmos/evidence/v1beta1/tx.proto +++ /dev/null @@ -1,32 +0,0 @@ -syntax = "proto3"; -package cosmos.evidence.v1beta1; - -option go_package = "github.com/cosmos/cosmos-sdk/x/evidence/types"; -option (gogoproto.equal_all) = true; - -import "gogoproto/gogo.proto"; -import "google/protobuf/any.proto"; -import "cosmos_proto/cosmos.proto"; - -// Msg defines the evidence Msg service. -service Msg { - // SubmitEvidence submits an arbitrary Evidence of misbehavior such as equivocation or - // counterfactual signing. - rpc SubmitEvidence(MsgSubmitEvidence) returns (MsgSubmitEvidenceResponse); -} - -// MsgSubmitEvidence represents a message that supports submitting arbitrary -// Evidence of misbehavior such as equivocation or counterfactual signing. -message MsgSubmitEvidence { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - string submitter = 1; - google.protobuf.Any evidence = 2 [(cosmos_proto.accepts_interface) = "Evidence"]; -} - -// MsgSubmitEvidenceResponse defines the Msg/SubmitEvidence response type. -message MsgSubmitEvidenceResponse { - // hash defines the hash of the evidence. - bytes hash = 4; -} diff --git a/ampd/proto/third_party/cosmos/feegrant/v1beta1/feegrant.proto b/ampd/proto/third_party/cosmos/feegrant/v1beta1/feegrant.proto deleted file mode 100644 index a86691f91..000000000 --- a/ampd/proto/third_party/cosmos/feegrant/v1beta1/feegrant.proto +++ /dev/null @@ -1,78 +0,0 @@ -// Since: cosmos-sdk 0.43 -syntax = "proto3"; -package cosmos.feegrant.v1beta1; - -import "gogoproto/gogo.proto"; -import "google/protobuf/any.proto"; -import "cosmos_proto/cosmos.proto"; -import "cosmos/base/v1beta1/coin.proto"; -import "google/protobuf/timestamp.proto"; -import "google/protobuf/duration.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/feegrant"; - -// BasicAllowance implements Allowance with a one-time grant of tokens -// that optionally expires. The grantee can use up to SpendLimit to cover fees. -message BasicAllowance { - option (cosmos_proto.implements_interface) = "FeeAllowanceI"; - - // spend_limit specifies the maximum amount of tokens that can be spent - // by this allowance and will be updated as tokens are spent. If it is - // empty, there is no spend limit and any amount of coins can be spent. - repeated cosmos.base.v1beta1.Coin spend_limit = 1 - [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; - - // expiration specifies an optional time when this allowance expires - google.protobuf.Timestamp expiration = 2 [(gogoproto.stdtime) = true]; -} - -// PeriodicAllowance extends Allowance to allow for both a maximum cap, -// as well as a limit per time period. -message PeriodicAllowance { - option (cosmos_proto.implements_interface) = "FeeAllowanceI"; - - // basic specifies a struct of `BasicAllowance` - BasicAllowance basic = 1 [(gogoproto.nullable) = false]; - - // period specifies the time duration in which period_spend_limit coins can - // be spent before that allowance is reset - google.protobuf.Duration period = 2 [(gogoproto.stdduration) = true, (gogoproto.nullable) = false]; - - // period_spend_limit specifies the maximum number of coins that can be spent - // in the period - repeated cosmos.base.v1beta1.Coin period_spend_limit = 3 - [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; - - // period_can_spend is the number of coins left to be spent before the period_reset time - repeated cosmos.base.v1beta1.Coin period_can_spend = 4 - [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; - - // period_reset is the time at which this period resets and a new one begins, - // it is calculated from the start time of the first transaction after the - // last period ended - google.protobuf.Timestamp period_reset = 5 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false]; -} - -// AllowedMsgAllowance creates allowance only for specified message types. -message AllowedMsgAllowance { - option (gogoproto.goproto_getters) = false; - option (cosmos_proto.implements_interface) = "FeeAllowanceI"; - - // allowance can be any of basic and filtered fee allowance. - google.protobuf.Any allowance = 1 [(cosmos_proto.accepts_interface) = "FeeAllowanceI"]; - - // allowed_messages are the messages for which the grantee has the access. - repeated string allowed_messages = 2; -} - -// Grant is stored in the KVStore to record a grant with full context -message Grant { - // granter is the address of the user granting an allowance of their funds. - string granter = 1; - - // grantee is the address of the user being granted an allowance of another user's funds. - string grantee = 2; - - // allowance can be any of basic and filtered fee allowance. - google.protobuf.Any allowance = 3 [(cosmos_proto.accepts_interface) = "FeeAllowanceI"]; -} diff --git a/ampd/proto/third_party/cosmos/feegrant/v1beta1/genesis.proto b/ampd/proto/third_party/cosmos/feegrant/v1beta1/genesis.proto deleted file mode 100644 index 5b1ac4ca5..000000000 --- a/ampd/proto/third_party/cosmos/feegrant/v1beta1/genesis.proto +++ /dev/null @@ -1,13 +0,0 @@ -// Since: cosmos-sdk 0.43 -syntax = "proto3"; -package cosmos.feegrant.v1beta1; - -import "gogoproto/gogo.proto"; -import "cosmos/feegrant/v1beta1/feegrant.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/feegrant"; - -// GenesisState contains a set of fee allowances, persisted from the store -message GenesisState { - repeated Grant allowances = 1 [(gogoproto.nullable) = false]; -} diff --git a/ampd/proto/third_party/cosmos/feegrant/v1beta1/query.proto b/ampd/proto/third_party/cosmos/feegrant/v1beta1/query.proto deleted file mode 100644 index 42d7a842d..000000000 --- a/ampd/proto/third_party/cosmos/feegrant/v1beta1/query.proto +++ /dev/null @@ -1,78 +0,0 @@ -// Since: cosmos-sdk 0.43 -syntax = "proto3"; -package cosmos.feegrant.v1beta1; - -import "cosmos/feegrant/v1beta1/feegrant.proto"; -import "cosmos/base/query/v1beta1/pagination.proto"; -import "google/api/annotations.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/feegrant"; - -// Query defines the gRPC querier service. -service Query { - - // Allowance returns fee granted to the grantee by the granter. - rpc Allowance(QueryAllowanceRequest) returns (QueryAllowanceResponse) { - option (google.api.http).get = "/cosmos/feegrant/v1beta1/allowance/{granter}/{grantee}"; - } - - // Allowances returns all the grants for address. - rpc Allowances(QueryAllowancesRequest) returns (QueryAllowancesResponse) { - option (google.api.http).get = "/cosmos/feegrant/v1beta1/allowances/{grantee}"; - } - - // AllowancesByGranter returns all the grants given by an address - // Since v0.46 - rpc AllowancesByGranter(QueryAllowancesByGranterRequest) returns (QueryAllowancesByGranterResponse) { - option (google.api.http).get = "/cosmos/feegrant/v1beta1/issued/{granter}"; - } -} - -// QueryAllowanceRequest is the request type for the Query/Allowance RPC method. -message QueryAllowanceRequest { - // granter is the address of the user granting an allowance of their funds. - string granter = 1; - - // grantee is the address of the user being granted an allowance of another user's funds. - string grantee = 2; -} - -// QueryAllowanceResponse is the response type for the Query/Allowance RPC method. -message QueryAllowanceResponse { - // allowance is a allowance granted for grantee by granter. - cosmos.feegrant.v1beta1.Grant allowance = 1; -} - -// QueryAllowancesRequest is the request type for the Query/Allowances RPC method. -message QueryAllowancesRequest { - string grantee = 1; - - // pagination defines an pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 2; -} - -// QueryAllowancesResponse is the response type for the Query/Allowances RPC method. -message QueryAllowancesResponse { - // allowances are allowance's granted for grantee by granter. - repeated cosmos.feegrant.v1beta1.Grant allowances = 1; - - // pagination defines an pagination for the response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -// QueryAllowancesByGranterRequest is the request type for the Query/AllowancesByGranter RPC method. -message QueryAllowancesByGranterRequest { - string granter = 1; - - // pagination defines an pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 2; -} - -// QueryAllowancesByGranterResponse is the response type for the Query/AllowancesByGranter RPC method. -message QueryAllowancesByGranterResponse { - // allowances that have been issued by the granter. - repeated cosmos.feegrant.v1beta1.Grant allowances = 1; - - // pagination defines an pagination for the response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} diff --git a/ampd/proto/third_party/cosmos/feegrant/v1beta1/tx.proto b/ampd/proto/third_party/cosmos/feegrant/v1beta1/tx.proto deleted file mode 100644 index 2d875e922..000000000 --- a/ampd/proto/third_party/cosmos/feegrant/v1beta1/tx.proto +++ /dev/null @@ -1,49 +0,0 @@ -// Since: cosmos-sdk 0.43 -syntax = "proto3"; -package cosmos.feegrant.v1beta1; - -import "gogoproto/gogo.proto"; -import "google/protobuf/any.proto"; -import "cosmos_proto/cosmos.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/feegrant"; - -// Msg defines the feegrant msg service. -service Msg { - - // GrantAllowance grants fee allowance to the grantee on the granter's - // account with the provided expiration time. - rpc GrantAllowance(MsgGrantAllowance) returns (MsgGrantAllowanceResponse); - - // RevokeAllowance revokes any fee allowance of granter's account that - // has been granted to the grantee. - rpc RevokeAllowance(MsgRevokeAllowance) returns (MsgRevokeAllowanceResponse); -} - -// MsgGrantAllowance adds permission for Grantee to spend up to Allowance -// of fees from the account of Granter. -message MsgGrantAllowance { - // granter is the address of the user granting an allowance of their funds. - string granter = 1; - - // grantee is the address of the user being granted an allowance of another user's funds. - string grantee = 2; - - // allowance can be any of basic and filtered fee allowance. - google.protobuf.Any allowance = 3 [(cosmos_proto.accepts_interface) = "FeeAllowanceI"]; -} - -// MsgGrantAllowanceResponse defines the Msg/GrantAllowanceResponse response type. -message MsgGrantAllowanceResponse {} - -// MsgRevokeAllowance removes any existing Allowance from Granter to Grantee. -message MsgRevokeAllowance { - // granter is the address of the user granting an allowance of their funds. - string granter = 1; - - // grantee is the address of the user being granted an allowance of another user's funds. - string grantee = 2; -} - -// MsgRevokeAllowanceResponse defines the Msg/RevokeAllowanceResponse response type. -message MsgRevokeAllowanceResponse {} diff --git a/ampd/proto/third_party/cosmos/genutil/v1beta1/genesis.proto b/ampd/proto/third_party/cosmos/genutil/v1beta1/genesis.proto deleted file mode 100644 index a0207793d..000000000 --- a/ampd/proto/third_party/cosmos/genutil/v1beta1/genesis.proto +++ /dev/null @@ -1,16 +0,0 @@ -syntax = "proto3"; -package cosmos.genutil.v1beta1; - -import "gogoproto/gogo.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/genutil/types"; - -// GenesisState defines the raw genesis transaction in JSON. -message GenesisState { - // gen_txs defines the genesis transactions. - repeated bytes gen_txs = 1 [ - (gogoproto.casttype) = "encoding/json.RawMessage", - (gogoproto.jsontag) = "gentxs", - (gogoproto.moretags) = "yaml:\"gentxs\"" - ]; -} diff --git a/ampd/proto/third_party/cosmos/gov/v1beta1/genesis.proto b/ampd/proto/third_party/cosmos/gov/v1beta1/genesis.proto deleted file mode 100644 index a99950044..000000000 --- a/ampd/proto/third_party/cosmos/gov/v1beta1/genesis.proto +++ /dev/null @@ -1,26 +0,0 @@ -syntax = "proto3"; - -package cosmos.gov.v1beta1; - -import "gogoproto/gogo.proto"; -import "cosmos/gov/v1beta1/gov.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/gov/types"; - -// GenesisState defines the gov module's genesis state. -message GenesisState { - // starting_proposal_id is the ID of the starting proposal. - uint64 starting_proposal_id = 1 [(gogoproto.moretags) = "yaml:\"starting_proposal_id\""]; - // deposits defines all the deposits present at genesis. - repeated Deposit deposits = 2 [(gogoproto.castrepeated) = "Deposits", (gogoproto.nullable) = false]; - // votes defines all the votes present at genesis. - repeated Vote votes = 3 [(gogoproto.castrepeated) = "Votes", (gogoproto.nullable) = false]; - // proposals defines all the proposals present at genesis. - repeated Proposal proposals = 4 [(gogoproto.castrepeated) = "Proposals", (gogoproto.nullable) = false]; - // params defines all the paramaters of related to deposit. - DepositParams deposit_params = 5 [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"deposit_params\""]; - // params defines all the paramaters of related to voting. - VotingParams voting_params = 6 [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"voting_params\""]; - // params defines all the paramaters of related to tally. - TallyParams tally_params = 7 [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"tally_params\""]; -} diff --git a/ampd/proto/third_party/cosmos/gov/v1beta1/gov.proto b/ampd/proto/third_party/cosmos/gov/v1beta1/gov.proto deleted file mode 100644 index 01aebf950..000000000 --- a/ampd/proto/third_party/cosmos/gov/v1beta1/gov.proto +++ /dev/null @@ -1,200 +0,0 @@ -syntax = "proto3"; -package cosmos.gov.v1beta1; - -import "cosmos/base/v1beta1/coin.proto"; -import "gogoproto/gogo.proto"; -import "cosmos_proto/cosmos.proto"; -import "google/protobuf/timestamp.proto"; -import "google/protobuf/any.proto"; -import "google/protobuf/duration.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/gov/types"; -option (gogoproto.goproto_stringer_all) = false; -option (gogoproto.stringer_all) = false; -option (gogoproto.goproto_getters_all) = false; - -// VoteOption enumerates the valid vote options for a given governance proposal. -enum VoteOption { - option (gogoproto.goproto_enum_prefix) = false; - - // VOTE_OPTION_UNSPECIFIED defines a no-op vote option. - VOTE_OPTION_UNSPECIFIED = 0 [(gogoproto.enumvalue_customname) = "OptionEmpty"]; - // VOTE_OPTION_YES defines a yes vote option. - VOTE_OPTION_YES = 1 [(gogoproto.enumvalue_customname) = "OptionYes"]; - // VOTE_OPTION_ABSTAIN defines an abstain vote option. - VOTE_OPTION_ABSTAIN = 2 [(gogoproto.enumvalue_customname) = "OptionAbstain"]; - // VOTE_OPTION_NO defines a no vote option. - VOTE_OPTION_NO = 3 [(gogoproto.enumvalue_customname) = "OptionNo"]; - // VOTE_OPTION_NO_WITH_VETO defines a no with veto vote option. - VOTE_OPTION_NO_WITH_VETO = 4 [(gogoproto.enumvalue_customname) = "OptionNoWithVeto"]; -} - -// WeightedVoteOption defines a unit of vote for vote split. -// -// Since: cosmos-sdk 0.43 -message WeightedVoteOption { - VoteOption option = 1; - string weight = 2 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false, - (gogoproto.moretags) = "yaml:\"weight\"" - ]; -} - -// TextProposal defines a standard text proposal whose changes need to be -// manually updated in case of approval. -message TextProposal { - option (cosmos_proto.implements_interface) = "Content"; - - option (gogoproto.equal) = true; - - string title = 1; - string description = 2; -} - -// Deposit defines an amount deposited by an account address to an active -// proposal. -message Deposit { - option (gogoproto.goproto_getters) = false; - option (gogoproto.equal) = false; - - uint64 proposal_id = 1 [(gogoproto.moretags) = "yaml:\"proposal_id\""]; - string depositor = 2; - repeated cosmos.base.v1beta1.Coin amount = 3 - [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; -} - -// Proposal defines the core field members of a governance proposal. -message Proposal { - option (gogoproto.equal) = true; - - uint64 proposal_id = 1 [(gogoproto.jsontag) = "id", (gogoproto.moretags) = "yaml:\"id\""]; - google.protobuf.Any content = 2 [(cosmos_proto.accepts_interface) = "Content"]; - ProposalStatus status = 3 [(gogoproto.moretags) = "yaml:\"proposal_status\""]; - TallyResult final_tally_result = 4 - [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"final_tally_result\""]; - google.protobuf.Timestamp submit_time = 5 - [(gogoproto.stdtime) = true, (gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"submit_time\""]; - google.protobuf.Timestamp deposit_end_time = 6 - [(gogoproto.stdtime) = true, (gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"deposit_end_time\""]; - repeated cosmos.base.v1beta1.Coin total_deposit = 7 [ - (gogoproto.nullable) = false, - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", - (gogoproto.moretags) = "yaml:\"total_deposit\"" - ]; - google.protobuf.Timestamp voting_start_time = 8 - [(gogoproto.stdtime) = true, (gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"voting_start_time\""]; - google.protobuf.Timestamp voting_end_time = 9 - [(gogoproto.stdtime) = true, (gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"voting_end_time\""]; -} - -// ProposalStatus enumerates the valid statuses of a proposal. -enum ProposalStatus { - option (gogoproto.goproto_enum_prefix) = false; - - // PROPOSAL_STATUS_UNSPECIFIED defines the default propopsal status. - PROPOSAL_STATUS_UNSPECIFIED = 0 [(gogoproto.enumvalue_customname) = "StatusNil"]; - // PROPOSAL_STATUS_DEPOSIT_PERIOD defines a proposal status during the deposit - // period. - PROPOSAL_STATUS_DEPOSIT_PERIOD = 1 [(gogoproto.enumvalue_customname) = "StatusDepositPeriod"]; - // PROPOSAL_STATUS_VOTING_PERIOD defines a proposal status during the voting - // period. - PROPOSAL_STATUS_VOTING_PERIOD = 2 [(gogoproto.enumvalue_customname) = "StatusVotingPeriod"]; - // PROPOSAL_STATUS_PASSED defines a proposal status of a proposal that has - // passed. - PROPOSAL_STATUS_PASSED = 3 [(gogoproto.enumvalue_customname) = "StatusPassed"]; - // PROPOSAL_STATUS_REJECTED defines a proposal status of a proposal that has - // been rejected. - PROPOSAL_STATUS_REJECTED = 4 [(gogoproto.enumvalue_customname) = "StatusRejected"]; - // PROPOSAL_STATUS_FAILED defines a proposal status of a proposal that has - // failed. - PROPOSAL_STATUS_FAILED = 5 [(gogoproto.enumvalue_customname) = "StatusFailed"]; -} - -// TallyResult defines a standard tally for a governance proposal. -message TallyResult { - option (gogoproto.equal) = true; - - string yes = 1 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.nullable) = false]; - string abstain = 2 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.nullable) = false]; - string no = 3 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.nullable) = false]; - string no_with_veto = 4 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.nullable) = false, - (gogoproto.moretags) = "yaml:\"no_with_veto\"" - ]; -} - -// Vote defines a vote on a governance proposal. -// A Vote consists of a proposal ID, the voter, and the vote option. -message Vote { - option (gogoproto.goproto_stringer) = false; - option (gogoproto.equal) = false; - - uint64 proposal_id = 1 [(gogoproto.moretags) = "yaml:\"proposal_id\""]; - string voter = 2; - // Deprecated: Prefer to use `options` instead. This field is set in queries - // if and only if `len(options) == 1` and that option has weight 1. In all - // other cases, this field will default to VOTE_OPTION_UNSPECIFIED. - VoteOption option = 3 [deprecated = true]; - // Since: cosmos-sdk 0.43 - repeated WeightedVoteOption options = 4 [(gogoproto.nullable) = false]; -} - -// DepositParams defines the params for deposits on governance proposals. -message DepositParams { - // Minimum deposit for a proposal to enter voting period. - repeated cosmos.base.v1beta1.Coin min_deposit = 1 [ - (gogoproto.nullable) = false, - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", - (gogoproto.moretags) = "yaml:\"min_deposit\"", - (gogoproto.jsontag) = "min_deposit,omitempty" - ]; - - // Maximum period for Atom holders to deposit on a proposal. Initial value: 2 - // months. - google.protobuf.Duration max_deposit_period = 2 [ - (gogoproto.nullable) = false, - (gogoproto.stdduration) = true, - (gogoproto.jsontag) = "max_deposit_period,omitempty", - (gogoproto.moretags) = "yaml:\"max_deposit_period\"" - ]; -} - -// VotingParams defines the params for voting on governance proposals. -message VotingParams { - // Length of the voting period. - google.protobuf.Duration voting_period = 1 [ - (gogoproto.nullable) = false, - (gogoproto.stdduration) = true, - (gogoproto.jsontag) = "voting_period,omitempty", - (gogoproto.moretags) = "yaml:\"voting_period\"" - ]; -} - -// TallyParams defines the params for tallying votes on governance proposals. -message TallyParams { - // Minimum percentage of total stake needed to vote for a result to be - // considered valid. - bytes quorum = 1 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false, - (gogoproto.jsontag) = "quorum,omitempty" - ]; - - // Minimum proportion of Yes votes for proposal to pass. Default value: 0.5. - bytes threshold = 2 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false, - (gogoproto.jsontag) = "threshold,omitempty" - ]; - - // Minimum value of Veto votes to Total votes ratio for proposal to be - // vetoed. Default value: 1/3. - bytes veto_threshold = 3 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false, - (gogoproto.jsontag) = "veto_threshold,omitempty", - (gogoproto.moretags) = "yaml:\"veto_threshold\"" - ]; -} diff --git a/ampd/proto/third_party/cosmos/gov/v1beta1/query.proto b/ampd/proto/third_party/cosmos/gov/v1beta1/query.proto deleted file mode 100644 index da62bdbad..000000000 --- a/ampd/proto/third_party/cosmos/gov/v1beta1/query.proto +++ /dev/null @@ -1,190 +0,0 @@ -syntax = "proto3"; -package cosmos.gov.v1beta1; - -import "cosmos/base/query/v1beta1/pagination.proto"; -import "gogoproto/gogo.proto"; -import "google/api/annotations.proto"; -import "cosmos/gov/v1beta1/gov.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/gov/types"; - -// Query defines the gRPC querier service for gov module -service Query { - // Proposal queries proposal details based on ProposalID. - rpc Proposal(QueryProposalRequest) returns (QueryProposalResponse) { - option (google.api.http).get = "/cosmos/gov/v1beta1/proposals/{proposal_id}"; - } - - // Proposals queries all proposals based on given status. - rpc Proposals(QueryProposalsRequest) returns (QueryProposalsResponse) { - option (google.api.http).get = "/cosmos/gov/v1beta1/proposals"; - } - - // Vote queries voted information based on proposalID, voterAddr. - rpc Vote(QueryVoteRequest) returns (QueryVoteResponse) { - option (google.api.http).get = "/cosmos/gov/v1beta1/proposals/{proposal_id}/votes/{voter}"; - } - - // Votes queries votes of a given proposal. - rpc Votes(QueryVotesRequest) returns (QueryVotesResponse) { - option (google.api.http).get = "/cosmos/gov/v1beta1/proposals/{proposal_id}/votes"; - } - - // Params queries all parameters of the gov module. - rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { - option (google.api.http).get = "/cosmos/gov/v1beta1/params/{params_type}"; - } - - // Deposit queries single deposit information based proposalID, depositAddr. - rpc Deposit(QueryDepositRequest) returns (QueryDepositResponse) { - option (google.api.http).get = "/cosmos/gov/v1beta1/proposals/{proposal_id}/deposits/{depositor}"; - } - - // Deposits queries all deposits of a single proposal. - rpc Deposits(QueryDepositsRequest) returns (QueryDepositsResponse) { - option (google.api.http).get = "/cosmos/gov/v1beta1/proposals/{proposal_id}/deposits"; - } - - // TallyResult queries the tally of a proposal vote. - rpc TallyResult(QueryTallyResultRequest) returns (QueryTallyResultResponse) { - option (google.api.http).get = "/cosmos/gov/v1beta1/proposals/{proposal_id}/tally"; - } -} - -// QueryProposalRequest is the request type for the Query/Proposal RPC method. -message QueryProposalRequest { - // proposal_id defines the unique id of the proposal. - uint64 proposal_id = 1; -} - -// QueryProposalResponse is the response type for the Query/Proposal RPC method. -message QueryProposalResponse { - Proposal proposal = 1 [(gogoproto.nullable) = false]; -} - -// QueryProposalsRequest is the request type for the Query/Proposals RPC method. -message QueryProposalsRequest { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // proposal_status defines the status of the proposals. - ProposalStatus proposal_status = 1; - - // voter defines the voter address for the proposals. - string voter = 2; - - // depositor defines the deposit addresses from the proposals. - string depositor = 3; - - // pagination defines an optional pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 4; -} - -// QueryProposalsResponse is the response type for the Query/Proposals RPC -// method. -message QueryProposalsResponse { - repeated Proposal proposals = 1 [(gogoproto.nullable) = false]; - - // pagination defines the pagination in the response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -// QueryVoteRequest is the request type for the Query/Vote RPC method. -message QueryVoteRequest { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // proposal_id defines the unique id of the proposal. - uint64 proposal_id = 1; - - // voter defines the oter address for the proposals. - string voter = 2; -} - -// QueryVoteResponse is the response type for the Query/Vote RPC method. -message QueryVoteResponse { - // vote defined the queried vote. - Vote vote = 1 [(gogoproto.nullable) = false]; -} - -// QueryVotesRequest is the request type for the Query/Votes RPC method. -message QueryVotesRequest { - // proposal_id defines the unique id of the proposal. - uint64 proposal_id = 1; - - // pagination defines an optional pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 2; -} - -// QueryVotesResponse is the response type for the Query/Votes RPC method. -message QueryVotesResponse { - // votes defined the queried votes. - repeated Vote votes = 1 [(gogoproto.nullable) = false]; - - // pagination defines the pagination in the response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -// QueryParamsRequest is the request type for the Query/Params RPC method. -message QueryParamsRequest { - // params_type defines which parameters to query for, can be one of "voting", - // "tallying" or "deposit". - string params_type = 1; -} - -// QueryParamsResponse is the response type for the Query/Params RPC method. -message QueryParamsResponse { - // voting_params defines the parameters related to voting. - VotingParams voting_params = 1 [(gogoproto.nullable) = false]; - // deposit_params defines the parameters related to deposit. - DepositParams deposit_params = 2 [(gogoproto.nullable) = false]; - // tally_params defines the parameters related to tally. - TallyParams tally_params = 3 [(gogoproto.nullable) = false]; -} - -// QueryDepositRequest is the request type for the Query/Deposit RPC method. -message QueryDepositRequest { - option (gogoproto.goproto_getters) = false; - option (gogoproto.equal) = false; - - // proposal_id defines the unique id of the proposal. - uint64 proposal_id = 1; - - // depositor defines the deposit addresses from the proposals. - string depositor = 2; -} - -// QueryDepositResponse is the response type for the Query/Deposit RPC method. -message QueryDepositResponse { - // deposit defines the requested deposit. - Deposit deposit = 1 [(gogoproto.nullable) = false]; -} - -// QueryDepositsRequest is the request type for the Query/Deposits RPC method. -message QueryDepositsRequest { - // proposal_id defines the unique id of the proposal. - uint64 proposal_id = 1; - - // pagination defines an optional pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 2; -} - -// QueryDepositsResponse is the response type for the Query/Deposits RPC method. -message QueryDepositsResponse { - repeated Deposit deposits = 1 [(gogoproto.nullable) = false]; - - // pagination defines the pagination in the response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -// QueryTallyResultRequest is the request type for the Query/Tally RPC method. -message QueryTallyResultRequest { - // proposal_id defines the unique id of the proposal. - uint64 proposal_id = 1; -} - -// QueryTallyResultResponse is the response type for the Query/Tally RPC method. -message QueryTallyResultResponse { - // tally defines the requested tally. - TallyResult tally = 1 [(gogoproto.nullable) = false]; -} diff --git a/ampd/proto/third_party/cosmos/gov/v1beta1/tx.proto b/ampd/proto/third_party/cosmos/gov/v1beta1/tx.proto deleted file mode 100644 index 36c0a95d2..000000000 --- a/ampd/proto/third_party/cosmos/gov/v1beta1/tx.proto +++ /dev/null @@ -1,99 +0,0 @@ -syntax = "proto3"; -package cosmos.gov.v1beta1; - -import "cosmos/base/v1beta1/coin.proto"; -import "cosmos/gov/v1beta1/gov.proto"; -import "cosmos_proto/cosmos.proto"; -import "gogoproto/gogo.proto"; -import "google/protobuf/any.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/gov/types"; - -// Msg defines the bank Msg service. -service Msg { - // SubmitProposal defines a method to create new proposal given a content. - rpc SubmitProposal(MsgSubmitProposal) returns (MsgSubmitProposalResponse); - - // Vote defines a method to add a vote on a specific proposal. - rpc Vote(MsgVote) returns (MsgVoteResponse); - - // VoteWeighted defines a method to add a weighted vote on a specific proposal. - // - // Since: cosmos-sdk 0.43 - rpc VoteWeighted(MsgVoteWeighted) returns (MsgVoteWeightedResponse); - - // Deposit defines a method to add deposit on a specific proposal. - rpc Deposit(MsgDeposit) returns (MsgDepositResponse); -} - -// MsgSubmitProposal defines an sdk.Msg type that supports submitting arbitrary -// proposal Content. -message MsgSubmitProposal { - option (gogoproto.equal) = false; - option (gogoproto.goproto_stringer) = false; - option (gogoproto.stringer) = false; - option (gogoproto.goproto_getters) = false; - - google.protobuf.Any content = 1 [(cosmos_proto.accepts_interface) = "Content"]; - repeated cosmos.base.v1beta1.Coin initial_deposit = 2 [ - (gogoproto.nullable) = false, - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", - (gogoproto.moretags) = "yaml:\"initial_deposit\"" - ]; - string proposer = 3; -} - -// MsgSubmitProposalResponse defines the Msg/SubmitProposal response type. -message MsgSubmitProposalResponse { - uint64 proposal_id = 1 [(gogoproto.jsontag) = "proposal_id", (gogoproto.moretags) = "yaml:\"proposal_id\""]; -} - -// MsgVote defines a message to cast a vote. -message MsgVote { - option (gogoproto.equal) = false; - option (gogoproto.goproto_stringer) = false; - option (gogoproto.stringer) = false; - option (gogoproto.goproto_getters) = false; - - uint64 proposal_id = 1 [(gogoproto.jsontag) = "proposal_id", (gogoproto.moretags) = "yaml:\"proposal_id\""]; - string voter = 2; - VoteOption option = 3; -} - -// MsgVoteResponse defines the Msg/Vote response type. -message MsgVoteResponse {} - -// MsgVoteWeighted defines a message to cast a vote. -// -// Since: cosmos-sdk 0.43 -message MsgVoteWeighted { - option (gogoproto.equal) = false; - option (gogoproto.goproto_stringer) = false; - option (gogoproto.stringer) = false; - option (gogoproto.goproto_getters) = false; - - uint64 proposal_id = 1 [(gogoproto.moretags) = "yaml:\"proposal_id\""]; - string voter = 2; - repeated WeightedVoteOption options = 3 [(gogoproto.nullable) = false]; -} - -// MsgVoteWeightedResponse defines the Msg/VoteWeighted response type. -// -// Since: cosmos-sdk 0.43 -message MsgVoteWeightedResponse {} - -// MsgDeposit defines a message to submit a deposit to an existing proposal. -message MsgDeposit { - option (gogoproto.equal) = false; - option (gogoproto.goproto_stringer) = false; - option (gogoproto.stringer) = false; - option (gogoproto.goproto_getters) = false; - - uint64 proposal_id = 1 [(gogoproto.jsontag) = "proposal_id", (gogoproto.moretags) = "yaml:\"proposal_id\""]; - string depositor = 2; - repeated cosmos.base.v1beta1.Coin amount = 3 - [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; -} - -// MsgDepositResponse defines the Msg/Deposit response type. -message MsgDepositResponse {} diff --git a/ampd/proto/third_party/cosmos/mint/v1beta1/genesis.proto b/ampd/proto/third_party/cosmos/mint/v1beta1/genesis.proto deleted file mode 100644 index 4e783fb54..000000000 --- a/ampd/proto/third_party/cosmos/mint/v1beta1/genesis.proto +++ /dev/null @@ -1,16 +0,0 @@ -syntax = "proto3"; -package cosmos.mint.v1beta1; - -import "gogoproto/gogo.proto"; -import "cosmos/mint/v1beta1/mint.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/mint/types"; - -// GenesisState defines the mint module's genesis state. -message GenesisState { - // minter is a space for holding current inflation information. - Minter minter = 1 [(gogoproto.nullable) = false]; - - // params defines all the paramaters of the module. - Params params = 2 [(gogoproto.nullable) = false]; -} diff --git a/ampd/proto/third_party/cosmos/mint/v1beta1/mint.proto b/ampd/proto/third_party/cosmos/mint/v1beta1/mint.proto deleted file mode 100644 index f94d4ae2e..000000000 --- a/ampd/proto/third_party/cosmos/mint/v1beta1/mint.proto +++ /dev/null @@ -1,53 +0,0 @@ -syntax = "proto3"; -package cosmos.mint.v1beta1; - -option go_package = "github.com/cosmos/cosmos-sdk/x/mint/types"; - -import "gogoproto/gogo.proto"; - -// Minter represents the minting state. -message Minter { - // current annual inflation rate - string inflation = 1 - [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false]; - // current annual expected provisions - string annual_provisions = 2 [ - (gogoproto.moretags) = "yaml:\"annual_provisions\"", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; -} - -// Params holds parameters for the mint module. -message Params { - option (gogoproto.goproto_stringer) = false; - - // type of coin to mint - string mint_denom = 1; - // maximum annual change in inflation rate - string inflation_rate_change = 2 [ - (gogoproto.moretags) = "yaml:\"inflation_rate_change\"", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - // maximum inflation rate - string inflation_max = 3 [ - (gogoproto.moretags) = "yaml:\"inflation_max\"", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - // minimum inflation rate - string inflation_min = 4 [ - (gogoproto.moretags) = "yaml:\"inflation_min\"", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - // goal of percent bonded atoms - string goal_bonded = 5 [ - (gogoproto.moretags) = "yaml:\"goal_bonded\"", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - // expected blocks per year - uint64 blocks_per_year = 6 [(gogoproto.moretags) = "yaml:\"blocks_per_year\""]; -} diff --git a/ampd/proto/third_party/cosmos/mint/v1beta1/query.proto b/ampd/proto/third_party/cosmos/mint/v1beta1/query.proto deleted file mode 100644 index acd341d77..000000000 --- a/ampd/proto/third_party/cosmos/mint/v1beta1/query.proto +++ /dev/null @@ -1,57 +0,0 @@ -syntax = "proto3"; -package cosmos.mint.v1beta1; - -import "gogoproto/gogo.proto"; -import "google/api/annotations.proto"; -import "cosmos/mint/v1beta1/mint.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/mint/types"; - -// Query provides defines the gRPC querier service. -service Query { - // Params returns the total set of minting parameters. - rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { - option (google.api.http).get = "/cosmos/mint/v1beta1/params"; - } - - // Inflation returns the current minting inflation value. - rpc Inflation(QueryInflationRequest) returns (QueryInflationResponse) { - option (google.api.http).get = "/cosmos/mint/v1beta1/inflation"; - } - - // AnnualProvisions current minting annual provisions value. - rpc AnnualProvisions(QueryAnnualProvisionsRequest) returns (QueryAnnualProvisionsResponse) { - option (google.api.http).get = "/cosmos/mint/v1beta1/annual_provisions"; - } -} - -// QueryParamsRequest is the request type for the Query/Params RPC method. -message QueryParamsRequest {} - -// QueryParamsResponse is the response type for the Query/Params RPC method. -message QueryParamsResponse { - // params defines the parameters of the module. - Params params = 1 [(gogoproto.nullable) = false]; -} - -// QueryInflationRequest is the request type for the Query/Inflation RPC method. -message QueryInflationRequest {} - -// QueryInflationResponse is the response type for the Query/Inflation RPC -// method. -message QueryInflationResponse { - // inflation is the current minting inflation value. - bytes inflation = 1 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false]; -} - -// QueryAnnualProvisionsRequest is the request type for the -// Query/AnnualProvisions RPC method. -message QueryAnnualProvisionsRequest {} - -// QueryAnnualProvisionsResponse is the response type for the -// Query/AnnualProvisions RPC method. -message QueryAnnualProvisionsResponse { - // annual_provisions is the current minting annual provisions value. - bytes annual_provisions = 1 - [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false]; -} diff --git a/ampd/proto/third_party/cosmos/params/v1beta1/params.proto b/ampd/proto/third_party/cosmos/params/v1beta1/params.proto deleted file mode 100644 index 5382fd799..000000000 --- a/ampd/proto/third_party/cosmos/params/v1beta1/params.proto +++ /dev/null @@ -1,27 +0,0 @@ -syntax = "proto3"; -package cosmos.params.v1beta1; - -option go_package = "github.com/cosmos/cosmos-sdk/x/params/types/proposal"; -option (gogoproto.equal_all) = true; - -import "gogoproto/gogo.proto"; - -// ParameterChangeProposal defines a proposal to change one or more parameters. -message ParameterChangeProposal { - option (gogoproto.goproto_getters) = false; - option (gogoproto.goproto_stringer) = false; - - string title = 1; - string description = 2; - repeated ParamChange changes = 3 [(gogoproto.nullable) = false]; -} - -// ParamChange defines an individual parameter change, for use in -// ParameterChangeProposal. -message ParamChange { - option (gogoproto.goproto_stringer) = false; - - string subspace = 1; - string key = 2; - string value = 3; -} diff --git a/ampd/proto/third_party/cosmos/params/v1beta1/query.proto b/ampd/proto/third_party/cosmos/params/v1beta1/query.proto deleted file mode 100644 index 1078e02ae..000000000 --- a/ampd/proto/third_party/cosmos/params/v1beta1/query.proto +++ /dev/null @@ -1,32 +0,0 @@ -syntax = "proto3"; -package cosmos.params.v1beta1; - -import "gogoproto/gogo.proto"; -import "google/api/annotations.proto"; -import "cosmos/params/v1beta1/params.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/params/types/proposal"; - -// Query defines the gRPC querier service. -service Query { - // Params queries a specific parameter of a module, given its subspace and - // key. - rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { - option (google.api.http).get = "/cosmos/params/v1beta1/params"; - } -} - -// QueryParamsRequest is request type for the Query/Params RPC method. -message QueryParamsRequest { - // subspace defines the module to query the parameter for. - string subspace = 1; - - // key defines the key of the parameter in the subspace. - string key = 2; -} - -// QueryParamsResponse is response type for the Query/Params RPC method. -message QueryParamsResponse { - // param defines the queried parameter. - ParamChange param = 1 [(gogoproto.nullable) = false]; -} diff --git a/ampd/proto/third_party/cosmos/slashing/v1beta1/genesis.proto b/ampd/proto/third_party/cosmos/slashing/v1beta1/genesis.proto deleted file mode 100644 index a7aebcfba..000000000 --- a/ampd/proto/third_party/cosmos/slashing/v1beta1/genesis.proto +++ /dev/null @@ -1,50 +0,0 @@ -syntax = "proto3"; -package cosmos.slashing.v1beta1; - -option go_package = "github.com/cosmos/cosmos-sdk/x/slashing/types"; - -import "gogoproto/gogo.proto"; -import "cosmos/slashing/v1beta1/slashing.proto"; - -// GenesisState defines the slashing module's genesis state. -message GenesisState { - // params defines all the paramaters of related to deposit. - Params params = 1 [(gogoproto.nullable) = false]; - - // signing_infos represents a map between validator addresses and their - // signing infos. - repeated SigningInfo signing_infos = 2 - [(gogoproto.moretags) = "yaml:\"signing_infos\"", (gogoproto.nullable) = false]; - - // missed_blocks represents a map between validator addresses and their - // missed blocks. - repeated ValidatorMissedBlocks missed_blocks = 3 - [(gogoproto.moretags) = "yaml:\"missed_blocks\"", (gogoproto.nullable) = false]; -} - -// SigningInfo stores validator signing info of corresponding address. -message SigningInfo { - // address is the validator address. - string address = 1; - // validator_signing_info represents the signing info of this validator. - ValidatorSigningInfo validator_signing_info = 2 - [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"validator_signing_info\""]; -} - -// ValidatorMissedBlocks contains array of missed blocks of corresponding -// address. -message ValidatorMissedBlocks { - // address is the validator address. - string address = 1; - // missed_blocks is an array of missed blocks by the validator. - repeated MissedBlock missed_blocks = 2 - [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"missed_blocks\""]; -} - -// MissedBlock contains height and missed status as boolean. -message MissedBlock { - // index is the height at which the block was missed. - int64 index = 1; - // missed is the missed status. - bool missed = 2; -} diff --git a/ampd/proto/third_party/cosmos/slashing/v1beta1/query.proto b/ampd/proto/third_party/cosmos/slashing/v1beta1/query.proto deleted file mode 100644 index 869049a0e..000000000 --- a/ampd/proto/third_party/cosmos/slashing/v1beta1/query.proto +++ /dev/null @@ -1,63 +0,0 @@ -syntax = "proto3"; -package cosmos.slashing.v1beta1; - -import "cosmos/base/query/v1beta1/pagination.proto"; -import "gogoproto/gogo.proto"; -import "google/api/annotations.proto"; -import "cosmos/slashing/v1beta1/slashing.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/slashing/types"; - -// Query provides defines the gRPC querier service -service Query { - // Params queries the parameters of slashing module - rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { - option (google.api.http).get = "/cosmos/slashing/v1beta1/params"; - } - - // SigningInfo queries the signing info of given cons address - rpc SigningInfo(QuerySigningInfoRequest) returns (QuerySigningInfoResponse) { - option (google.api.http).get = "/cosmos/slashing/v1beta1/signing_infos/{cons_address}"; - } - - // SigningInfos queries signing info of all validators - rpc SigningInfos(QuerySigningInfosRequest) returns (QuerySigningInfosResponse) { - option (google.api.http).get = "/cosmos/slashing/v1beta1/signing_infos"; - } -} - -// QueryParamsRequest is the request type for the Query/Params RPC method -message QueryParamsRequest {} - -// QueryParamsResponse is the response type for the Query/Params RPC method -message QueryParamsResponse { - Params params = 1 [(gogoproto.nullable) = false]; -} - -// QuerySigningInfoRequest is the request type for the Query/SigningInfo RPC -// method -message QuerySigningInfoRequest { - // cons_address is the address to query signing info of - string cons_address = 1; -} - -// QuerySigningInfoResponse is the response type for the Query/SigningInfo RPC -// method -message QuerySigningInfoResponse { - // val_signing_info is the signing info of requested val cons address - ValidatorSigningInfo val_signing_info = 1 [(gogoproto.nullable) = false]; -} - -// QuerySigningInfosRequest is the request type for the Query/SigningInfos RPC -// method -message QuerySigningInfosRequest { - cosmos.base.query.v1beta1.PageRequest pagination = 1; -} - -// QuerySigningInfosResponse is the response type for the Query/SigningInfos RPC -// method -message QuerySigningInfosResponse { - // info is the signing info of all validators - repeated cosmos.slashing.v1beta1.ValidatorSigningInfo info = 1 [(gogoproto.nullable) = false]; - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} diff --git a/ampd/proto/third_party/cosmos/slashing/v1beta1/slashing.proto b/ampd/proto/third_party/cosmos/slashing/v1beta1/slashing.proto deleted file mode 100644 index 882a0fb60..000000000 --- a/ampd/proto/third_party/cosmos/slashing/v1beta1/slashing.proto +++ /dev/null @@ -1,58 +0,0 @@ -syntax = "proto3"; -package cosmos.slashing.v1beta1; - -option go_package = "github.com/cosmos/cosmos-sdk/x/slashing/types"; -option (gogoproto.equal_all) = true; - -import "gogoproto/gogo.proto"; -import "google/protobuf/duration.proto"; -import "google/protobuf/timestamp.proto"; - -// ValidatorSigningInfo defines a validator's signing info for monitoring their -// liveness activity. -message ValidatorSigningInfo { - option (gogoproto.equal) = true; - option (gogoproto.goproto_stringer) = false; - - string address = 1; - // Height at which validator was first a candidate OR was unjailed - int64 start_height = 2 [(gogoproto.moretags) = "yaml:\"start_height\""]; - // Index which is incremented each time the validator was a bonded - // in a block and may have signed a precommit or not. This in conjunction with the - // `SignedBlocksWindow` param determines the index in the `MissedBlocksBitArray`. - int64 index_offset = 3 [(gogoproto.moretags) = "yaml:\"index_offset\""]; - // Timestamp until which the validator is jailed due to liveness downtime. - google.protobuf.Timestamp jailed_until = 4 - [(gogoproto.moretags) = "yaml:\"jailed_until\"", (gogoproto.stdtime) = true, (gogoproto.nullable) = false]; - // Whether or not a validator has been tombstoned (killed out of validator set). It is set - // once the validator commits an equivocation or for any other configured misbehiavor. - bool tombstoned = 5; - // A counter kept to avoid unnecessary array reads. - // Note that `Sum(MissedBlocksBitArray)` always equals `MissedBlocksCounter`. - int64 missed_blocks_counter = 6 [(gogoproto.moretags) = "yaml:\"missed_blocks_counter\""]; -} - -// Params represents the parameters used for by the slashing module. -message Params { - int64 signed_blocks_window = 1 [(gogoproto.moretags) = "yaml:\"signed_blocks_window\""]; - bytes min_signed_per_window = 2 [ - (gogoproto.moretags) = "yaml:\"min_signed_per_window\"", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - google.protobuf.Duration downtime_jail_duration = 3 [ - (gogoproto.nullable) = false, - (gogoproto.stdduration) = true, - (gogoproto.moretags) = "yaml:\"downtime_jail_duration\"" - ]; - bytes slash_fraction_double_sign = 4 [ - (gogoproto.moretags) = "yaml:\"slash_fraction_double_sign\"", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - bytes slash_fraction_downtime = 5 [ - (gogoproto.moretags) = "yaml:\"slash_fraction_downtime\"", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; -} diff --git a/ampd/proto/third_party/cosmos/slashing/v1beta1/tx.proto b/ampd/proto/third_party/cosmos/slashing/v1beta1/tx.proto deleted file mode 100644 index 4d63370ec..000000000 --- a/ampd/proto/third_party/cosmos/slashing/v1beta1/tx.proto +++ /dev/null @@ -1,26 +0,0 @@ -syntax = "proto3"; -package cosmos.slashing.v1beta1; - -option go_package = "github.com/cosmos/cosmos-sdk/x/slashing/types"; -option (gogoproto.equal_all) = true; - -import "gogoproto/gogo.proto"; - -// Msg defines the slashing Msg service. -service Msg { - // Unjail defines a method for unjailing a jailed validator, thus returning - // them into the bonded validator set, so they can begin receiving provisions - // and rewards again. - rpc Unjail(MsgUnjail) returns (MsgUnjailResponse); -} - -// MsgUnjail defines the Msg/Unjail request type -message MsgUnjail { - option (gogoproto.goproto_getters) = false; - option (gogoproto.goproto_stringer) = true; - - string validator_addr = 1 [(gogoproto.moretags) = "yaml:\"address\"", (gogoproto.jsontag) = "address"]; -} - -// MsgUnjailResponse defines the Msg/Unjail response type -message MsgUnjailResponse {} \ No newline at end of file diff --git a/ampd/proto/third_party/cosmos/staking/v1beta1/authz.proto b/ampd/proto/third_party/cosmos/staking/v1beta1/authz.proto deleted file mode 100644 index d50c329c9..000000000 --- a/ampd/proto/third_party/cosmos/staking/v1beta1/authz.proto +++ /dev/null @@ -1,47 +0,0 @@ -syntax = "proto3"; -package cosmos.staking.v1beta1; - -import "gogoproto/gogo.proto"; -import "cosmos_proto/cosmos.proto"; -import "cosmos/base/v1beta1/coin.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/staking/types"; - -// StakeAuthorization defines authorization for delegate/undelegate/redelegate. -// -// Since: cosmos-sdk 0.43 -message StakeAuthorization { - option (cosmos_proto.implements_interface) = "Authorization"; - - // max_tokens specifies the maximum amount of tokens can be delegate to a validator. If it is - // empty, there is no spend limit and any amount of coins can be delegated. - cosmos.base.v1beta1.Coin max_tokens = 1 [(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coin"]; - // validators is the oneof that represents either allow_list or deny_list - oneof validators { - // allow_list specifies list of validator addresses to whom grantee can delegate tokens on behalf of granter's - // account. - Validators allow_list = 2; - // deny_list specifies list of validator addresses to whom grantee can not delegate tokens. - Validators deny_list = 3; - } - // Validators defines list of validator addresses. - message Validators { - repeated string address = 1; - } - // authorization_type defines one of AuthorizationType. - AuthorizationType authorization_type = 4; -} - -// AuthorizationType defines the type of staking module authorization type -// -// Since: cosmos-sdk 0.43 -enum AuthorizationType { - // AUTHORIZATION_TYPE_UNSPECIFIED specifies an unknown authorization type - AUTHORIZATION_TYPE_UNSPECIFIED = 0; - // AUTHORIZATION_TYPE_DELEGATE defines an authorization type for Msg/Delegate - AUTHORIZATION_TYPE_DELEGATE = 1; - // AUTHORIZATION_TYPE_UNDELEGATE defines an authorization type for Msg/Undelegate - AUTHORIZATION_TYPE_UNDELEGATE = 2; - // AUTHORIZATION_TYPE_REDELEGATE defines an authorization type for Msg/BeginRedelegate - AUTHORIZATION_TYPE_REDELEGATE = 3; -} diff --git a/ampd/proto/third_party/cosmos/staking/v1beta1/genesis.proto b/ampd/proto/third_party/cosmos/staking/v1beta1/genesis.proto deleted file mode 100644 index d1563dbc5..000000000 --- a/ampd/proto/third_party/cosmos/staking/v1beta1/genesis.proto +++ /dev/null @@ -1,53 +0,0 @@ -syntax = "proto3"; -package cosmos.staking.v1beta1; - -option go_package = "github.com/cosmos/cosmos-sdk/x/staking/types"; - -import "gogoproto/gogo.proto"; -import "cosmos/staking/v1beta1/staking.proto"; - -// GenesisState defines the staking module's genesis state. -message GenesisState { - // params defines all the paramaters of related to deposit. - Params params = 1 [(gogoproto.nullable) = false]; - - // last_total_power tracks the total amounts of bonded tokens recorded during - // the previous end block. - bytes last_total_power = 2 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.moretags) = "yaml:\"last_total_power\"", - (gogoproto.nullable) = false - ]; - - // last_validator_powers is a special index that provides a historical list - // of the last-block's bonded validators. - repeated LastValidatorPower last_validator_powers = 3 - [(gogoproto.moretags) = "yaml:\"last_validator_powers\"", (gogoproto.nullable) = false]; - - // delegations defines the validator set at genesis. - repeated Validator validators = 4 [(gogoproto.nullable) = false]; - - // delegations defines the delegations active at genesis. - repeated Delegation delegations = 5 [(gogoproto.nullable) = false]; - - // unbonding_delegations defines the unbonding delegations active at genesis. - repeated UnbondingDelegation unbonding_delegations = 6 - [(gogoproto.moretags) = "yaml:\"unbonding_delegations\"", (gogoproto.nullable) = false]; - - // redelegations defines the redelegations active at genesis. - repeated Redelegation redelegations = 7 [(gogoproto.nullable) = false]; - - bool exported = 8; -} - -// LastValidatorPower required for validator set update logic. -message LastValidatorPower { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // address is the address of the validator. - string address = 1; - - // power defines the power of the validator. - int64 power = 2; -} diff --git a/ampd/proto/third_party/cosmos/staking/v1beta1/query.proto b/ampd/proto/third_party/cosmos/staking/v1beta1/query.proto deleted file mode 100644 index 4852c5353..000000000 --- a/ampd/proto/third_party/cosmos/staking/v1beta1/query.proto +++ /dev/null @@ -1,348 +0,0 @@ -syntax = "proto3"; -package cosmos.staking.v1beta1; - -import "cosmos/base/query/v1beta1/pagination.proto"; -import "gogoproto/gogo.proto"; -import "google/api/annotations.proto"; -import "cosmos/staking/v1beta1/staking.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/staking/types"; - -// Query defines the gRPC querier service. -service Query { - // Validators queries all validators that match the given status. - rpc Validators(QueryValidatorsRequest) returns (QueryValidatorsResponse) { - option (google.api.http).get = "/cosmos/staking/v1beta1/validators"; - } - - // Validator queries validator info for given validator address. - rpc Validator(QueryValidatorRequest) returns (QueryValidatorResponse) { - option (google.api.http).get = "/cosmos/staking/v1beta1/validators/{validator_addr}"; - } - - // ValidatorDelegations queries delegate info for given validator. - rpc ValidatorDelegations(QueryValidatorDelegationsRequest) returns (QueryValidatorDelegationsResponse) { - option (google.api.http).get = "/cosmos/staking/v1beta1/validators/{validator_addr}/delegations"; - } - - // ValidatorUnbondingDelegations queries unbonding delegations of a validator. - rpc ValidatorUnbondingDelegations(QueryValidatorUnbondingDelegationsRequest) - returns (QueryValidatorUnbondingDelegationsResponse) { - option (google.api.http).get = "/cosmos/staking/v1beta1/validators/" - "{validator_addr}/unbonding_delegations"; - } - - // Delegation queries delegate info for given validator delegator pair. - rpc Delegation(QueryDelegationRequest) returns (QueryDelegationResponse) { - option (google.api.http).get = "/cosmos/staking/v1beta1/validators/{validator_addr}/delegations/" - "{delegator_addr}"; - } - - // UnbondingDelegation queries unbonding info for given validator delegator - // pair. - rpc UnbondingDelegation(QueryUnbondingDelegationRequest) returns (QueryUnbondingDelegationResponse) { - option (google.api.http).get = "/cosmos/staking/v1beta1/validators/{validator_addr}/delegations/" - "{delegator_addr}/unbonding_delegation"; - } - - // DelegatorDelegations queries all delegations of a given delegator address. - rpc DelegatorDelegations(QueryDelegatorDelegationsRequest) returns (QueryDelegatorDelegationsResponse) { - option (google.api.http).get = "/cosmos/staking/v1beta1/delegations/{delegator_addr}"; - } - - // DelegatorUnbondingDelegations queries all unbonding delegations of a given - // delegator address. - rpc DelegatorUnbondingDelegations(QueryDelegatorUnbondingDelegationsRequest) - returns (QueryDelegatorUnbondingDelegationsResponse) { - option (google.api.http).get = "/cosmos/staking/v1beta1/delegators/" - "{delegator_addr}/unbonding_delegations"; - } - - // Redelegations queries redelegations of given address. - rpc Redelegations(QueryRedelegationsRequest) returns (QueryRedelegationsResponse) { - option (google.api.http).get = "/cosmos/staking/v1beta1/delegators/{delegator_addr}/redelegations"; - } - - // DelegatorValidators queries all validators info for given delegator - // address. - rpc DelegatorValidators(QueryDelegatorValidatorsRequest) returns (QueryDelegatorValidatorsResponse) { - option (google.api.http).get = "/cosmos/staking/v1beta1/delegators/{delegator_addr}/validators"; - } - - // DelegatorValidator queries validator info for given delegator validator - // pair. - rpc DelegatorValidator(QueryDelegatorValidatorRequest) returns (QueryDelegatorValidatorResponse) { - option (google.api.http).get = "/cosmos/staking/v1beta1/delegators/{delegator_addr}/validators/" - "{validator_addr}"; - } - - // HistoricalInfo queries the historical info for given height. - rpc HistoricalInfo(QueryHistoricalInfoRequest) returns (QueryHistoricalInfoResponse) { - option (google.api.http).get = "/cosmos/staking/v1beta1/historical_info/{height}"; - } - - // Pool queries the pool info. - rpc Pool(QueryPoolRequest) returns (QueryPoolResponse) { - option (google.api.http).get = "/cosmos/staking/v1beta1/pool"; - } - - // Parameters queries the staking parameters. - rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { - option (google.api.http).get = "/cosmos/staking/v1beta1/params"; - } -} - -// QueryValidatorsRequest is request type for Query/Validators RPC method. -message QueryValidatorsRequest { - // status enables to query for validators matching a given status. - string status = 1; - - // pagination defines an optional pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 2; -} - -// QueryValidatorsResponse is response type for the Query/Validators RPC method -message QueryValidatorsResponse { - // validators contains all the queried validators. - repeated Validator validators = 1 [(gogoproto.nullable) = false]; - - // pagination defines the pagination in the response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -// QueryValidatorRequest is response type for the Query/Validator RPC method -message QueryValidatorRequest { - // validator_addr defines the validator address to query for. - string validator_addr = 1; -} - -// QueryValidatorResponse is response type for the Query/Validator RPC method -message QueryValidatorResponse { - // validator defines the the validator info. - Validator validator = 1 [(gogoproto.nullable) = false]; -} - -// QueryValidatorDelegationsRequest is request type for the -// Query/ValidatorDelegations RPC method -message QueryValidatorDelegationsRequest { - // validator_addr defines the validator address to query for. - string validator_addr = 1; - - // pagination defines an optional pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 2; -} - -// QueryValidatorDelegationsResponse is response type for the -// Query/ValidatorDelegations RPC method -message QueryValidatorDelegationsResponse { - repeated DelegationResponse delegation_responses = 1 - [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "DelegationResponses"]; - - // pagination defines the pagination in the response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -// QueryValidatorUnbondingDelegationsRequest is required type for the -// Query/ValidatorUnbondingDelegations RPC method -message QueryValidatorUnbondingDelegationsRequest { - // validator_addr defines the validator address to query for. - string validator_addr = 1; - - // pagination defines an optional pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 2; -} - -// QueryValidatorUnbondingDelegationsResponse is response type for the -// Query/ValidatorUnbondingDelegations RPC method. -message QueryValidatorUnbondingDelegationsResponse { - repeated UnbondingDelegation unbonding_responses = 1 [(gogoproto.nullable) = false]; - - // pagination defines the pagination in the response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -// QueryDelegationRequest is request type for the Query/Delegation RPC method. -message QueryDelegationRequest { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // delegator_addr defines the delegator address to query for. - string delegator_addr = 1; - - // validator_addr defines the validator address to query for. - string validator_addr = 2; -} - -// QueryDelegationResponse is response type for the Query/Delegation RPC method. -message QueryDelegationResponse { - // delegation_responses defines the delegation info of a delegation. - DelegationResponse delegation_response = 1; -} - -// QueryUnbondingDelegationRequest is request type for the -// Query/UnbondingDelegation RPC method. -message QueryUnbondingDelegationRequest { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // delegator_addr defines the delegator address to query for. - string delegator_addr = 1; - - // validator_addr defines the validator address to query for. - string validator_addr = 2; -} - -// QueryDelegationResponse is response type for the Query/UnbondingDelegation -// RPC method. -message QueryUnbondingDelegationResponse { - // unbond defines the unbonding information of a delegation. - UnbondingDelegation unbond = 1 [(gogoproto.nullable) = false]; -} - -// QueryDelegatorDelegationsRequest is request type for the -// Query/DelegatorDelegations RPC method. -message QueryDelegatorDelegationsRequest { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // delegator_addr defines the delegator address to query for. - string delegator_addr = 1; - - // pagination defines an optional pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 2; -} - -// QueryDelegatorDelegationsResponse is response type for the -// Query/DelegatorDelegations RPC method. -message QueryDelegatorDelegationsResponse { - // delegation_responses defines all the delegations' info of a delegator. - repeated DelegationResponse delegation_responses = 1 [(gogoproto.nullable) = false]; - - // pagination defines the pagination in the response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -// QueryDelegatorUnbondingDelegationsRequest is request type for the -// Query/DelegatorUnbondingDelegations RPC method. -message QueryDelegatorUnbondingDelegationsRequest { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // delegator_addr defines the delegator address to query for. - string delegator_addr = 1; - - // pagination defines an optional pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 2; -} - -// QueryUnbondingDelegatorDelegationsResponse is response type for the -// Query/UnbondingDelegatorDelegations RPC method. -message QueryDelegatorUnbondingDelegationsResponse { - repeated UnbondingDelegation unbonding_responses = 1 [(gogoproto.nullable) = false]; - - // pagination defines the pagination in the response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -// QueryRedelegationsRequest is request type for the Query/Redelegations RPC -// method. -message QueryRedelegationsRequest { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // delegator_addr defines the delegator address to query for. - string delegator_addr = 1; - - // src_validator_addr defines the validator address to redelegate from. - string src_validator_addr = 2; - - // dst_validator_addr defines the validator address to redelegate to. - string dst_validator_addr = 3; - - // pagination defines an optional pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 4; -} - -// QueryRedelegationsResponse is response type for the Query/Redelegations RPC -// method. -message QueryRedelegationsResponse { - repeated RedelegationResponse redelegation_responses = 1 [(gogoproto.nullable) = false]; - - // pagination defines the pagination in the response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -// QueryDelegatorValidatorsRequest is request type for the -// Query/DelegatorValidators RPC method. -message QueryDelegatorValidatorsRequest { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // delegator_addr defines the delegator address to query for. - string delegator_addr = 1; - - // pagination defines an optional pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 2; -} - -// QueryDelegatorValidatorsResponse is response type for the -// Query/DelegatorValidators RPC method. -message QueryDelegatorValidatorsResponse { - // validators defines the the validators' info of a delegator. - repeated Validator validators = 1 [(gogoproto.nullable) = false]; - - // pagination defines the pagination in the response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -// QueryDelegatorValidatorRequest is request type for the -// Query/DelegatorValidator RPC method. -message QueryDelegatorValidatorRequest { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // delegator_addr defines the delegator address to query for. - string delegator_addr = 1; - - // validator_addr defines the validator address to query for. - string validator_addr = 2; -} - -// QueryDelegatorValidatorResponse response type for the -// Query/DelegatorValidator RPC method. -message QueryDelegatorValidatorResponse { - // validator defines the the validator info. - Validator validator = 1 [(gogoproto.nullable) = false]; -} - -// QueryHistoricalInfoRequest is request type for the Query/HistoricalInfo RPC -// method. -message QueryHistoricalInfoRequest { - // height defines at which height to query the historical info. - int64 height = 1; -} - -// QueryHistoricalInfoResponse is response type for the Query/HistoricalInfo RPC -// method. -message QueryHistoricalInfoResponse { - // hist defines the historical info at the given height. - HistoricalInfo hist = 1; -} - -// QueryPoolRequest is request type for the Query/Pool RPC method. -message QueryPoolRequest {} - -// QueryPoolResponse is response type for the Query/Pool RPC method. -message QueryPoolResponse { - // pool defines the pool info. - Pool pool = 1 [(gogoproto.nullable) = false]; -} - -// QueryParamsRequest is request type for the Query/Params RPC method. -message QueryParamsRequest {} - -// QueryParamsResponse is response type for the Query/Params RPC method. -message QueryParamsResponse { - // params holds all the parameters of this module. - Params params = 1 [(gogoproto.nullable) = false]; -} diff --git a/ampd/proto/third_party/cosmos/staking/v1beta1/staking.proto b/ampd/proto/third_party/cosmos/staking/v1beta1/staking.proto deleted file mode 100644 index 76e9599e2..000000000 --- a/ampd/proto/third_party/cosmos/staking/v1beta1/staking.proto +++ /dev/null @@ -1,334 +0,0 @@ -syntax = "proto3"; -package cosmos.staking.v1beta1; - -import "gogoproto/gogo.proto"; -import "google/protobuf/any.proto"; -import "google/protobuf/duration.proto"; -import "google/protobuf/timestamp.proto"; - -import "cosmos_proto/cosmos.proto"; -import "cosmos/base/v1beta1/coin.proto"; -import "tendermint/types/types.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/staking/types"; - -// HistoricalInfo contains header and validator information for a given block. -// It is stored as part of staking module's state, which persists the `n` most -// recent HistoricalInfo -// (`n` is set by the staking module's `historical_entries` parameter). -message HistoricalInfo { - tendermint.types.Header header = 1 [(gogoproto.nullable) = false]; - repeated Validator valset = 2 [(gogoproto.nullable) = false]; -} - -// CommissionRates defines the initial commission rates to be used for creating -// a validator. -message CommissionRates { - option (gogoproto.equal) = true; - option (gogoproto.goproto_stringer) = false; - - // rate is the commission rate charged to delegators, as a fraction. - string rate = 1 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false]; - // max_rate defines the maximum commission rate which validator can ever charge, as a fraction. - string max_rate = 2 [ - (gogoproto.moretags) = "yaml:\"max_rate\"", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - // max_change_rate defines the maximum daily increase of the validator commission, as a fraction. - string max_change_rate = 3 [ - (gogoproto.moretags) = "yaml:\"max_change_rate\"", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; -} - -// Commission defines commission parameters for a given validator. -message Commission { - option (gogoproto.equal) = true; - option (gogoproto.goproto_stringer) = false; - - // commission_rates defines the initial commission rates to be used for creating a validator. - CommissionRates commission_rates = 1 [(gogoproto.embed) = true, (gogoproto.nullable) = false]; - // update_time is the last time the commission rate was changed. - google.protobuf.Timestamp update_time = 2 - [(gogoproto.nullable) = false, (gogoproto.stdtime) = true, (gogoproto.moretags) = "yaml:\"update_time\""]; -} - -// Description defines a validator description. -message Description { - option (gogoproto.equal) = true; - option (gogoproto.goproto_stringer) = false; - - // moniker defines a human-readable name for the validator. - string moniker = 1; - // identity defines an optional identity signature (ex. UPort or Keybase). - string identity = 2; - // website defines an optional website link. - string website = 3; - // security_contact defines an optional email for security contact. - string security_contact = 4 [(gogoproto.moretags) = "yaml:\"security_contact\""]; - // details define other optional details. - string details = 5; -} - -// Validator defines a validator, together with the total amount of the -// Validator's bond shares and their exchange rate to coins. Slashing results in -// a decrease in the exchange rate, allowing correct calculation of future -// undelegations without iterating over delegators. When coins are delegated to -// this validator, the validator is credited with a delegation whose number of -// bond shares is based on the amount of coins delegated divided by the current -// exchange rate. Voting power can be calculated as total bonded shares -// multiplied by exchange rate. -message Validator { - option (gogoproto.equal) = false; - option (gogoproto.goproto_stringer) = false; - option (gogoproto.goproto_getters) = false; - - // operator_address defines the address of the validator's operator; bech encoded in JSON. - string operator_address = 1 [(gogoproto.moretags) = "yaml:\"operator_address\""]; - // consensus_pubkey is the consensus public key of the validator, as a Protobuf Any. - google.protobuf.Any consensus_pubkey = 2 - [(cosmos_proto.accepts_interface) = "cosmos.crypto.PubKey", (gogoproto.moretags) = "yaml:\"consensus_pubkey\""]; - // jailed defined whether the validator has been jailed from bonded status or not. - bool jailed = 3; - // status is the validator status (bonded/unbonding/unbonded). - BondStatus status = 4; - // tokens define the delegated tokens (incl. self-delegation). - string tokens = 5 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.nullable) = false]; - // delegator_shares defines total shares issued to a validator's delegators. - string delegator_shares = 6 [ - (gogoproto.moretags) = "yaml:\"delegator_shares\"", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - // description defines the description terms for the validator. - Description description = 7 [(gogoproto.nullable) = false]; - // unbonding_height defines, if unbonding, the height at which this validator has begun unbonding. - int64 unbonding_height = 8 [(gogoproto.moretags) = "yaml:\"unbonding_height\""]; - // unbonding_time defines, if unbonding, the min time for the validator to complete unbonding. - google.protobuf.Timestamp unbonding_time = 9 - [(gogoproto.nullable) = false, (gogoproto.stdtime) = true, (gogoproto.moretags) = "yaml:\"unbonding_time\""]; - // commission defines the commission parameters. - Commission commission = 10 [(gogoproto.nullable) = false]; - // min_self_delegation is the validator's self declared minimum self delegation. - string min_self_delegation = 11 [ - (gogoproto.moretags) = "yaml:\"min_self_delegation\"", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.nullable) = false - ]; -} - -// BondStatus is the status of a validator. -enum BondStatus { - option (gogoproto.goproto_enum_prefix) = false; - - // UNSPECIFIED defines an invalid validator status. - BOND_STATUS_UNSPECIFIED = 0 [(gogoproto.enumvalue_customname) = "Unspecified"]; - // UNBONDED defines a validator that is not bonded. - BOND_STATUS_UNBONDED = 1 [(gogoproto.enumvalue_customname) = "Unbonded"]; - // UNBONDING defines a validator that is unbonding. - BOND_STATUS_UNBONDING = 2 [(gogoproto.enumvalue_customname) = "Unbonding"]; - // BONDED defines a validator that is bonded. - BOND_STATUS_BONDED = 3 [(gogoproto.enumvalue_customname) = "Bonded"]; -} - -// ValAddresses defines a repeated set of validator addresses. -message ValAddresses { - option (gogoproto.goproto_stringer) = false; - option (gogoproto.stringer) = true; - - repeated string addresses = 1; -} - -// DVPair is struct that just has a delegator-validator pair with no other data. -// It is intended to be used as a marshalable pointer. For example, a DVPair can -// be used to construct the key to getting an UnbondingDelegation from state. -message DVPair { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - option (gogoproto.goproto_stringer) = false; - - string delegator_address = 1 [(gogoproto.moretags) = "yaml:\"delegator_address\""]; - string validator_address = 2 [(gogoproto.moretags) = "yaml:\"validator_address\""]; -} - -// DVPairs defines an array of DVPair objects. -message DVPairs { - repeated DVPair pairs = 1 [(gogoproto.nullable) = false]; -} - -// DVVTriplet is struct that just has a delegator-validator-validator triplet -// with no other data. It is intended to be used as a marshalable pointer. For -// example, a DVVTriplet can be used to construct the key to getting a -// Redelegation from state. -message DVVTriplet { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - option (gogoproto.goproto_stringer) = false; - - string delegator_address = 1 [(gogoproto.moretags) = "yaml:\"delegator_address\""]; - string validator_src_address = 2 [(gogoproto.moretags) = "yaml:\"validator_src_address\""]; - string validator_dst_address = 3 [(gogoproto.moretags) = "yaml:\"validator_dst_address\""]; -} - -// DVVTriplets defines an array of DVVTriplet objects. -message DVVTriplets { - repeated DVVTriplet triplets = 1 [(gogoproto.nullable) = false]; -} - -// Delegation represents the bond with tokens held by an account. It is -// owned by one delegator, and is associated with the voting power of one -// validator. -message Delegation { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - option (gogoproto.goproto_stringer) = false; - - // delegator_address is the bech32-encoded address of the delegator. - string delegator_address = 1 [(gogoproto.moretags) = "yaml:\"delegator_address\""]; - // validator_address is the bech32-encoded address of the validator. - string validator_address = 2 [(gogoproto.moretags) = "yaml:\"validator_address\""]; - // shares define the delegation shares received. - string shares = 3 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false]; -} - -// UnbondingDelegation stores all of a single delegator's unbonding bonds -// for a single validator in an time-ordered list. -message UnbondingDelegation { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - option (gogoproto.goproto_stringer) = false; - - // delegator_address is the bech32-encoded address of the delegator. - string delegator_address = 1 [(gogoproto.moretags) = "yaml:\"delegator_address\""]; - // validator_address is the bech32-encoded address of the validator. - string validator_address = 2 [(gogoproto.moretags) = "yaml:\"validator_address\""]; - // entries are the unbonding delegation entries. - repeated UnbondingDelegationEntry entries = 3 [(gogoproto.nullable) = false]; // unbonding delegation entries -} - -// UnbondingDelegationEntry defines an unbonding object with relevant metadata. -message UnbondingDelegationEntry { - option (gogoproto.equal) = true; - option (gogoproto.goproto_stringer) = false; - - // creation_height is the height which the unbonding took place. - int64 creation_height = 1 [(gogoproto.moretags) = "yaml:\"creation_height\""]; - // completion_time is the unix time for unbonding completion. - google.protobuf.Timestamp completion_time = 2 - [(gogoproto.nullable) = false, (gogoproto.stdtime) = true, (gogoproto.moretags) = "yaml:\"completion_time\""]; - // initial_balance defines the tokens initially scheduled to receive at completion. - string initial_balance = 3 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.nullable) = false, - (gogoproto.moretags) = "yaml:\"initial_balance\"" - ]; - // balance defines the tokens to receive at completion. - string balance = 4 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.nullable) = false]; -} - -// RedelegationEntry defines a redelegation object with relevant metadata. -message RedelegationEntry { - option (gogoproto.equal) = true; - option (gogoproto.goproto_stringer) = false; - - // creation_height defines the height which the redelegation took place. - int64 creation_height = 1 [(gogoproto.moretags) = "yaml:\"creation_height\""]; - // completion_time defines the unix time for redelegation completion. - google.protobuf.Timestamp completion_time = 2 - [(gogoproto.nullable) = false, (gogoproto.stdtime) = true, (gogoproto.moretags) = "yaml:\"completion_time\""]; - // initial_balance defines the initial balance when redelegation started. - string initial_balance = 3 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.nullable) = false, - (gogoproto.moretags) = "yaml:\"initial_balance\"" - ]; - // shares_dst is the amount of destination-validator shares created by redelegation. - string shares_dst = 4 - [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false]; -} - -// Redelegation contains the list of a particular delegator's redelegating bonds -// from a particular source validator to a particular destination validator. -message Redelegation { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - option (gogoproto.goproto_stringer) = false; - - // delegator_address is the bech32-encoded address of the delegator. - string delegator_address = 1 [(gogoproto.moretags) = "yaml:\"delegator_address\""]; - // validator_src_address is the validator redelegation source operator address. - string validator_src_address = 2 [(gogoproto.moretags) = "yaml:\"validator_src_address\""]; - // validator_dst_address is the validator redelegation destination operator address. - string validator_dst_address = 3 [(gogoproto.moretags) = "yaml:\"validator_dst_address\""]; - // entries are the redelegation entries. - repeated RedelegationEntry entries = 4 [(gogoproto.nullable) = false]; // redelegation entries -} - -// Params defines the parameters for the staking module. -message Params { - option (gogoproto.equal) = true; - option (gogoproto.goproto_stringer) = false; - - // unbonding_time is the time duration of unbonding. - google.protobuf.Duration unbonding_time = 1 - [(gogoproto.nullable) = false, (gogoproto.stdduration) = true, (gogoproto.moretags) = "yaml:\"unbonding_time\""]; - // max_validators is the maximum number of validators. - uint32 max_validators = 2 [(gogoproto.moretags) = "yaml:\"max_validators\""]; - // max_entries is the max entries for either unbonding delegation or redelegation (per pair/trio). - uint32 max_entries = 3 [(gogoproto.moretags) = "yaml:\"max_entries\""]; - // historical_entries is the number of historical entries to persist. - uint32 historical_entries = 4 [(gogoproto.moretags) = "yaml:\"historical_entries\""]; - // bond_denom defines the bondable coin denomination. - string bond_denom = 5 [(gogoproto.moretags) = "yaml:\"bond_denom\""]; -} - -// DelegationResponse is equivalent to Delegation except that it contains a -// balance in addition to shares which is more suitable for client responses. -message DelegationResponse { - option (gogoproto.equal) = false; - option (gogoproto.goproto_stringer) = false; - - Delegation delegation = 1 [(gogoproto.nullable) = false]; - - cosmos.base.v1beta1.Coin balance = 2 [(gogoproto.nullable) = false]; -} - -// RedelegationEntryResponse is equivalent to a RedelegationEntry except that it -// contains a balance in addition to shares which is more suitable for client -// responses. -message RedelegationEntryResponse { - option (gogoproto.equal) = true; - - RedelegationEntry redelegation_entry = 1 [(gogoproto.nullable) = false]; - string balance = 4 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.nullable) = false]; -} - -// RedelegationResponse is equivalent to a Redelegation except that its entries -// contain a balance in addition to shares which is more suitable for client -// responses. -message RedelegationResponse { - option (gogoproto.equal) = false; - - Redelegation redelegation = 1 [(gogoproto.nullable) = false]; - repeated RedelegationEntryResponse entries = 2 [(gogoproto.nullable) = false]; -} - -// Pool is used for tracking bonded and not-bonded token supply of the bond -// denomination. -message Pool { - option (gogoproto.description) = true; - option (gogoproto.equal) = true; - string not_bonded_tokens = 1 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.jsontag) = "not_bonded_tokens", - (gogoproto.nullable) = false - ]; - string bonded_tokens = 2 [ - (gogoproto.jsontag) = "bonded_tokens", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.nullable) = false, - (gogoproto.moretags) = "yaml:\"bonded_tokens\"" - ]; -} diff --git a/ampd/proto/third_party/cosmos/staking/v1beta1/tx.proto b/ampd/proto/third_party/cosmos/staking/v1beta1/tx.proto deleted file mode 100644 index d074fe010..000000000 --- a/ampd/proto/third_party/cosmos/staking/v1beta1/tx.proto +++ /dev/null @@ -1,123 +0,0 @@ -syntax = "proto3"; -package cosmos.staking.v1beta1; - -import "google/protobuf/any.proto"; -import "google/protobuf/timestamp.proto"; -import "gogoproto/gogo.proto"; - -import "cosmos_proto/cosmos.proto"; -import "cosmos/base/v1beta1/coin.proto"; -import "cosmos/staking/v1beta1/staking.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/staking/types"; - -// Msg defines the staking Msg service. -service Msg { - // CreateValidator defines a method for creating a new validator. - rpc CreateValidator(MsgCreateValidator) returns (MsgCreateValidatorResponse); - - // EditValidator defines a method for editing an existing validator. - rpc EditValidator(MsgEditValidator) returns (MsgEditValidatorResponse); - - // Delegate defines a method for performing a delegation of coins - // from a delegator to a validator. - rpc Delegate(MsgDelegate) returns (MsgDelegateResponse); - - // BeginRedelegate defines a method for performing a redelegation - // of coins from a delegator and source validator to a destination validator. - rpc BeginRedelegate(MsgBeginRedelegate) returns (MsgBeginRedelegateResponse); - - // Undelegate defines a method for performing an undelegation from a - // delegate and a validator. - rpc Undelegate(MsgUndelegate) returns (MsgUndelegateResponse); -} - -// MsgCreateValidator defines a SDK message for creating a new validator. -message MsgCreateValidator { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - Description description = 1 [(gogoproto.nullable) = false]; - CommissionRates commission = 2 [(gogoproto.nullable) = false]; - string min_self_delegation = 3 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.moretags) = "yaml:\"min_self_delegation\"", - (gogoproto.nullable) = false - ]; - string delegator_address = 4 [(gogoproto.moretags) = "yaml:\"delegator_address\""]; - string validator_address = 5 [(gogoproto.moretags) = "yaml:\"validator_address\""]; - google.protobuf.Any pubkey = 6 [(cosmos_proto.accepts_interface) = "cosmos.crypto.PubKey"]; - cosmos.base.v1beta1.Coin value = 7 [(gogoproto.nullable) = false]; -} - -// MsgCreateValidatorResponse defines the Msg/CreateValidator response type. -message MsgCreateValidatorResponse {} - -// MsgEditValidator defines a SDK message for editing an existing validator. -message MsgEditValidator { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - Description description = 1 [(gogoproto.nullable) = false]; - string validator_address = 2 [(gogoproto.moretags) = "yaml:\"address\""]; - - // We pass a reference to the new commission rate and min self delegation as - // it's not mandatory to update. If not updated, the deserialized rate will be - // zero with no way to distinguish if an update was intended. - // REF: #2373 - string commission_rate = 3 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.moretags) = "yaml:\"commission_rate\"" - ]; - string min_self_delegation = 4 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.moretags) = "yaml:\"min_self_delegation\"" - ]; -} - -// MsgEditValidatorResponse defines the Msg/EditValidator response type. -message MsgEditValidatorResponse {} - -// MsgDelegate defines a SDK message for performing a delegation of coins -// from a delegator to a validator. -message MsgDelegate { - option (gogoproto.equal) = false; - - string delegator_address = 1 [(gogoproto.moretags) = "yaml:\"delegator_address\""]; - string validator_address = 2 [(gogoproto.moretags) = "yaml:\"validator_address\""]; - cosmos.base.v1beta1.Coin amount = 3 [(gogoproto.nullable) = false]; -} - -// MsgDelegateResponse defines the Msg/Delegate response type. -message MsgDelegateResponse {} - -// MsgBeginRedelegate defines a SDK message for performing a redelegation -// of coins from a delegator and source validator to a destination validator. -message MsgBeginRedelegate { - option (gogoproto.equal) = false; - - string delegator_address = 1 [(gogoproto.moretags) = "yaml:\"delegator_address\""]; - string validator_src_address = 2 [(gogoproto.moretags) = "yaml:\"validator_src_address\""]; - string validator_dst_address = 3 [(gogoproto.moretags) = "yaml:\"validator_dst_address\""]; - cosmos.base.v1beta1.Coin amount = 4 [(gogoproto.nullable) = false]; -} - -// MsgBeginRedelegateResponse defines the Msg/BeginRedelegate response type. -message MsgBeginRedelegateResponse { - google.protobuf.Timestamp completion_time = 1 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; -} - -// MsgUndelegate defines a SDK message for performing an undelegation from a -// delegate and a validator. -message MsgUndelegate { - option (gogoproto.equal) = false; - - string delegator_address = 1 [(gogoproto.moretags) = "yaml:\"delegator_address\""]; - string validator_address = 2 [(gogoproto.moretags) = "yaml:\"validator_address\""]; - cosmos.base.v1beta1.Coin amount = 3 [(gogoproto.nullable) = false]; -} - -// MsgUndelegateResponse defines the Msg/Undelegate response type. -message MsgUndelegateResponse { - google.protobuf.Timestamp completion_time = 1 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; -} diff --git a/ampd/proto/third_party/cosmos/tx/signing/v1beta1/signing.proto b/ampd/proto/third_party/cosmos/tx/signing/v1beta1/signing.proto deleted file mode 100644 index 50de89c8f..000000000 --- a/ampd/proto/third_party/cosmos/tx/signing/v1beta1/signing.proto +++ /dev/null @@ -1,91 +0,0 @@ -syntax = "proto3"; -package cosmos.tx.signing.v1beta1; - -import "cosmos/crypto/multisig/v1beta1/multisig.proto"; -import "google/protobuf/any.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/types/tx/signing"; - -// SignMode represents a signing mode with its own security guarantees. -enum SignMode { - // SIGN_MODE_UNSPECIFIED specifies an unknown signing mode and will be - // rejected - SIGN_MODE_UNSPECIFIED = 0; - - // SIGN_MODE_DIRECT specifies a signing mode which uses SignDoc and is - // verified with raw bytes from Tx - SIGN_MODE_DIRECT = 1; - - // SIGN_MODE_TEXTUAL is a future signing mode that will verify some - // human-readable textual representation on top of the binary representation - // from SIGN_MODE_DIRECT - SIGN_MODE_TEXTUAL = 2; - - // SIGN_MODE_LEGACY_AMINO_JSON is a backwards compatibility mode which uses - // Amino JSON and will be removed in the future - SIGN_MODE_LEGACY_AMINO_JSON = 127; - - // SIGN_MODE_EIP_191 specifies the sign mode for EIP 191 signing on the Cosmos - // SDK. Ref: https://eips.ethereum.org/EIPS/eip-191 - // - // Currently, SIGN_MODE_EIP_191 is registered as a SignMode enum variant, - // but is not implemented on the SDK by default. To enable EIP-191, you need - // to pass a custom `TxConfig` that has an implementation of - // `SignModeHandler` for EIP-191. The SDK may decide to fully support - // EIP-191 in the future. - // - // Since: cosmos-sdk 0.45.2 - SIGN_MODE_EIP_191 = 191; -} - -// SignatureDescriptors wraps multiple SignatureDescriptor's. -message SignatureDescriptors { - // signatures are the signature descriptors - repeated SignatureDescriptor signatures = 1; -} - -// SignatureDescriptor is a convenience type which represents the full data for -// a signature including the public key of the signer, signing modes and the -// signature itself. It is primarily used for coordinating signatures between -// clients. -message SignatureDescriptor { - // public_key is the public key of the signer - google.protobuf.Any public_key = 1; - - Data data = 2; - - // sequence is the sequence of the account, which describes the - // number of committed transactions signed by a given address. It is used to prevent - // replay attacks. - uint64 sequence = 3; - - // Data represents signature data - message Data { - // sum is the oneof that specifies whether this represents single or multi-signature data - oneof sum { - // single represents a single signer - Single single = 1; - - // multi represents a multisig signer - Multi multi = 2; - } - - // Single is the signature data for a single signer - message Single { - // mode is the signing mode of the single signer - SignMode mode = 1; - - // signature is the raw signature bytes - bytes signature = 2; - } - - // Multi is the signature data for a multisig public key - message Multi { - // bitarray specifies which keys within the multisig are signing - cosmos.crypto.multisig.v1beta1.CompactBitArray bitarray = 1; - - // signatures is the signatures of the multi-signature - repeated Data signatures = 2; - } - } -} diff --git a/ampd/proto/third_party/cosmos/tx/v1beta1/service.proto b/ampd/proto/third_party/cosmos/tx/v1beta1/service.proto deleted file mode 100644 index d9f828f76..000000000 --- a/ampd/proto/third_party/cosmos/tx/v1beta1/service.proto +++ /dev/null @@ -1,165 +0,0 @@ -syntax = "proto3"; -package cosmos.tx.v1beta1; - -import "google/api/annotations.proto"; -import "cosmos/base/abci/v1beta1/abci.proto"; -import "cosmos/tx/v1beta1/tx.proto"; -import "gogoproto/gogo.proto"; -import "cosmos/base/query/v1beta1/pagination.proto"; -import "tendermint/types/block.proto"; -import "tendermint/types/types.proto"; - -option (gogoproto.goproto_registration) = true; -option go_package = "github.com/cosmos/cosmos-sdk/types/tx"; - -// Service defines a gRPC service for interacting with transactions. -service Service { - // Simulate simulates executing a transaction for estimating gas usage. - rpc Simulate(SimulateRequest) returns (SimulateResponse) { - option (google.api.http) = { - post: "/cosmos/tx/v1beta1/simulate" - body: "*" - }; - } - // GetTx fetches a tx by hash. - rpc GetTx(GetTxRequest) returns (GetTxResponse) { - option (google.api.http).get = "/cosmos/tx/v1beta1/txs/{hash}"; - } - // BroadcastTx broadcast transaction. - rpc BroadcastTx(BroadcastTxRequest) returns (BroadcastTxResponse) { - option (google.api.http) = { - post: "/cosmos/tx/v1beta1/txs" - body: "*" - }; - } - // GetTxsEvent fetches txs by event. - rpc GetTxsEvent(GetTxsEventRequest) returns (GetTxsEventResponse) { - option (google.api.http).get = "/cosmos/tx/v1beta1/txs"; - } - // GetBlockWithTxs fetches a block with decoded txs. - // - // Since: cosmos-sdk 0.45.2 - rpc GetBlockWithTxs(GetBlockWithTxsRequest) returns (GetBlockWithTxsResponse) { - option (google.api.http).get = "/cosmos/tx/v1beta1/txs/block/{height}"; - } -} - -// GetTxsEventRequest is the request type for the Service.TxsByEvents -// RPC method. -message GetTxsEventRequest { - // events is the list of transaction event type. - repeated string events = 1; - // pagination defines a pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 2; - OrderBy order_by = 3; -} - -// OrderBy defines the sorting order -enum OrderBy { - // ORDER_BY_UNSPECIFIED specifies an unknown sorting order. OrderBy defaults to ASC in this case. - ORDER_BY_UNSPECIFIED = 0; - // ORDER_BY_ASC defines ascending order - ORDER_BY_ASC = 1; - // ORDER_BY_DESC defines descending order - ORDER_BY_DESC = 2; -} - -// GetTxsEventResponse is the response type for the Service.TxsByEvents -// RPC method. -message GetTxsEventResponse { - // txs is the list of queried transactions. - repeated cosmos.tx.v1beta1.Tx txs = 1; - // tx_responses is the list of queried TxResponses. - repeated cosmos.base.abci.v1beta1.TxResponse tx_responses = 2; - // pagination defines a pagination for the response. - cosmos.base.query.v1beta1.PageResponse pagination = 3; -} - -// BroadcastTxRequest is the request type for the Service.BroadcastTxRequest -// RPC method. -message BroadcastTxRequest { - // tx_bytes is the raw transaction. - bytes tx_bytes = 1; - BroadcastMode mode = 2; -} - -// BroadcastMode specifies the broadcast mode for the TxService.Broadcast RPC method. -enum BroadcastMode { - // zero-value for mode ordering - BROADCAST_MODE_UNSPECIFIED = 0; - // BROADCAST_MODE_BLOCK defines a tx broadcasting mode where the client waits for - // the tx to be committed in a block. - BROADCAST_MODE_BLOCK = 1; - // BROADCAST_MODE_SYNC defines a tx broadcasting mode where the client waits for - // a CheckTx execution response only. - BROADCAST_MODE_SYNC = 2; - // BROADCAST_MODE_ASYNC defines a tx broadcasting mode where the client returns - // immediately. - BROADCAST_MODE_ASYNC = 3; -} - -// BroadcastTxResponse is the response type for the -// Service.BroadcastTx method. -message BroadcastTxResponse { - // tx_response is the queried TxResponses. - cosmos.base.abci.v1beta1.TxResponse tx_response = 1; -} - -// SimulateRequest is the request type for the Service.Simulate -// RPC method. -message SimulateRequest { - // tx is the transaction to simulate. - // Deprecated. Send raw tx bytes instead. - cosmos.tx.v1beta1.Tx tx = 1 [deprecated = true]; - // tx_bytes is the raw transaction. - // - // Since: cosmos-sdk 0.43 - bytes tx_bytes = 2; -} - -// SimulateResponse is the response type for the -// Service.SimulateRPC method. -message SimulateResponse { - // gas_info is the information about gas used in the simulation. - cosmos.base.abci.v1beta1.GasInfo gas_info = 1; - // result is the result of the simulation. - cosmos.base.abci.v1beta1.Result result = 2; -} - -// GetTxRequest is the request type for the Service.GetTx -// RPC method. -message GetTxRequest { - // hash is the tx hash to query, encoded as a hex string. - string hash = 1; -} - -// GetTxResponse is the response type for the Service.GetTx method. -message GetTxResponse { - // tx is the queried transaction. - cosmos.tx.v1beta1.Tx tx = 1; - // tx_response is the queried TxResponses. - cosmos.base.abci.v1beta1.TxResponse tx_response = 2; -} - -// GetBlockWithTxsRequest is the request type for the Service.GetBlockWithTxs -// RPC method. -// -// Since: cosmos-sdk 0.45.2 -message GetBlockWithTxsRequest { - // height is the height of the block to query. - int64 height = 1; - // pagination defines a pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 2; -} - -// GetBlockWithTxsResponse is the response type for the Service.GetBlockWithTxs method. -// -// Since: cosmos-sdk 0.45.2 -message GetBlockWithTxsResponse { - // txs are the transactions in the block. - repeated cosmos.tx.v1beta1.Tx txs = 1; - .tendermint.types.BlockID block_id = 2; - .tendermint.types.Block block = 3; - // pagination defines a pagination for the response. - cosmos.base.query.v1beta1.PageResponse pagination = 4; -} \ No newline at end of file diff --git a/ampd/proto/third_party/cosmos/tx/v1beta1/tx.proto b/ampd/proto/third_party/cosmos/tx/v1beta1/tx.proto deleted file mode 100644 index 6d5caf12c..000000000 --- a/ampd/proto/third_party/cosmos/tx/v1beta1/tx.proto +++ /dev/null @@ -1,183 +0,0 @@ -syntax = "proto3"; -package cosmos.tx.v1beta1; - -import "gogoproto/gogo.proto"; -import "cosmos/crypto/multisig/v1beta1/multisig.proto"; -import "cosmos/base/v1beta1/coin.proto"; -import "cosmos/tx/signing/v1beta1/signing.proto"; -import "google/protobuf/any.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/types/tx"; - -// Tx is the standard type used for broadcasting transactions. -message Tx { - // body is the processable content of the transaction - TxBody body = 1; - - // auth_info is the authorization related content of the transaction, - // specifically signers, signer modes and fee - AuthInfo auth_info = 2; - - // signatures is a list of signatures that matches the length and order of - // AuthInfo's signer_infos to allow connecting signature meta information like - // public key and signing mode by position. - repeated bytes signatures = 3; -} - -// TxRaw is a variant of Tx that pins the signer's exact binary representation -// of body and auth_info. This is used for signing, broadcasting and -// verification. The binary `serialize(tx: TxRaw)` is stored in Tendermint and -// the hash `sha256(serialize(tx: TxRaw))` becomes the "txhash", commonly used -// as the transaction ID. -message TxRaw { - // body_bytes is a protobuf serialization of a TxBody that matches the - // representation in SignDoc. - bytes body_bytes = 1; - - // auth_info_bytes is a protobuf serialization of an AuthInfo that matches the - // representation in SignDoc. - bytes auth_info_bytes = 2; - - // signatures is a list of signatures that matches the length and order of - // AuthInfo's signer_infos to allow connecting signature meta information like - // public key and signing mode by position. - repeated bytes signatures = 3; -} - -// SignDoc is the type used for generating sign bytes for SIGN_MODE_DIRECT. -message SignDoc { - // body_bytes is protobuf serialization of a TxBody that matches the - // representation in TxRaw. - bytes body_bytes = 1; - - // auth_info_bytes is a protobuf serialization of an AuthInfo that matches the - // representation in TxRaw. - bytes auth_info_bytes = 2; - - // chain_id is the unique identifier of the chain this transaction targets. - // It prevents signed transactions from being used on another chain by an - // attacker - string chain_id = 3; - - // account_number is the account number of the account in state - uint64 account_number = 4; -} - -// TxBody is the body of a transaction that all signers sign over. -message TxBody { - // messages is a list of messages to be executed. The required signers of - // those messages define the number and order of elements in AuthInfo's - // signer_infos and Tx's signatures. Each required signer address is added to - // the list only the first time it occurs. - // By convention, the first required signer (usually from the first message) - // is referred to as the primary signer and pays the fee for the whole - // transaction. - repeated google.protobuf.Any messages = 1; - - // memo is any arbitrary note/comment to be added to the transaction. - // WARNING: in clients, any publicly exposed text should not be called memo, - // but should be called `note` instead (see https://github.com/cosmos/cosmos-sdk/issues/9122). - string memo = 2; - - // timeout is the block height after which this transaction will not - // be processed by the chain - uint64 timeout_height = 3; - - // extension_options are arbitrary options that can be added by chains - // when the default options are not sufficient. If any of these are present - // and can't be handled, the transaction will be rejected - repeated google.protobuf.Any extension_options = 1023; - - // extension_options are arbitrary options that can be added by chains - // when the default options are not sufficient. If any of these are present - // and can't be handled, they will be ignored - repeated google.protobuf.Any non_critical_extension_options = 2047; -} - -// AuthInfo describes the fee and signer modes that are used to sign a -// transaction. -message AuthInfo { - // signer_infos defines the signing modes for the required signers. The number - // and order of elements must match the required signers from TxBody's - // messages. The first element is the primary signer and the one which pays - // the fee. - repeated SignerInfo signer_infos = 1; - - // Fee is the fee and gas limit for the transaction. The first signer is the - // primary signer and the one which pays the fee. The fee can be calculated - // based on the cost of evaluating the body and doing signature verification - // of the signers. This can be estimated via simulation. - Fee fee = 2; -} - -// SignerInfo describes the public key and signing mode of a single top-level -// signer. -message SignerInfo { - // public_key is the public key of the signer. It is optional for accounts - // that already exist in state. If unset, the verifier can use the required \ - // signer address for this position and lookup the public key. - google.protobuf.Any public_key = 1; - - // mode_info describes the signing mode of the signer and is a nested - // structure to support nested multisig pubkey's - ModeInfo mode_info = 2; - - // sequence is the sequence of the account, which describes the - // number of committed transactions signed by a given address. It is used to - // prevent replay attacks. - uint64 sequence = 3; -} - -// ModeInfo describes the signing mode of a single or nested multisig signer. -message ModeInfo { - // sum is the oneof that specifies whether this represents a single or nested - // multisig signer - oneof sum { - // single represents a single signer - Single single = 1; - - // multi represents a nested multisig signer - Multi multi = 2; - } - - // Single is the mode info for a single signer. It is structured as a message - // to allow for additional fields such as locale for SIGN_MODE_TEXTUAL in the - // future - message Single { - // mode is the signing mode of the single signer - cosmos.tx.signing.v1beta1.SignMode mode = 1; - } - - // Multi is the mode info for a multisig public key - message Multi { - // bitarray specifies which keys within the multisig are signing - cosmos.crypto.multisig.v1beta1.CompactBitArray bitarray = 1; - - // mode_infos is the corresponding modes of the signers of the multisig - // which could include nested multisig public keys - repeated ModeInfo mode_infos = 2; - } -} - -// Fee includes the amount of coins paid in fees and the maximum -// gas to be used by the transaction. The ratio yields an effective "gasprice", -// which must be above some miminum to be accepted into the mempool. -message Fee { - // amount is the amount of coins to be paid as a fee - repeated cosmos.base.v1beta1.Coin amount = 1 - [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; - - // gas_limit is the maximum gas that can be used in transaction processing - // before an out of gas error occurs - uint64 gas_limit = 2; - - // if unset, the first signer is responsible for paying the fees. If set, the specified account must pay the fees. - // the payer must be a tx signer (and thus have signed this field in AuthInfo). - // setting this field does *not* change the ordering of required signers for the transaction. - string payer = 3; - - // if set, the fee payer (either the first signer or the value of the payer field) requests that a fee grant be used - // to pay fees instead of the fee payer's own balance. If an appropriate fee grant does not exist or the chain does - // not support fee grants, this will fail - string granter = 4; -} diff --git a/ampd/proto/third_party/cosmos/upgrade/v1beta1/query.proto b/ampd/proto/third_party/cosmos/upgrade/v1beta1/query.proto deleted file mode 100644 index dd14ba640..000000000 --- a/ampd/proto/third_party/cosmos/upgrade/v1beta1/query.proto +++ /dev/null @@ -1,104 +0,0 @@ -syntax = "proto3"; -package cosmos.upgrade.v1beta1; - -import "google/protobuf/any.proto"; -import "google/api/annotations.proto"; -import "cosmos/upgrade/v1beta1/upgrade.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/upgrade/types"; - -// Query defines the gRPC upgrade querier service. -service Query { - // CurrentPlan queries the current upgrade plan. - rpc CurrentPlan(QueryCurrentPlanRequest) returns (QueryCurrentPlanResponse) { - option (google.api.http).get = "/cosmos/upgrade/v1beta1/current_plan"; - } - - // AppliedPlan queries a previously applied upgrade plan by its name. - rpc AppliedPlan(QueryAppliedPlanRequest) returns (QueryAppliedPlanResponse) { - option (google.api.http).get = "/cosmos/upgrade/v1beta1/applied_plan/{name}"; - } - - // UpgradedConsensusState queries the consensus state that will serve - // as a trusted kernel for the next version of this chain. It will only be - // stored at the last height of this chain. - // UpgradedConsensusState RPC not supported with legacy querier - // This rpc is deprecated now that IBC has its own replacement - // (https://github.com/cosmos/ibc-go/blob/2c880a22e9f9cc75f62b527ca94aa75ce1106001/proto/ibc/core/client/v1/query.proto#L54) - rpc UpgradedConsensusState(QueryUpgradedConsensusStateRequest) returns (QueryUpgradedConsensusStateResponse) { - option deprecated = true; - option (google.api.http).get = "/cosmos/upgrade/v1beta1/upgraded_consensus_state/{last_height}"; - } - - // ModuleVersions queries the list of module versions from state. - // - // Since: cosmos-sdk 0.43 - rpc ModuleVersions(QueryModuleVersionsRequest) returns (QueryModuleVersionsResponse) { - option (google.api.http).get = "/cosmos/upgrade/v1beta1/module_versions"; - } -} - -// QueryCurrentPlanRequest is the request type for the Query/CurrentPlan RPC -// method. -message QueryCurrentPlanRequest {} - -// QueryCurrentPlanResponse is the response type for the Query/CurrentPlan RPC -// method. -message QueryCurrentPlanResponse { - // plan is the current upgrade plan. - Plan plan = 1; -} - -// QueryCurrentPlanRequest is the request type for the Query/AppliedPlan RPC -// method. -message QueryAppliedPlanRequest { - // name is the name of the applied plan to query for. - string name = 1; -} - -// QueryAppliedPlanResponse is the response type for the Query/AppliedPlan RPC -// method. -message QueryAppliedPlanResponse { - // height is the block height at which the plan was applied. - int64 height = 1; -} - -// QueryUpgradedConsensusStateRequest is the request type for the Query/UpgradedConsensusState -// RPC method. -message QueryUpgradedConsensusStateRequest { - option deprecated = true; - - // last height of the current chain must be sent in request - // as this is the height under which next consensus state is stored - int64 last_height = 1; -} - -// QueryUpgradedConsensusStateResponse is the response type for the Query/UpgradedConsensusState -// RPC method. -message QueryUpgradedConsensusStateResponse { - option deprecated = true; - reserved 1; - - // Since: cosmos-sdk 0.43 - bytes upgraded_consensus_state = 2; -} - -// QueryModuleVersionsRequest is the request type for the Query/ModuleVersions -// RPC method. -// -// Since: cosmos-sdk 0.43 -message QueryModuleVersionsRequest { - // module_name is a field to query a specific module - // consensus version from state. Leaving this empty will - // fetch the full list of module versions from state - string module_name = 1; -} - -// QueryModuleVersionsResponse is the response type for the Query/ModuleVersions -// RPC method. -// -// Since: cosmos-sdk 0.43 -message QueryModuleVersionsResponse { - // module_versions is a list of module names with their consensus versions. - repeated ModuleVersion module_versions = 1; -} diff --git a/ampd/proto/third_party/cosmos/upgrade/v1beta1/upgrade.proto b/ampd/proto/third_party/cosmos/upgrade/v1beta1/upgrade.proto deleted file mode 100644 index e888b393d..000000000 --- a/ampd/proto/third_party/cosmos/upgrade/v1beta1/upgrade.proto +++ /dev/null @@ -1,78 +0,0 @@ -syntax = "proto3"; -package cosmos.upgrade.v1beta1; - -import "google/protobuf/any.proto"; -import "gogoproto/gogo.proto"; -import "google/protobuf/timestamp.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/upgrade/types"; -option (gogoproto.goproto_getters_all) = false; - -// Plan specifies information about a planned upgrade and when it should occur. -message Plan { - option (gogoproto.equal) = true; - option (gogoproto.goproto_stringer) = false; - - // Sets the name for the upgrade. This name will be used by the upgraded - // version of the software to apply any special "on-upgrade" commands during - // the first BeginBlock method after the upgrade is applied. It is also used - // to detect whether a software version can handle a given upgrade. If no - // upgrade handler with this name has been set in the software, it will be - // assumed that the software is out-of-date when the upgrade Time or Height is - // reached and the software will exit. - string name = 1; - - // Deprecated: Time based upgrades have been deprecated. Time based upgrade logic - // has been removed from the SDK. - // If this field is not empty, an error will be thrown. - google.protobuf.Timestamp time = 2 [deprecated = true, (gogoproto.stdtime) = true, (gogoproto.nullable) = false]; - - // The height at which the upgrade must be performed. - // Only used if Time is not set. - int64 height = 3; - - // Any application specific upgrade info to be included on-chain - // such as a git commit that validators could automatically upgrade to - string info = 4; - - // Deprecated: UpgradedClientState field has been deprecated. IBC upgrade logic has been - // moved to the IBC module in the sub module 02-client. - // If this field is not empty, an error will be thrown. - google.protobuf.Any upgraded_client_state = 5 - [deprecated = true, (gogoproto.moretags) = "yaml:\"upgraded_client_state\""]; -} - -// SoftwareUpgradeProposal is a gov Content type for initiating a software -// upgrade. -message SoftwareUpgradeProposal { - option (gogoproto.equal) = true; - option (gogoproto.goproto_stringer) = false; - - string title = 1; - string description = 2; - Plan plan = 3 [(gogoproto.nullable) = false]; -} - -// CancelSoftwareUpgradeProposal is a gov Content type for cancelling a software -// upgrade. -message CancelSoftwareUpgradeProposal { - option (gogoproto.equal) = true; - option (gogoproto.goproto_stringer) = false; - - string title = 1; - string description = 2; -} - -// ModuleVersion specifies a module and its consensus version. -// -// Since: cosmos-sdk 0.43 -message ModuleVersion { - option (gogoproto.equal) = true; - option (gogoproto.goproto_stringer) = true; - - // name of the app module - string name = 1; - - // consensus version of the app module - uint64 version = 2; -} diff --git a/ampd/proto/third_party/cosmos/vesting/v1beta1/tx.proto b/ampd/proto/third_party/cosmos/vesting/v1beta1/tx.proto deleted file mode 100644 index c49be802a..000000000 --- a/ampd/proto/third_party/cosmos/vesting/v1beta1/tx.proto +++ /dev/null @@ -1,31 +0,0 @@ -syntax = "proto3"; -package cosmos.vesting.v1beta1; - -import "gogoproto/gogo.proto"; -import "cosmos/base/v1beta1/coin.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/auth/vesting/types"; - -// Msg defines the bank Msg service. -service Msg { - // CreateVestingAccount defines a method that enables creating a vesting - // account. - rpc CreateVestingAccount(MsgCreateVestingAccount) returns (MsgCreateVestingAccountResponse); -} - -// MsgCreateVestingAccount defines a message that enables creating a vesting -// account. -message MsgCreateVestingAccount { - option (gogoproto.equal) = true; - - string from_address = 1 [(gogoproto.moretags) = "yaml:\"from_address\""]; - string to_address = 2 [(gogoproto.moretags) = "yaml:\"to_address\""]; - repeated cosmos.base.v1beta1.Coin amount = 3 - [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; - - int64 end_time = 4 [(gogoproto.moretags) = "yaml:\"end_time\""]; - bool delayed = 5; -} - -// MsgCreateVestingAccountResponse defines the Msg/CreateVestingAccount response type. -message MsgCreateVestingAccountResponse {} \ No newline at end of file diff --git a/ampd/proto/third_party/cosmos/vesting/v1beta1/vesting.proto b/ampd/proto/third_party/cosmos/vesting/v1beta1/vesting.proto deleted file mode 100644 index e9f661f93..000000000 --- a/ampd/proto/third_party/cosmos/vesting/v1beta1/vesting.proto +++ /dev/null @@ -1,85 +0,0 @@ -syntax = "proto3"; -package cosmos.vesting.v1beta1; - -import "gogoproto/gogo.proto"; -import "cosmos/base/v1beta1/coin.proto"; -import "cosmos/auth/v1beta1/auth.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/auth/vesting/types"; - -// BaseVestingAccount implements the VestingAccount interface. It contains all -// the necessary fields needed for any vesting account implementation. -message BaseVestingAccount { - option (gogoproto.goproto_getters) = false; - option (gogoproto.goproto_stringer) = false; - - cosmos.auth.v1beta1.BaseAccount base_account = 1 [(gogoproto.embed) = true]; - repeated cosmos.base.v1beta1.Coin original_vesting = 2 [ - (gogoproto.nullable) = false, - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", - (gogoproto.moretags) = "yaml:\"original_vesting\"" - ]; - repeated cosmos.base.v1beta1.Coin delegated_free = 3 [ - (gogoproto.nullable) = false, - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", - (gogoproto.moretags) = "yaml:\"delegated_free\"" - ]; - repeated cosmos.base.v1beta1.Coin delegated_vesting = 4 [ - (gogoproto.nullable) = false, - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", - (gogoproto.moretags) = "yaml:\"delegated_vesting\"" - ]; - int64 end_time = 5 [(gogoproto.moretags) = "yaml:\"end_time\""]; -} - -// ContinuousVestingAccount implements the VestingAccount interface. It -// continuously vests by unlocking coins linearly with respect to time. -message ContinuousVestingAccount { - option (gogoproto.goproto_getters) = false; - option (gogoproto.goproto_stringer) = false; - - BaseVestingAccount base_vesting_account = 1 [(gogoproto.embed) = true]; - int64 start_time = 2 [(gogoproto.moretags) = "yaml:\"start_time\""]; -} - -// DelayedVestingAccount implements the VestingAccount interface. It vests all -// coins after a specific time, but non prior. In other words, it keeps them -// locked until a specified time. -message DelayedVestingAccount { - option (gogoproto.goproto_getters) = false; - option (gogoproto.goproto_stringer) = false; - - BaseVestingAccount base_vesting_account = 1 [(gogoproto.embed) = true]; -} - -// Period defines a length of time and amount of coins that will vest. -message Period { - option (gogoproto.goproto_stringer) = false; - - int64 length = 1; - repeated cosmos.base.v1beta1.Coin amount = 2 - [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; -} - -// PeriodicVestingAccount implements the VestingAccount interface. It -// periodically vests by unlocking coins during each specified period. -message PeriodicVestingAccount { - option (gogoproto.goproto_getters) = false; - option (gogoproto.goproto_stringer) = false; - - BaseVestingAccount base_vesting_account = 1 [(gogoproto.embed) = true]; - int64 start_time = 2 [(gogoproto.moretags) = "yaml:\"start_time\""]; - repeated Period vesting_periods = 3 [(gogoproto.moretags) = "yaml:\"vesting_periods\"", (gogoproto.nullable) = false]; -} - -// PermanentLockedAccount implements the VestingAccount interface. It does -// not ever release coins, locking them indefinitely. Coins in this account can -// still be used for delegating and for governance votes even while locked. -// -// Since: cosmos-sdk 0.43 -message PermanentLockedAccount { - option (gogoproto.goproto_getters) = false; - option (gogoproto.goproto_stringer) = false; - - BaseVestingAccount base_vesting_account = 1 [(gogoproto.embed) = true]; -} diff --git a/ampd/proto/third_party/cosmos_proto/cosmos.proto b/ampd/proto/third_party/cosmos_proto/cosmos.proto deleted file mode 100644 index 167b17075..000000000 --- a/ampd/proto/third_party/cosmos_proto/cosmos.proto +++ /dev/null @@ -1,16 +0,0 @@ -syntax = "proto3"; -package cosmos_proto; - -import "google/protobuf/descriptor.proto"; - -option go_package = "github.com/regen-network/cosmos-proto"; - -extend google.protobuf.MessageOptions { - string interface_type = 93001; - - string implements_interface = 93002; -} - -extend google.protobuf.FieldOptions { - string accepts_interface = 93001; -} diff --git a/ampd/proto/third_party/cosmwasm/wasm/v1/authz.proto b/ampd/proto/third_party/cosmwasm/wasm/v1/authz.proto deleted file mode 100644 index 97a82275d..000000000 --- a/ampd/proto/third_party/cosmwasm/wasm/v1/authz.proto +++ /dev/null @@ -1,118 +0,0 @@ -syntax = "proto3"; -package cosmwasm.wasm.v1; - -import "gogoproto/gogo.proto"; -import "cosmos_proto/cosmos.proto"; -import "cosmos/base/v1beta1/coin.proto"; -import "google/protobuf/any.proto"; - -option go_package = "github.com/CosmWasm/wasmd/x/wasm/types"; -option (gogoproto.goproto_getters_all) = false; - -// ContractExecutionAuthorization defines authorization for wasm execute. -// Since: wasmd 0.30 -message ContractExecutionAuthorization { - option (cosmos_proto.implements_interface) = - "cosmos.authz.v1beta1.Authorization"; - - // Grants for contract executions - repeated ContractGrant grants = 1 [ (gogoproto.nullable) = false ]; -} - -// ContractMigrationAuthorization defines authorization for wasm contract -// migration. Since: wasmd 0.30 -message ContractMigrationAuthorization { - option (cosmos_proto.implements_interface) = - "cosmos.authz.v1beta1.Authorization"; - - // Grants for contract migrations - repeated ContractGrant grants = 1 [ (gogoproto.nullable) = false ]; -} - -// ContractGrant a granted permission for a single contract -// Since: wasmd 0.30 -message ContractGrant { - // Contract is the bech32 address of the smart contract - string contract = 1; - - // Limit defines execution limits that are enforced and updated when the grant - // is applied. When the limit lapsed the grant is removed. - google.protobuf.Any limit = 2 [ (cosmos_proto.accepts_interface) = - "cosmwasm.wasm.v1.ContractAuthzLimitX" ]; - - // Filter define more fine-grained control on the message payload passed - // to the contract in the operation. When no filter applies on execution, the - // operation is prohibited. - google.protobuf.Any filter = 3 - [ (cosmos_proto.accepts_interface) = - "cosmwasm.wasm.v1.ContractAuthzFilterX" ]; -} - -// MaxCallsLimit limited number of calls to the contract. No funds transferable. -// Since: wasmd 0.30 -message MaxCallsLimit { - option (cosmos_proto.implements_interface) = - "cosmwasm.wasm.v1.ContractAuthzLimitX"; - - // Remaining number that is decremented on each execution - uint64 remaining = 1; -} - -// MaxFundsLimit defines the maximal amounts that can be sent to the contract. -// Since: wasmd 0.30 -message MaxFundsLimit { - option (cosmos_proto.implements_interface) = - "cosmwasm.wasm.v1.ContractAuthzLimitX"; - - // Amounts is the maximal amount of tokens transferable to the contract. - repeated cosmos.base.v1beta1.Coin amounts = 1 [ - (gogoproto.nullable) = false, - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" - ]; -} - -// CombinedLimit defines the maximal amounts that can be sent to a contract and -// the maximal number of calls executable. Both need to remain >0 to be valid. -// Since: wasmd 0.30 -message CombinedLimit { - option (cosmos_proto.implements_interface) = - "cosmwasm.wasm.v1.ContractAuthzLimitX"; - - // Remaining number that is decremented on each execution - uint64 calls_remaining = 1; - // Amounts is the maximal amount of tokens transferable to the contract. - repeated cosmos.base.v1beta1.Coin amounts = 2 [ - (gogoproto.nullable) = false, - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" - ]; -} - -// AllowAllMessagesFilter is a wildcard to allow any type of contract payload -// message. -// Since: wasmd 0.30 -message AllowAllMessagesFilter { - option (cosmos_proto.implements_interface) = - "cosmwasm.wasm.v1.ContractAuthzFilterX"; -} - -// AcceptedMessageKeysFilter accept only the specific contract message keys in -// the json object to be executed. -// Since: wasmd 0.30 -message AcceptedMessageKeysFilter { - option (cosmos_proto.implements_interface) = - "cosmwasm.wasm.v1.ContractAuthzFilterX"; - - // Messages is the list of unique keys - repeated string keys = 1; -} - -// AcceptedMessagesFilter accept only the specific raw contract messages to be -// executed. -// Since: wasmd 0.30 -message AcceptedMessagesFilter { - option (cosmos_proto.implements_interface) = - "cosmwasm.wasm.v1.ContractAuthzFilterX"; - - // Messages is the list of raw contract messages - repeated bytes messages = 1 [ (gogoproto.casttype) = "RawContractMessage" ]; -} diff --git a/ampd/proto/third_party/cosmwasm/wasm/v1/genesis.proto b/ampd/proto/third_party/cosmwasm/wasm/v1/genesis.proto deleted file mode 100644 index 4e728ff4b..000000000 --- a/ampd/proto/third_party/cosmwasm/wasm/v1/genesis.proto +++ /dev/null @@ -1,46 +0,0 @@ -syntax = "proto3"; -package cosmwasm.wasm.v1; - -import "gogoproto/gogo.proto"; -import "cosmwasm/wasm/v1/types.proto"; - -option go_package = "github.com/CosmWasm/wasmd/x/wasm/types"; - -// GenesisState - genesis state of x/wasm -message GenesisState { - Params params = 1 [ (gogoproto.nullable) = false ]; - repeated Code codes = 2 - [ (gogoproto.nullable) = false, (gogoproto.jsontag) = "codes,omitempty" ]; - repeated Contract contracts = 3 [ - (gogoproto.nullable) = false, - (gogoproto.jsontag) = "contracts,omitempty" - ]; - repeated Sequence sequences = 4 [ - (gogoproto.nullable) = false, - (gogoproto.jsontag) = "sequences,omitempty" - ]; -} - -// Code struct encompasses CodeInfo and CodeBytes -message Code { - uint64 code_id = 1 [ (gogoproto.customname) = "CodeID" ]; - CodeInfo code_info = 2 [ (gogoproto.nullable) = false ]; - bytes code_bytes = 3; - // Pinned to wasmvm cache - bool pinned = 4; -} - -// Contract struct encompasses ContractAddress, ContractInfo, and ContractState -message Contract { - string contract_address = 1; - ContractInfo contract_info = 2 [ (gogoproto.nullable) = false ]; - repeated Model contract_state = 3 [ (gogoproto.nullable) = false ]; - repeated ContractCodeHistoryEntry contract_code_history = 4 - [ (gogoproto.nullable) = false ]; -} - -// Sequence key and value of an id generation counter -message Sequence { - bytes id_key = 1 [ (gogoproto.customname) = "IDKey" ]; - uint64 value = 2; -} \ No newline at end of file diff --git a/ampd/proto/third_party/cosmwasm/wasm/v1/ibc.proto b/ampd/proto/third_party/cosmwasm/wasm/v1/ibc.proto deleted file mode 100644 index feaad2936..000000000 --- a/ampd/proto/third_party/cosmwasm/wasm/v1/ibc.proto +++ /dev/null @@ -1,37 +0,0 @@ -syntax = "proto3"; -package cosmwasm.wasm.v1; - -import "gogoproto/gogo.proto"; - -option go_package = "github.com/CosmWasm/wasmd/x/wasm/types"; -option (gogoproto.goproto_getters_all) = false; - -// MsgIBCSend -message MsgIBCSend { - // the channel by which the packet will be sent - string channel = 2 [ (gogoproto.moretags) = "yaml:\"source_channel\"" ]; - - // Timeout height relative to the current block height. - // The timeout is disabled when set to 0. - uint64 timeout_height = 4 - [ (gogoproto.moretags) = "yaml:\"timeout_height\"" ]; - // Timeout timestamp (in nanoseconds) relative to the current block timestamp. - // The timeout is disabled when set to 0. - uint64 timeout_timestamp = 5 - [ (gogoproto.moretags) = "yaml:\"timeout_timestamp\"" ]; - - // Data is the payload to transfer. We must not make assumption what format or - // content is in here. - bytes data = 6; -} - -// MsgIBCSendResponse -message MsgIBCSendResponse { - // Sequence number of the IBC packet sent - uint64 sequence = 1; -} - -// MsgIBCCloseChannel port and channel need to be owned by the contract -message MsgIBCCloseChannel { - string channel = 2 [ (gogoproto.moretags) = "yaml:\"source_channel\"" ]; -} diff --git a/ampd/proto/third_party/cosmwasm/wasm/v1/proposal.proto b/ampd/proto/third_party/cosmwasm/wasm/v1/proposal.proto deleted file mode 100644 index b1c484bc9..000000000 --- a/ampd/proto/third_party/cosmwasm/wasm/v1/proposal.proto +++ /dev/null @@ -1,272 +0,0 @@ -syntax = "proto3"; -package cosmwasm.wasm.v1; - -import "gogoproto/gogo.proto"; -import "cosmos_proto/cosmos.proto"; -import "cosmos/base/v1beta1/coin.proto"; -import "cosmwasm/wasm/v1/types.proto"; - -option go_package = "github.com/CosmWasm/wasmd/x/wasm/types"; -option (gogoproto.goproto_stringer_all) = false; -option (gogoproto.goproto_getters_all) = false; -option (gogoproto.equal_all) = true; - -// StoreCodeProposal gov proposal content type to submit WASM code to the system -message StoreCodeProposal { - option (cosmos_proto.implements_interface) = "cosmos.gov.v1beta1.Content"; - - // Title is a short summary - string title = 1; - // Description is a human readable text - string description = 2; - // RunAs is the address that is passed to the contract's environment as sender - string run_as = 3; - // WASMByteCode can be raw or gzip compressed - bytes wasm_byte_code = 4 [ (gogoproto.customname) = "WASMByteCode" ]; - // Used in v1beta1 - reserved 5, 6; - // InstantiatePermission to apply on contract creation, optional - AccessConfig instantiate_permission = 7; - // UnpinCode code on upload, optional - bool unpin_code = 8; - // Source is the URL where the code is hosted - string source = 9; - // Builder is the docker image used to build the code deterministically, used - // for smart contract verification - string builder = 10; - // CodeHash is the SHA256 sum of the code outputted by builder, used for smart - // contract verification - bytes code_hash = 11; -} - -// InstantiateContractProposal gov proposal content type to instantiate a -// contract. -message InstantiateContractProposal { - option (cosmos_proto.implements_interface) = "cosmos.gov.v1beta1.Content"; - - // Title is a short summary - string title = 1; - // Description is a human readable text - string description = 2; - // RunAs is the address that is passed to the contract's environment as sender - string run_as = 3; - // Admin is an optional address that can execute migrations - string admin = 4; - // CodeID is the reference to the stored WASM code - uint64 code_id = 5 [ (gogoproto.customname) = "CodeID" ]; - // Label is optional metadata to be stored with a constract instance. - string label = 6; - // Msg json encoded message to be passed to the contract on instantiation - bytes msg = 7 [ (gogoproto.casttype) = "RawContractMessage" ]; - // Funds coins that are transferred to the contract on instantiation - repeated cosmos.base.v1beta1.Coin funds = 8 [ - (gogoproto.nullable) = false, - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" - ]; -} - -// InstantiateContract2Proposal gov proposal content type to instantiate -// contract 2 -message InstantiateContract2Proposal { - option (cosmos_proto.implements_interface) = "cosmos.gov.v1beta1.Content"; - - // Title is a short summary - string title = 1; - // Description is a human readable text - string description = 2; - // RunAs is the address that is passed to the contract's enviroment as sender - string run_as = 3; - // Admin is an optional address that can execute migrations - string admin = 4; - // CodeID is the reference to the stored WASM code - uint64 code_id = 5 [ (gogoproto.customname) = "CodeID" ]; - // Label is optional metadata to be stored with a constract instance. - string label = 6; - // Msg json encode message to be passed to the contract on instantiation - bytes msg = 7 [ (gogoproto.casttype) = "RawContractMessage" ]; - // Funds coins that are transferred to the contract on instantiation - repeated cosmos.base.v1beta1.Coin funds = 8 [ - (gogoproto.nullable) = false, - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" - ]; - // Salt is an arbitrary value provided by the sender. Size can be 1 to 64. - bytes salt = 9; - // FixMsg include the msg value into the hash for the predictable address. - // Default is false - bool fix_msg = 10; -} - -// MigrateContractProposal gov proposal content type to migrate a contract. -message MigrateContractProposal { - option (cosmos_proto.implements_interface) = "cosmos.gov.v1beta1.Content"; - - // Title is a short summary - string title = 1; - // Description is a human readable text - string description = 2; - // Note: skipping 3 as this was previously used for unneeded run_as - - // Contract is the address of the smart contract - string contract = 4; - // CodeID references the new WASM code - uint64 code_id = 5 [ (gogoproto.customname) = "CodeID" ]; - // Msg json encoded message to be passed to the contract on migration - bytes msg = 6 [ (gogoproto.casttype) = "RawContractMessage" ]; -} - -// SudoContractProposal gov proposal content type to call sudo on a contract. -message SudoContractProposal { - option (cosmos_proto.implements_interface) = "cosmos.gov.v1beta1.Content"; - - // Title is a short summary - string title = 1; - // Description is a human readable text - string description = 2; - // Contract is the address of the smart contract - string contract = 3; - // Msg json encoded message to be passed to the contract as sudo - bytes msg = 4 [ (gogoproto.casttype) = "RawContractMessage" ]; -} - -// ExecuteContractProposal gov proposal content type to call execute on a -// contract. -message ExecuteContractProposal { - option (cosmos_proto.implements_interface) = "cosmos.gov.v1beta1.Content"; - - // Title is a short summary - string title = 1; - // Description is a human readable text - string description = 2; - // RunAs is the address that is passed to the contract's environment as sender - string run_as = 3; - // Contract is the address of the smart contract - string contract = 4; - // Msg json encoded message to be passed to the contract as execute - bytes msg = 5 [ (gogoproto.casttype) = "RawContractMessage" ]; - // Funds coins that are transferred to the contract on instantiation - repeated cosmos.base.v1beta1.Coin funds = 6 [ - (gogoproto.nullable) = false, - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" - ]; -} - -// UpdateAdminProposal gov proposal content type to set an admin for a contract. -message UpdateAdminProposal { - option (cosmos_proto.implements_interface) = "cosmos.gov.v1beta1.Content"; - - // Title is a short summary - string title = 1; - // Description is a human readable text - string description = 2; - // NewAdmin address to be set - string new_admin = 3 [ (gogoproto.moretags) = "yaml:\"new_admin\"" ]; - // Contract is the address of the smart contract - string contract = 4; -} - -// ClearAdminProposal gov proposal content type to clear the admin of a -// contract. -message ClearAdminProposal { - option (cosmos_proto.implements_interface) = "cosmos.gov.v1beta1.Content"; - - // Title is a short summary - string title = 1; - // Description is a human readable text - string description = 2; - // Contract is the address of the smart contract - string contract = 3; -} - -// PinCodesProposal gov proposal content type to pin a set of code ids in the -// wasmvm cache. -message PinCodesProposal { - option (cosmos_proto.implements_interface) = "cosmos.gov.v1beta1.Content"; - - // Title is a short summary - string title = 1 [ (gogoproto.moretags) = "yaml:\"title\"" ]; - // Description is a human readable text - string description = 2 [ (gogoproto.moretags) = "yaml:\"description\"" ]; - // CodeIDs references the new WASM codes - repeated uint64 code_ids = 3 [ - (gogoproto.customname) = "CodeIDs", - (gogoproto.moretags) = "yaml:\"code_ids\"" - ]; -} - -// UnpinCodesProposal gov proposal content type to unpin a set of code ids in -// the wasmvm cache. -message UnpinCodesProposal { - option (cosmos_proto.implements_interface) = "cosmos.gov.v1beta1.Content"; - - // Title is a short summary - string title = 1 [ (gogoproto.moretags) = "yaml:\"title\"" ]; - // Description is a human readable text - string description = 2 [ (gogoproto.moretags) = "yaml:\"description\"" ]; - // CodeIDs references the WASM codes - repeated uint64 code_ids = 3 [ - (gogoproto.customname) = "CodeIDs", - (gogoproto.moretags) = "yaml:\"code_ids\"" - ]; -} - -// AccessConfigUpdate contains the code id and the access config to be -// applied. -message AccessConfigUpdate { - // CodeID is the reference to the stored WASM code to be updated - uint64 code_id = 1 [ (gogoproto.customname) = "CodeID" ]; - // InstantiatePermission to apply to the set of code ids - AccessConfig instantiate_permission = 2 [ (gogoproto.nullable) = false ]; -} - -// UpdateInstantiateConfigProposal gov proposal content type to update -// instantiate config to a set of code ids. -message UpdateInstantiateConfigProposal { - option (cosmos_proto.implements_interface) = "cosmos.gov.v1beta1.Content"; - - // Title is a short summary - string title = 1 [ (gogoproto.moretags) = "yaml:\"title\"" ]; - // Description is a human readable text - string description = 2 [ (gogoproto.moretags) = "yaml:\"description\"" ]; - // AccessConfigUpdate contains the list of code ids and the access config - // to be applied. - repeated AccessConfigUpdate access_config_updates = 3 - [ (gogoproto.nullable) = false ]; -} - -// StoreAndInstantiateContractProposal gov proposal content type to store -// and instantiate the contract. -message StoreAndInstantiateContractProposal { - option (cosmos_proto.implements_interface) = "cosmos.gov.v1beta1.Content"; - - // Title is a short summary - string title = 1; - // Description is a human readable text - string description = 2; - // RunAs is the address that is passed to the contract's environment as sender - string run_as = 3; - // WASMByteCode can be raw or gzip compressed - bytes wasm_byte_code = 4 [ (gogoproto.customname) = "WASMByteCode" ]; - // InstantiatePermission to apply on contract creation, optional - AccessConfig instantiate_permission = 5; - // UnpinCode code on upload, optional - bool unpin_code = 6; - // Admin is an optional address that can execute migrations - string admin = 7; - // Label is optional metadata to be stored with a constract instance. - string label = 8; - // Msg json encoded message to be passed to the contract on instantiation - bytes msg = 9 [ (gogoproto.casttype) = "RawContractMessage" ]; - // Funds coins that are transferred to the contract on instantiation - repeated cosmos.base.v1beta1.Coin funds = 10 [ - (gogoproto.nullable) = false, - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" - ]; - // Source is the URL where the code is hosted - string source = 11; - // Builder is the docker image used to build the code deterministically, used - // for smart contract verification - string builder = 12; - // CodeHash is the SHA256 sum of the code outputted by builder, used for smart - // contract verification - bytes code_hash = 13; -} diff --git a/ampd/proto/third_party/cosmwasm/wasm/v1/query.proto b/ampd/proto/third_party/cosmwasm/wasm/v1/query.proto deleted file mode 100644 index ffe48d242..000000000 --- a/ampd/proto/third_party/cosmwasm/wasm/v1/query.proto +++ /dev/null @@ -1,263 +0,0 @@ -syntax = "proto3"; -package cosmwasm.wasm.v1; - -import "gogoproto/gogo.proto"; -import "cosmwasm/wasm/v1/types.proto"; -import "google/api/annotations.proto"; -import "cosmos/base/query/v1beta1/pagination.proto"; - -option go_package = "github.com/CosmWasm/wasmd/x/wasm/types"; -option (gogoproto.goproto_getters_all) = false; -option (gogoproto.equal_all) = false; - -// Query provides defines the gRPC querier service -service Query { - // ContractInfo gets the contract meta data - rpc ContractInfo(QueryContractInfoRequest) - returns (QueryContractInfoResponse) { - option (google.api.http).get = "/cosmwasm/wasm/v1/contract/{address}"; - } - // ContractHistory gets the contract code history - rpc ContractHistory(QueryContractHistoryRequest) - returns (QueryContractHistoryResponse) { - option (google.api.http).get = - "/cosmwasm/wasm/v1/contract/{address}/history"; - } - // ContractsByCode lists all smart contracts for a code id - rpc ContractsByCode(QueryContractsByCodeRequest) - returns (QueryContractsByCodeResponse) { - option (google.api.http).get = "/cosmwasm/wasm/v1/code/{code_id}/contracts"; - } - // AllContractState gets all raw store data for a single contract - rpc AllContractState(QueryAllContractStateRequest) - returns (QueryAllContractStateResponse) { - option (google.api.http).get = "/cosmwasm/wasm/v1/contract/{address}/state"; - } - // RawContractState gets single key from the raw store data of a contract - rpc RawContractState(QueryRawContractStateRequest) - returns (QueryRawContractStateResponse) { - option (google.api.http).get = - "/cosmwasm/wasm/v1/contract/{address}/raw/{query_data}"; - } - // SmartContractState get smart query result from the contract - rpc SmartContractState(QuerySmartContractStateRequest) - returns (QuerySmartContractStateResponse) { - option (google.api.http).get = - "/cosmwasm/wasm/v1/contract/{address}/smart/{query_data}"; - } - // Code gets the binary code and metadata for a singe wasm code - rpc Code(QueryCodeRequest) returns (QueryCodeResponse) { - option (google.api.http).get = "/cosmwasm/wasm/v1/code/{code_id}"; - } - // Codes gets the metadata for all stored wasm codes - rpc Codes(QueryCodesRequest) returns (QueryCodesResponse) { - option (google.api.http).get = "/cosmwasm/wasm/v1/code"; - } - - // PinnedCodes gets the pinned code ids - rpc PinnedCodes(QueryPinnedCodesRequest) returns (QueryPinnedCodesResponse) { - option (google.api.http).get = "/cosmwasm/wasm/v1/codes/pinned"; - } - - // Params gets the module params - rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { - option (google.api.http).get = "/cosmwasm/wasm/v1/codes/params"; - } - - // ContractsByCreator gets the contracts by creator - rpc ContractsByCreator(QueryContractsByCreatorRequest) - returns (QueryContractsByCreatorResponse) { - option (google.api.http).get = - "/cosmwasm/wasm/v1/contracts/creator/{creator_address}"; - } -} - -// QueryContractInfoRequest is the request type for the Query/ContractInfo RPC -// method -message QueryContractInfoRequest { - // address is the address of the contract to query - string address = 1; -} -// QueryContractInfoResponse is the response type for the Query/ContractInfo RPC -// method -message QueryContractInfoResponse { - option (gogoproto.equal) = true; - - // address is the address of the contract - string address = 1; - ContractInfo contract_info = 2 [ - (gogoproto.embed) = true, - (gogoproto.nullable) = false, - (gogoproto.jsontag) = "" - ]; -} - -// QueryContractHistoryRequest is the request type for the Query/ContractHistory -// RPC method -message QueryContractHistoryRequest { - // address is the address of the contract to query - string address = 1; - // pagination defines an optional pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 2; -} - -// QueryContractHistoryResponse is the response type for the -// Query/ContractHistory RPC method -message QueryContractHistoryResponse { - repeated ContractCodeHistoryEntry entries = 1 - [ (gogoproto.nullable) = false ]; - // pagination defines the pagination in the response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -// QueryContractsByCodeRequest is the request type for the Query/ContractsByCode -// RPC method -message QueryContractsByCodeRequest { - uint64 code_id = 1; // grpc-gateway_out does not support Go style CodID - // pagination defines an optional pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 2; -} - -// QueryContractsByCodeResponse is the response type for the -// Query/ContractsByCode RPC method -message QueryContractsByCodeResponse { - // contracts are a set of contract addresses - repeated string contracts = 1; - - // pagination defines the pagination in the response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -// QueryAllContractStateRequest is the request type for the -// Query/AllContractState RPC method -message QueryAllContractStateRequest { - // address is the address of the contract - string address = 1; - // pagination defines an optional pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 2; -} - -// QueryAllContractStateResponse is the response type for the -// Query/AllContractState RPC method -message QueryAllContractStateResponse { - repeated Model models = 1 [ (gogoproto.nullable) = false ]; - // pagination defines the pagination in the response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -// QueryRawContractStateRequest is the request type for the -// Query/RawContractState RPC method -message QueryRawContractStateRequest { - // address is the address of the contract - string address = 1; - bytes query_data = 2; -} - -// QueryRawContractStateResponse is the response type for the -// Query/RawContractState RPC method -message QueryRawContractStateResponse { - // Data contains the raw store data - bytes data = 1; -} - -// QuerySmartContractStateRequest is the request type for the -// Query/SmartContractState RPC method -message QuerySmartContractStateRequest { - // address is the address of the contract - string address = 1; - // QueryData contains the query data passed to the contract - bytes query_data = 2 [ (gogoproto.casttype) = "RawContractMessage" ]; -} - -// QuerySmartContractStateResponse is the response type for the -// Query/SmartContractState RPC method -message QuerySmartContractStateResponse { - // Data contains the json data returned from the smart contract - bytes data = 1 [ (gogoproto.casttype) = "RawContractMessage" ]; -} - -// QueryCodeRequest is the request type for the Query/Code RPC method -message QueryCodeRequest { - uint64 code_id = 1; // grpc-gateway_out does not support Go style CodID -} - -// CodeInfoResponse contains code meta data from CodeInfo -message CodeInfoResponse { - option (gogoproto.equal) = true; - - uint64 code_id = 1 [ - (gogoproto.customname) = "CodeID", - (gogoproto.jsontag) = "id" - ]; // id for legacy support - string creator = 2; - bytes data_hash = 3 - [ (gogoproto.casttype) = - "github.com/tendermint/tendermint/libs/bytes.HexBytes" ]; - // Used in v1beta1 - reserved 4, 5; - AccessConfig instantiate_permission = 6 [ (gogoproto.nullable) = false ]; -} - -// QueryCodeResponse is the response type for the Query/Code RPC method -message QueryCodeResponse { - option (gogoproto.equal) = true; - CodeInfoResponse code_info = 1 - [ (gogoproto.embed) = true, (gogoproto.jsontag) = "" ]; - bytes data = 2 [ (gogoproto.jsontag) = "data" ]; -} - -// QueryCodesRequest is the request type for the Query/Codes RPC method -message QueryCodesRequest { - // pagination defines an optional pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 1; -} - -// QueryCodesResponse is the response type for the Query/Codes RPC method -message QueryCodesResponse { - repeated CodeInfoResponse code_infos = 1 [ (gogoproto.nullable) = false ]; - // pagination defines the pagination in the response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -// QueryPinnedCodesRequest is the request type for the Query/PinnedCodes -// RPC method -message QueryPinnedCodesRequest { - // pagination defines an optional pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 2; -} - -// QueryPinnedCodesResponse is the response type for the -// Query/PinnedCodes RPC method -message QueryPinnedCodesResponse { - repeated uint64 code_ids = 1 - [ (gogoproto.nullable) = false, (gogoproto.customname) = "CodeIDs" ]; - // pagination defines the pagination in the response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -// QueryParamsRequest is the request type for the Query/Params RPC method. -message QueryParamsRequest {} - -// QueryParamsResponse is the response type for the Query/Params RPC method. -message QueryParamsResponse { - // params defines the parameters of the module. - Params params = 1 [ (gogoproto.nullable) = false ]; -} - -// QueryContractsByCreatorRequest is the request type for the -// Query/ContractsByCreator RPC method. -message QueryContractsByCreatorRequest { - // CreatorAddress is the address of contract creator - string creator_address = 1; - // Pagination defines an optional pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 2; -} - -// QueryContractsByCreatorResponse is the response type for the -// Query/ContractsByCreator RPC method. -message QueryContractsByCreatorResponse { - // ContractAddresses result set - repeated string contract_addresses = 1; - // Pagination defines the pagination in the response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} \ No newline at end of file diff --git a/ampd/proto/third_party/cosmwasm/wasm/v1/tx.proto b/ampd/proto/third_party/cosmwasm/wasm/v1/tx.proto deleted file mode 100644 index 741fbc494..000000000 --- a/ampd/proto/third_party/cosmwasm/wasm/v1/tx.proto +++ /dev/null @@ -1,192 +0,0 @@ -syntax = "proto3"; -package cosmwasm.wasm.v1; - -import "cosmos/base/v1beta1/coin.proto"; -import "gogoproto/gogo.proto"; -import "cosmwasm/wasm/v1/types.proto"; - -option go_package = "github.com/CosmWasm/wasmd/x/wasm/types"; -option (gogoproto.goproto_getters_all) = false; - -// Msg defines the wasm Msg service. -service Msg { - // StoreCode to submit Wasm code to the system - rpc StoreCode(MsgStoreCode) returns (MsgStoreCodeResponse); - // InstantiateContract creates a new smart contract instance for the given - // code id. - rpc InstantiateContract(MsgInstantiateContract) - returns (MsgInstantiateContractResponse); - // InstantiateContract2 creates a new smart contract instance for the given - // code id with a predictable address - rpc InstantiateContract2(MsgInstantiateContract2) - returns (MsgInstantiateContract2Response); - // Execute submits the given message data to a smart contract - rpc ExecuteContract(MsgExecuteContract) returns (MsgExecuteContractResponse); - // Migrate runs a code upgrade/ downgrade for a smart contract - rpc MigrateContract(MsgMigrateContract) returns (MsgMigrateContractResponse); - // UpdateAdmin sets a new admin for a smart contract - rpc UpdateAdmin(MsgUpdateAdmin) returns (MsgUpdateAdminResponse); - // ClearAdmin removes any admin stored for a smart contract - rpc ClearAdmin(MsgClearAdmin) returns (MsgClearAdminResponse); - // UpdateInstantiateConfig updates instantiate config for a smart contract - rpc UpdateInstantiateConfig(MsgUpdateInstantiateConfig) - returns (MsgUpdateInstantiateConfigResponse); -} - -// MsgStoreCode submit Wasm code to the system -message MsgStoreCode { - // Sender is the actor that signed the messages - string sender = 1; - // WASMByteCode can be raw or gzip compressed - bytes wasm_byte_code = 2 [ (gogoproto.customname) = "WASMByteCode" ]; - // Used in v1beta1 - reserved 3, 4; - // InstantiatePermission access control to apply on contract creation, - // optional - AccessConfig instantiate_permission = 5; -} -// MsgStoreCodeResponse returns store result data. -message MsgStoreCodeResponse { - // CodeID is the reference to the stored WASM code - uint64 code_id = 1 [ (gogoproto.customname) = "CodeID" ]; - // Checksum is the sha256 hash of the stored code - bytes checksum = 2; -} - -// MsgInstantiateContract create a new smart contract instance for the given -// code id. -message MsgInstantiateContract { - // Sender is the that actor that signed the messages - string sender = 1; - // Admin is an optional address that can execute migrations - string admin = 2; - // CodeID is the reference to the stored WASM code - uint64 code_id = 3 [ (gogoproto.customname) = "CodeID" ]; - // Label is optional metadata to be stored with a contract instance. - string label = 4; - // Msg json encoded message to be passed to the contract on instantiation - bytes msg = 5 [ (gogoproto.casttype) = "RawContractMessage" ]; - // Funds coins that are transferred to the contract on instantiation - repeated cosmos.base.v1beta1.Coin funds = 6 [ - (gogoproto.nullable) = false, - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" - ]; -} - -// MsgInstantiateContract2 create a new smart contract instance for the given -// code id with a predicable address. -message MsgInstantiateContract2 { - // Sender is the that actor that signed the messages - string sender = 1; - // Admin is an optional address that can execute migrations - string admin = 2; - // CodeID is the reference to the stored WASM code - uint64 code_id = 3 [ (gogoproto.customname) = "CodeID" ]; - // Label is optional metadata to be stored with a contract instance. - string label = 4; - // Msg json encoded message to be passed to the contract on instantiation - bytes msg = 5 [ (gogoproto.casttype) = "RawContractMessage" ]; - // Funds coins that are transferred to the contract on instantiation - repeated cosmos.base.v1beta1.Coin funds = 6 [ - (gogoproto.nullable) = false, - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" - ]; - // Salt is an arbitrary value provided by the sender. Size can be 1 to 64. - bytes salt = 7; - // FixMsg include the msg value into the hash for the predictable address. - // Default is false - bool fix_msg = 8; -} - -// MsgInstantiateContractResponse return instantiation result data -message MsgInstantiateContractResponse { - // Address is the bech32 address of the new contract instance. - string address = 1; - // Data contains bytes to returned from the contract - bytes data = 2; -} - -// MsgInstantiateContract2Response return instantiation result data -message MsgInstantiateContract2Response { - // Address is the bech32 address of the new contract instance. - string address = 1; - // Data contains bytes to returned from the contract - bytes data = 2; -} - -// MsgExecuteContract submits the given message data to a smart contract -message MsgExecuteContract { - // Sender is the that actor that signed the messages - string sender = 1; - // Contract is the address of the smart contract - string contract = 2; - // Msg json encoded message to be passed to the contract - bytes msg = 3 [ (gogoproto.casttype) = "RawContractMessage" ]; - // Funds coins that are transferred to the contract on execution - repeated cosmos.base.v1beta1.Coin funds = 5 [ - (gogoproto.nullable) = false, - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" - ]; -} - -// MsgExecuteContractResponse returns execution result data. -message MsgExecuteContractResponse { - // Data contains bytes to returned from the contract - bytes data = 1; -} - -// MsgMigrateContract runs a code upgrade/ downgrade for a smart contract -message MsgMigrateContract { - // Sender is the that actor that signed the messages - string sender = 1; - // Contract is the address of the smart contract - string contract = 2; - // CodeID references the new WASM code - uint64 code_id = 3 [ (gogoproto.customname) = "CodeID" ]; - // Msg json encoded message to be passed to the contract on migration - bytes msg = 4 [ (gogoproto.casttype) = "RawContractMessage" ]; -} - -// MsgMigrateContractResponse returns contract migration result data. -message MsgMigrateContractResponse { - // Data contains same raw bytes returned as data from the wasm contract. - // (May be empty) - bytes data = 1; -} - -// MsgUpdateAdmin sets a new admin for a smart contract -message MsgUpdateAdmin { - // Sender is the that actor that signed the messages - string sender = 1; - // NewAdmin address to be set - string new_admin = 2; - // Contract is the address of the smart contract - string contract = 3; -} - -// MsgUpdateAdminResponse returns empty data -message MsgUpdateAdminResponse {} - -// MsgClearAdmin removes any admin stored for a smart contract -message MsgClearAdmin { - // Sender is the actor that signed the messages - string sender = 1; - // Contract is the address of the smart contract - string contract = 3; -} - -// MsgClearAdminResponse returns empty data -message MsgClearAdminResponse {} - -// MsgUpdateInstantiateConfig updates instantiate config for a smart contract -message MsgUpdateInstantiateConfig { - // Sender is the that actor that signed the messages - string sender = 1; - // CodeID references the stored WASM code - uint64 code_id = 2 [ (gogoproto.customname) = "CodeID" ]; - // NewInstantiatePermission is the new access control - AccessConfig new_instantiate_permission = 3; -} - -// MsgUpdateInstantiateConfigResponse returns empty data -message MsgUpdateInstantiateConfigResponse {} \ No newline at end of file diff --git a/ampd/proto/third_party/cosmwasm/wasm/v1/types.proto b/ampd/proto/third_party/cosmwasm/wasm/v1/types.proto deleted file mode 100644 index b68179e2e..000000000 --- a/ampd/proto/third_party/cosmwasm/wasm/v1/types.proto +++ /dev/null @@ -1,145 +0,0 @@ -syntax = "proto3"; -package cosmwasm.wasm.v1; - -import "cosmos_proto/cosmos.proto"; -import "gogoproto/gogo.proto"; -import "google/protobuf/any.proto"; - -option go_package = "github.com/CosmWasm/wasmd/x/wasm/types"; -option (gogoproto.goproto_getters_all) = false; -option (gogoproto.equal_all) = true; - -// AccessType permission types -enum AccessType { - option (gogoproto.goproto_enum_prefix) = false; - option (gogoproto.goproto_enum_stringer) = false; - // AccessTypeUnspecified placeholder for empty value - ACCESS_TYPE_UNSPECIFIED = 0 - [ (gogoproto.enumvalue_customname) = "AccessTypeUnspecified" ]; - // AccessTypeNobody forbidden - ACCESS_TYPE_NOBODY = 1 - [ (gogoproto.enumvalue_customname) = "AccessTypeNobody" ]; - // AccessTypeOnlyAddress restricted to a single address - // Deprecated: use AccessTypeAnyOfAddresses instead - ACCESS_TYPE_ONLY_ADDRESS = 2 - [ (gogoproto.enumvalue_customname) = "AccessTypeOnlyAddress" ]; - // AccessTypeEverybody unrestricted - ACCESS_TYPE_EVERYBODY = 3 - [ (gogoproto.enumvalue_customname) = "AccessTypeEverybody" ]; - // AccessTypeAnyOfAddresses allow any of the addresses - ACCESS_TYPE_ANY_OF_ADDRESSES = 4 - [ (gogoproto.enumvalue_customname) = "AccessTypeAnyOfAddresses" ]; -} - -// AccessTypeParam -message AccessTypeParam { - option (gogoproto.goproto_stringer) = true; - AccessType value = 1 [ (gogoproto.moretags) = "yaml:\"value\"" ]; -} - -// AccessConfig access control type. -message AccessConfig { - option (gogoproto.goproto_stringer) = true; - AccessType permission = 1 [ (gogoproto.moretags) = "yaml:\"permission\"" ]; - - // Address - // Deprecated: replaced by addresses - string address = 2 [ (gogoproto.moretags) = "yaml:\"address\"" ]; - repeated string addresses = 3 [ (gogoproto.moretags) = "yaml:\"addresses\"" ]; -} - -// Params defines the set of wasm parameters. -message Params { - option (gogoproto.goproto_stringer) = false; - AccessConfig code_upload_access = 1 [ - (gogoproto.nullable) = false, - (gogoproto.moretags) = "yaml:\"code_upload_access\"" - ]; - AccessType instantiate_default_permission = 2 - [ (gogoproto.moretags) = "yaml:\"instantiate_default_permission\"" ]; -} - -// CodeInfo is data for the uploaded contract WASM code -message CodeInfo { - // CodeHash is the unique identifier created by wasmvm - bytes code_hash = 1; - // Creator address who initially stored the code - string creator = 2; - // Used in v1beta1 - reserved 3, 4; - // InstantiateConfig access control to apply on contract creation, optional - AccessConfig instantiate_config = 5 [ (gogoproto.nullable) = false ]; -} - -// ContractInfo stores a WASM contract instance -message ContractInfo { - option (gogoproto.equal) = true; - - // CodeID is the reference to the stored Wasm code - uint64 code_id = 1 [ (gogoproto.customname) = "CodeID" ]; - // Creator address who initially instantiated the contract - string creator = 2; - // Admin is an optional address that can execute migrations - string admin = 3; - // Label is optional metadata to be stored with a contract instance. - string label = 4; - // Created Tx position when the contract was instantiated. - AbsoluteTxPosition created = 5; - string ibc_port_id = 6 [ (gogoproto.customname) = "IBCPortID" ]; - - // Extension is an extension point to store custom metadata within the - // persistence model. - google.protobuf.Any extension = 7 - [ (cosmos_proto.accepts_interface) = - "cosmwasm.wasm.v1.ContractInfoExtension" ]; -} - -// ContractCodeHistoryOperationType actions that caused a code change -enum ContractCodeHistoryOperationType { - option (gogoproto.goproto_enum_prefix) = false; - // ContractCodeHistoryOperationTypeUnspecified placeholder for empty value - CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED = 0 - [ (gogoproto.enumvalue_customname) = - "ContractCodeHistoryOperationTypeUnspecified" ]; - // ContractCodeHistoryOperationTypeInit on chain contract instantiation - CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT = 1 - [ (gogoproto.enumvalue_customname) = - "ContractCodeHistoryOperationTypeInit" ]; - // ContractCodeHistoryOperationTypeMigrate code migration - CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE = 2 - [ (gogoproto.enumvalue_customname) = - "ContractCodeHistoryOperationTypeMigrate" ]; - // ContractCodeHistoryOperationTypeGenesis based on genesis data - CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS = 3 - [ (gogoproto.enumvalue_customname) = - "ContractCodeHistoryOperationTypeGenesis" ]; -} - -// ContractCodeHistoryEntry metadata to a contract. -message ContractCodeHistoryEntry { - ContractCodeHistoryOperationType operation = 1; - // CodeID is the reference to the stored WASM code - uint64 code_id = 2 [ (gogoproto.customname) = "CodeID" ]; - // Updated Tx position when the operation was executed. - AbsoluteTxPosition updated = 3; - bytes msg = 4 [ (gogoproto.casttype) = "RawContractMessage" ]; -} - -// AbsoluteTxPosition is a unique transaction position that allows for global -// ordering of transactions. -message AbsoluteTxPosition { - // BlockHeight is the block the contract was created at - uint64 block_height = 1; - // TxIndex is a monotonic counter within the block (actual transaction index, - // or gas consumed) - uint64 tx_index = 2; -} - -// Model is a struct that holds a KV pair -message Model { - // hex-encode key to read it better (this is often ascii) - bytes key = 1 [ (gogoproto.casttype) = - "github.com/tendermint/tendermint/libs/bytes.HexBytes" ]; - // base64-encode raw value - bytes value = 2; -} diff --git a/ampd/proto/third_party/gogoproto/gogo.proto b/ampd/proto/third_party/gogoproto/gogo.proto deleted file mode 100644 index 49e78f99f..000000000 --- a/ampd/proto/third_party/gogoproto/gogo.proto +++ /dev/null @@ -1,145 +0,0 @@ -// Protocol Buffers for Go with Gadgets -// -// Copyright (c) 2013, The GoGo Authors. All rights reserved. -// http://github.com/gogo/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -syntax = "proto2"; -package gogoproto; - -import "google/protobuf/descriptor.proto"; - -option java_package = "com.google.protobuf"; -option java_outer_classname = "GoGoProtos"; -option go_package = "github.com/gogo/protobuf/gogoproto"; - -extend google.protobuf.EnumOptions { - optional bool goproto_enum_prefix = 62001; - optional bool goproto_enum_stringer = 62021; - optional bool enum_stringer = 62022; - optional string enum_customname = 62023; - optional bool enumdecl = 62024; -} - -extend google.protobuf.EnumValueOptions { - optional string enumvalue_customname = 66001; -} - -extend google.protobuf.FileOptions { - optional bool goproto_getters_all = 63001; - optional bool goproto_enum_prefix_all = 63002; - optional bool goproto_stringer_all = 63003; - optional bool verbose_equal_all = 63004; - optional bool face_all = 63005; - optional bool gostring_all = 63006; - optional bool populate_all = 63007; - optional bool stringer_all = 63008; - optional bool onlyone_all = 63009; - - optional bool equal_all = 63013; - optional bool description_all = 63014; - optional bool testgen_all = 63015; - optional bool benchgen_all = 63016; - optional bool marshaler_all = 63017; - optional bool unmarshaler_all = 63018; - optional bool stable_marshaler_all = 63019; - - optional bool sizer_all = 63020; - - optional bool goproto_enum_stringer_all = 63021; - optional bool enum_stringer_all = 63022; - - optional bool unsafe_marshaler_all = 63023; - optional bool unsafe_unmarshaler_all = 63024; - - optional bool goproto_extensions_map_all = 63025; - optional bool goproto_unrecognized_all = 63026; - optional bool gogoproto_import = 63027; - optional bool protosizer_all = 63028; - optional bool compare_all = 63029; - optional bool typedecl_all = 63030; - optional bool enumdecl_all = 63031; - - optional bool goproto_registration = 63032; - optional bool messagename_all = 63033; - - optional bool goproto_sizecache_all = 63034; - optional bool goproto_unkeyed_all = 63035; -} - -extend google.protobuf.MessageOptions { - optional bool goproto_getters = 64001; - optional bool goproto_stringer = 64003; - optional bool verbose_equal = 64004; - optional bool face = 64005; - optional bool gostring = 64006; - optional bool populate = 64007; - optional bool stringer = 67008; - optional bool onlyone = 64009; - - optional bool equal = 64013; - optional bool description = 64014; - optional bool testgen = 64015; - optional bool benchgen = 64016; - optional bool marshaler = 64017; - optional bool unmarshaler = 64018; - optional bool stable_marshaler = 64019; - - optional bool sizer = 64020; - - optional bool unsafe_marshaler = 64023; - optional bool unsafe_unmarshaler = 64024; - - optional bool goproto_extensions_map = 64025; - optional bool goproto_unrecognized = 64026; - - optional bool protosizer = 64028; - optional bool compare = 64029; - - optional bool typedecl = 64030; - - optional bool messagename = 64033; - - optional bool goproto_sizecache = 64034; - optional bool goproto_unkeyed = 64035; -} - -extend google.protobuf.FieldOptions { - optional bool nullable = 65001; - optional bool embed = 65002; - optional string customtype = 65003; - optional string customname = 65004; - optional string jsontag = 65005; - optional string moretags = 65006; - optional string casttype = 65007; - optional string castkey = 65008; - optional string castvalue = 65009; - - optional bool stdtime = 65010; - optional bool stdduration = 65011; - optional bool wktpointer = 65012; - - optional string castrepeated = 65013; -} diff --git a/ampd/proto/third_party/google/api/annotations.proto b/ampd/proto/third_party/google/api/annotations.proto deleted file mode 100644 index efdab3db6..000000000 --- a/ampd/proto/third_party/google/api/annotations.proto +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright 2015 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.api; - -import "google/api/http.proto"; -import "google/protobuf/descriptor.proto"; - -option go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations"; -option java_multiple_files = true; -option java_outer_classname = "AnnotationsProto"; -option java_package = "com.google.api"; -option objc_class_prefix = "GAPI"; - -extend google.protobuf.MethodOptions { - // See `HttpRule`. - HttpRule http = 72295728; -} diff --git a/ampd/proto/third_party/google/api/http.proto b/ampd/proto/third_party/google/api/http.proto deleted file mode 100644 index 31d867a27..000000000 --- a/ampd/proto/third_party/google/api/http.proto +++ /dev/null @@ -1,379 +0,0 @@ -// Copyright 2023 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.api; - -option cc_enable_arenas = true; -option go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations"; -option java_multiple_files = true; -option java_outer_classname = "HttpProto"; -option java_package = "com.google.api"; -option objc_class_prefix = "GAPI"; - -// Defines the HTTP configuration for an API service. It contains a list of -// [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method -// to one or more HTTP REST API methods. -message Http { - // A list of HTTP configuration rules that apply to individual API methods. - // - // **NOTE:** All service configuration rules follow "last one wins" order. - repeated HttpRule rules = 1; - - // When set to true, URL path parameters will be fully URI-decoded except in - // cases of single segment matches in reserved expansion, where "%2F" will be - // left encoded. - // - // The default behavior is to not decode RFC 6570 reserved characters in multi - // segment matches. - bool fully_decode_reserved_expansion = 2; -} - -// # gRPC Transcoding -// -// gRPC Transcoding is a feature for mapping between a gRPC method and one or -// more HTTP REST endpoints. It allows developers to build a single API service -// that supports both gRPC APIs and REST APIs. Many systems, including [Google -// APIs](https://github.com/googleapis/googleapis), -// [Cloud Endpoints](https://cloud.google.com/endpoints), [gRPC -// Gateway](https://github.com/grpc-ecosystem/grpc-gateway), -// and [Envoy](https://github.com/envoyproxy/envoy) proxy support this feature -// and use it for large scale production services. -// -// `HttpRule` defines the schema of the gRPC/REST mapping. The mapping specifies -// how different portions of the gRPC request message are mapped to the URL -// path, URL query parameters, and HTTP request body. It also controls how the -// gRPC response message is mapped to the HTTP response body. `HttpRule` is -// typically specified as an `google.api.http` annotation on the gRPC method. -// -// Each mapping specifies a URL path template and an HTTP method. The path -// template may refer to one or more fields in the gRPC request message, as long -// as each field is a non-repeated field with a primitive (non-message) type. -// The path template controls how fields of the request message are mapped to -// the URL path. -// -// Example: -// -// service Messaging { -// rpc GetMessage(GetMessageRequest) returns (Message) { -// option (google.api.http) = { -// get: "/v1/{name=messages/*}" -// }; -// } -// } -// message GetMessageRequest { -// string name = 1; // Mapped to URL path. -// } -// message Message { -// string text = 1; // The resource content. -// } -// -// This enables an HTTP REST to gRPC mapping as below: -// -// HTTP | gRPC -// -----|----- -// `GET /v1/messages/123456` | `GetMessage(name: "messages/123456")` -// -// Any fields in the request message which are not bound by the path template -// automatically become HTTP query parameters if there is no HTTP request body. -// For example: -// -// service Messaging { -// rpc GetMessage(GetMessageRequest) returns (Message) { -// option (google.api.http) = { -// get:"/v1/messages/{message_id}" -// }; -// } -// } -// message GetMessageRequest { -// message SubMessage { -// string subfield = 1; -// } -// string message_id = 1; // Mapped to URL path. -// int64 revision = 2; // Mapped to URL query parameter `revision`. -// SubMessage sub = 3; // Mapped to URL query parameter `sub.subfield`. -// } -// -// This enables a HTTP JSON to RPC mapping as below: -// -// HTTP | gRPC -// -----|----- -// `GET /v1/messages/123456?revision=2&sub.subfield=foo` | -// `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield: -// "foo"))` -// -// Note that fields which are mapped to URL query parameters must have a -// primitive type or a repeated primitive type or a non-repeated message type. -// In the case of a repeated type, the parameter can be repeated in the URL -// as `...?param=A¶m=B`. In the case of a message type, each field of the -// message is mapped to a separate parameter, such as -// `...?foo.a=A&foo.b=B&foo.c=C`. -// -// For HTTP methods that allow a request body, the `body` field -// specifies the mapping. Consider a REST update method on the -// message resource collection: -// -// service Messaging { -// rpc UpdateMessage(UpdateMessageRequest) returns (Message) { -// option (google.api.http) = { -// patch: "/v1/messages/{message_id}" -// body: "message" -// }; -// } -// } -// message UpdateMessageRequest { -// string message_id = 1; // mapped to the URL -// Message message = 2; // mapped to the body -// } -// -// The following HTTP JSON to RPC mapping is enabled, where the -// representation of the JSON in the request body is determined by -// protos JSON encoding: -// -// HTTP | gRPC -// -----|----- -// `PATCH /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: -// "123456" message { text: "Hi!" })` -// -// The special name `*` can be used in the body mapping to define that -// every field not bound by the path template should be mapped to the -// request body. This enables the following alternative definition of -// the update method: -// -// service Messaging { -// rpc UpdateMessage(Message) returns (Message) { -// option (google.api.http) = { -// patch: "/v1/messages/{message_id}" -// body: "*" -// }; -// } -// } -// message Message { -// string message_id = 1; -// string text = 2; -// } -// -// -// The following HTTP JSON to RPC mapping is enabled: -// -// HTTP | gRPC -// -----|----- -// `PATCH /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: -// "123456" text: "Hi!")` -// -// Note that when using `*` in the body mapping, it is not possible to -// have HTTP parameters, as all fields not bound by the path end in -// the body. This makes this option more rarely used in practice when -// defining REST APIs. The common usage of `*` is in custom methods -// which don't use the URL at all for transferring data. -// -// It is possible to define multiple HTTP methods for one RPC by using -// the `additional_bindings` option. Example: -// -// service Messaging { -// rpc GetMessage(GetMessageRequest) returns (Message) { -// option (google.api.http) = { -// get: "/v1/messages/{message_id}" -// additional_bindings { -// get: "/v1/users/{user_id}/messages/{message_id}" -// } -// }; -// } -// } -// message GetMessageRequest { -// string message_id = 1; -// string user_id = 2; -// } -// -// This enables the following two alternative HTTP JSON to RPC mappings: -// -// HTTP | gRPC -// -----|----- -// `GET /v1/messages/123456` | `GetMessage(message_id: "123456")` -// `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: -// "123456")` -// -// ## Rules for HTTP mapping -// -// 1. Leaf request fields (recursive expansion nested messages in the request -// message) are classified into three categories: -// - Fields referred by the path template. They are passed via the URL path. -// - Fields referred by the [HttpRule.body][google.api.HttpRule.body]. They -// are passed via the HTTP -// request body. -// - All other fields are passed via the URL query parameters, and the -// parameter name is the field path in the request message. A repeated -// field can be represented as multiple query parameters under the same -// name. -// 2. If [HttpRule.body][google.api.HttpRule.body] is "*", there is no URL -// query parameter, all fields -// are passed via URL path and HTTP request body. -// 3. If [HttpRule.body][google.api.HttpRule.body] is omitted, there is no HTTP -// request body, all -// fields are passed via URL path and URL query parameters. -// -// ### Path template syntax -// -// Template = "/" Segments [ Verb ] ; -// Segments = Segment { "/" Segment } ; -// Segment = "*" | "**" | LITERAL | Variable ; -// Variable = "{" FieldPath [ "=" Segments ] "}" ; -// FieldPath = IDENT { "." IDENT } ; -// Verb = ":" LITERAL ; -// -// The syntax `*` matches a single URL path segment. The syntax `**` matches -// zero or more URL path segments, which must be the last part of the URL path -// except the `Verb`. -// -// The syntax `Variable` matches part of the URL path as specified by its -// template. A variable template must not contain other variables. If a variable -// matches a single path segment, its template may be omitted, e.g. `{var}` -// is equivalent to `{var=*}`. -// -// The syntax `LITERAL` matches literal text in the URL path. If the `LITERAL` -// contains any reserved character, such characters should be percent-encoded -// before the matching. -// -// If a variable contains exactly one path segment, such as `"{var}"` or -// `"{var=*}"`, when such a variable is expanded into a URL path on the client -// side, all characters except `[-_.~0-9a-zA-Z]` are percent-encoded. The -// server side does the reverse decoding. Such variables show up in the -// [Discovery -// Document](https://developers.google.com/discovery/v1/reference/apis) as -// `{var}`. -// -// If a variable contains multiple path segments, such as `"{var=foo/*}"` -// or `"{var=**}"`, when such a variable is expanded into a URL path on the -// client side, all characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. -// The server side does the reverse decoding, except "%2F" and "%2f" are left -// unchanged. Such variables show up in the -// [Discovery -// Document](https://developers.google.com/discovery/v1/reference/apis) as -// `{+var}`. -// -// ## Using gRPC API Service Configuration -// -// gRPC API Service Configuration (service config) is a configuration language -// for configuring a gRPC service to become a user-facing product. The -// service config is simply the YAML representation of the `google.api.Service` -// proto message. -// -// As an alternative to annotating your proto file, you can configure gRPC -// transcoding in your service config YAML files. You do this by specifying a -// `HttpRule` that maps the gRPC method to a REST endpoint, achieving the same -// effect as the proto annotation. This can be particularly useful if you -// have a proto that is reused in multiple services. Note that any transcoding -// specified in the service config will override any matching transcoding -// configuration in the proto. -// -// Example: -// -// http: -// rules: -// # Selects a gRPC method and applies HttpRule to it. -// - selector: example.v1.Messaging.GetMessage -// get: /v1/messages/{message_id}/{sub.subfield} -// -// ## Special notes -// -// When gRPC Transcoding is used to map a gRPC to JSON REST endpoints, the -// proto to JSON conversion must follow the [proto3 -// specification](https://developers.google.com/protocol-buffers/docs/proto3#json). -// -// While the single segment variable follows the semantics of -// [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 Simple String -// Expansion, the multi segment variable **does not** follow RFC 6570 Section -// 3.2.3 Reserved Expansion. The reason is that the Reserved Expansion -// does not expand special characters like `?` and `#`, which would lead -// to invalid URLs. As the result, gRPC Transcoding uses a custom encoding -// for multi segment variables. -// -// The path variables **must not** refer to any repeated or mapped field, -// because client libraries are not capable of handling such variable expansion. -// -// The path variables **must not** capture the leading "/" character. The reason -// is that the most common use case "{var}" does not capture the leading "/" -// character. For consistency, all path variables must share the same behavior. -// -// Repeated message fields must not be mapped to URL query parameters, because -// no client library can support such complicated mapping. -// -// If an API needs to use a JSON array for request or response body, it can map -// the request or response body to a repeated field. However, some gRPC -// Transcoding implementations may not support this feature. -message HttpRule { - // Selects a method to which this rule applies. - // - // Refer to [selector][google.api.DocumentationRule.selector] for syntax - // details. - string selector = 1; - - // Determines the URL pattern is matched by this rules. This pattern can be - // used with any of the {get|put|post|delete|patch} methods. A custom method - // can be defined using the 'custom' field. - oneof pattern { - // Maps to HTTP GET. Used for listing and getting information about - // resources. - string get = 2; - - // Maps to HTTP PUT. Used for replacing a resource. - string put = 3; - - // Maps to HTTP POST. Used for creating a resource or performing an action. - string post = 4; - - // Maps to HTTP DELETE. Used for deleting a resource. - string delete = 5; - - // Maps to HTTP PATCH. Used for updating a resource. - string patch = 6; - - // The custom pattern is used for specifying an HTTP method that is not - // included in the `pattern` field, such as HEAD, or "*" to leave the - // HTTP method unspecified for this rule. The wild-card rule is useful - // for services that provide content to Web (HTML) clients. - CustomHttpPattern custom = 8; - } - - // The name of the request field whose value is mapped to the HTTP request - // body, or `*` for mapping all request fields not captured by the path - // pattern to the HTTP body, or omitted for not having any HTTP request body. - // - // NOTE: the referred field must be present at the top-level of the request - // message type. - string body = 7; - - // Optional. The name of the response field whose value is mapped to the HTTP - // response body. When omitted, the entire response message will be used - // as the HTTP response body. - // - // NOTE: The referred field must be present at the top-level of the response - // message type. - string response_body = 12; - - // Additional HTTP bindings for the selector. Nested bindings must - // not contain an `additional_bindings` field themselves (that is, - // the nesting may only be one level deep). - repeated HttpRule additional_bindings = 11; -} - -// A custom pattern is used for defining custom HTTP verb. -message CustomHttpPattern { - // The name of this custom HTTP verb. - string kind = 1; - - // The path matched by this custom verb. - string path = 2; -} diff --git a/ampd/proto/third_party/ibc/applications/transfer/v1/genesis.proto b/ampd/proto/third_party/ibc/applications/transfer/v1/genesis.proto deleted file mode 100644 index 34672fdeb..000000000 --- a/ampd/proto/third_party/ibc/applications/transfer/v1/genesis.proto +++ /dev/null @@ -1,19 +0,0 @@ -syntax = "proto3"; - -package ibc.applications.transfer.v1; - -option go_package = "github.com/cosmos/ibc-go/v4/modules/apps/transfer/types"; - -import "ibc/applications/transfer/v1/transfer.proto"; -import "gogoproto/gogo.proto"; - -// GenesisState defines the ibc-transfer genesis state -message GenesisState { - string port_id = 1 [(gogoproto.moretags) = "yaml:\"port_id\""]; - repeated DenomTrace denom_traces = 2 [ - (gogoproto.castrepeated) = "Traces", - (gogoproto.nullable) = false, - (gogoproto.moretags) = "yaml:\"denom_traces\"" - ]; - Params params = 3 [(gogoproto.nullable) = false]; -} diff --git a/ampd/proto/third_party/ibc/applications/transfer/v1/query.proto b/ampd/proto/third_party/ibc/applications/transfer/v1/query.proto deleted file mode 100644 index 52f2f2400..000000000 --- a/ampd/proto/third_party/ibc/applications/transfer/v1/query.proto +++ /dev/null @@ -1,105 +0,0 @@ -syntax = "proto3"; - -package ibc.applications.transfer.v1; - -import "gogoproto/gogo.proto"; -import "cosmos/base/query/v1beta1/pagination.proto"; -import "ibc/applications/transfer/v1/transfer.proto"; -import "google/api/annotations.proto"; - -option go_package = "github.com/cosmos/ibc-go/v4/modules/apps/transfer/types"; - -// Query provides defines the gRPC querier service. -service Query { - // DenomTraces queries all denomination traces. - rpc DenomTraces(QueryDenomTracesRequest) returns (QueryDenomTracesResponse) { - option (google.api.http).get = "/ibc/apps/transfer/v1/denom_traces"; - } - - // DenomTrace queries a denomination trace information. - rpc DenomTrace(QueryDenomTraceRequest) returns (QueryDenomTraceResponse) { - option (google.api.http).get = "/ibc/apps/transfer/v1/denom_traces/{hash=**}"; - } - - // Params queries all parameters of the ibc-transfer module. - rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { - option (google.api.http).get = "/ibc/apps/transfer/v1/params"; - } - - // DenomHash queries a denomination hash information. - rpc DenomHash(QueryDenomHashRequest) returns (QueryDenomHashResponse) { - option (google.api.http).get = "/ibc/apps/transfer/v1/denom_hashes/{trace=**}"; - } - - // EscrowAddress returns the escrow address for a particular port and channel id. - rpc EscrowAddress(QueryEscrowAddressRequest) returns (QueryEscrowAddressResponse) { - option (google.api.http).get = "/ibc/apps/transfer/v1/channels/{channel_id}/ports/{port_id}/escrow_address"; - } -} - -// QueryDenomTraceRequest is the request type for the Query/DenomTrace RPC -// method -message QueryDenomTraceRequest { - // hash (in hex format) or denom (full denom with ibc prefix) of the denomination trace information. - string hash = 1; -} - -// QueryDenomTraceResponse is the response type for the Query/DenomTrace RPC -// method. -message QueryDenomTraceResponse { - // denom_trace returns the requested denomination trace information. - DenomTrace denom_trace = 1; -} - -// QueryConnectionsRequest is the request type for the Query/DenomTraces RPC -// method -message QueryDenomTracesRequest { - // pagination defines an optional pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 1; -} - -// QueryConnectionsResponse is the response type for the Query/DenomTraces RPC -// method. -message QueryDenomTracesResponse { - // denom_traces returns all denominations trace information. - repeated DenomTrace denom_traces = 1 [(gogoproto.castrepeated) = "Traces", (gogoproto.nullable) = false]; - // pagination defines the pagination in the response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -// QueryParamsRequest is the request type for the Query/Params RPC method. -message QueryParamsRequest {} - -// QueryParamsResponse is the response type for the Query/Params RPC method. -message QueryParamsResponse { - // params defines the parameters of the module. - Params params = 1; -} - -// QueryDenomHashRequest is the request type for the Query/DenomHash RPC -// method -message QueryDenomHashRequest { - // The denomination trace ([port_id]/[channel_id])+/[denom] - string trace = 1; -} - -// QueryDenomHashResponse is the response type for the Query/DenomHash RPC -// method. -message QueryDenomHashResponse { - // hash (in hex format) of the denomination trace information. - string hash = 1; -} - -// QueryEscrowAddressRequest is the request type for the EscrowAddress RPC method. -message QueryEscrowAddressRequest { - // unique port identifier - string port_id = 1; - // unique channel identifier - string channel_id = 2; -} - -// QueryEscrowAddressResponse is the response type of the EscrowAddress RPC method. -message QueryEscrowAddressResponse { - // the escrow account address - string escrow_address = 1; -} \ No newline at end of file diff --git a/ampd/proto/third_party/ibc/applications/transfer/v1/transfer.proto b/ampd/proto/third_party/ibc/applications/transfer/v1/transfer.proto deleted file mode 100644 index 1f92e81a6..000000000 --- a/ampd/proto/third_party/ibc/applications/transfer/v1/transfer.proto +++ /dev/null @@ -1,30 +0,0 @@ -syntax = "proto3"; - -package ibc.applications.transfer.v1; - -option go_package = "github.com/cosmos/ibc-go/v4/modules/apps/transfer/types"; - -import "gogoproto/gogo.proto"; - -// DenomTrace contains the base denomination for ICS20 fungible tokens and the -// source tracing information path. -message DenomTrace { - // path defines the chain of port/channel identifiers used for tracing the - // source of the fungible token. - string path = 1; - // base denomination of the relayed fungible token. - string base_denom = 2; -} - -// Params defines the set of IBC transfer parameters. -// NOTE: To prevent a single token from being transferred, set the -// TransfersEnabled parameter to true and then set the bank module's SendEnabled -// parameter for the denomination to false. -message Params { - // send_enabled enables or disables all cross-chain token transfers from this - // chain. - bool send_enabled = 1 [(gogoproto.moretags) = "yaml:\"send_enabled\""]; - // receive_enabled enables or disables all cross-chain token transfers to this - // chain. - bool receive_enabled = 2 [(gogoproto.moretags) = "yaml:\"receive_enabled\""]; -} diff --git a/ampd/proto/third_party/ibc/applications/transfer/v1/tx.proto b/ampd/proto/third_party/ibc/applications/transfer/v1/tx.proto deleted file mode 100644 index 44e068d69..000000000 --- a/ampd/proto/third_party/ibc/applications/transfer/v1/tx.proto +++ /dev/null @@ -1,49 +0,0 @@ -syntax = "proto3"; - -package ibc.applications.transfer.v1; - -option go_package = "github.com/cosmos/ibc-go/v4/modules/apps/transfer/types"; - -import "gogoproto/gogo.proto"; -import "cosmos/base/v1beta1/coin.proto"; -import "ibc/core/client/v1/client.proto"; - -// Msg defines the ibc/transfer Msg service. -service Msg { - // Transfer defines a rpc handler method for MsgTransfer. - rpc Transfer(MsgTransfer) returns (MsgTransferResponse); -} - -// MsgTransfer defines a msg to transfer fungible tokens (i.e Coins) between -// ICS20 enabled chains. See ICS Spec here: -// https://github.com/cosmos/ibc/tree/master/spec/app/ics-020-fungible-token-transfer#data-structures -message MsgTransfer { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // the port on which the packet will be sent - string source_port = 1 [(gogoproto.moretags) = "yaml:\"source_port\""]; - // the channel by which the packet will be sent - string source_channel = 2 [(gogoproto.moretags) = "yaml:\"source_channel\""]; - // the tokens to be transferred - cosmos.base.v1beta1.Coin token = 3 [(gogoproto.nullable) = false]; - // the sender address - string sender = 4; - // the recipient address on the destination chain - string receiver = 5; - // Timeout height relative to the current block height. - // The timeout is disabled when set to 0. - ibc.core.client.v1.Height timeout_height = 6 - [(gogoproto.moretags) = "yaml:\"timeout_height\"", (gogoproto.nullable) = false]; - // Timeout timestamp in absolute nanoseconds since unix epoch. - // The timeout is disabled when set to 0. - uint64 timeout_timestamp = 7 [(gogoproto.moretags) = "yaml:\"timeout_timestamp\""]; - // optional memo - string memo = 8; -} - -// MsgTransferResponse defines the Msg/Transfer response type. -message MsgTransferResponse { - // sequence number of the transfer packet sent - uint64 sequence = 1; -} diff --git a/ampd/proto/third_party/ibc/applications/transfer/v2/packet.proto b/ampd/proto/third_party/ibc/applications/transfer/v2/packet.proto deleted file mode 100644 index 129815ebc..000000000 --- a/ampd/proto/third_party/ibc/applications/transfer/v2/packet.proto +++ /dev/null @@ -1,21 +0,0 @@ -syntax = "proto3"; - -package ibc.applications.transfer.v2; - -option go_package = "github.com/cosmos/ibc-go/v4/modules/apps/transfer/types"; - -// FungibleTokenPacketData defines a struct for the packet payload -// See FungibleTokenPacketData spec: -// https://github.com/cosmos/ibc/tree/master/spec/app/ics-020-fungible-token-transfer#data-structures -message FungibleTokenPacketData { - // the token denomination to be transferred - string denom = 1; - // the token amount to be transferred - string amount = 2; - // the sender address - string sender = 3; - // the recipient address on the destination chain - string receiver = 4; - // optional memo - string memo = 5; -} diff --git a/ampd/proto/third_party/ibc/core/channel/v1/channel.proto b/ampd/proto/third_party/ibc/core/channel/v1/channel.proto deleted file mode 100644 index 646884d57..000000000 --- a/ampd/proto/third_party/ibc/core/channel/v1/channel.proto +++ /dev/null @@ -1,162 +0,0 @@ -syntax = "proto3"; - -package ibc.core.channel.v1; - -option go_package = "github.com/cosmos/ibc-go/v4/modules/core/04-channel/types"; - -import "gogoproto/gogo.proto"; -import "ibc/core/client/v1/client.proto"; - -// Channel defines pipeline for exactly-once packet delivery between specific -// modules on separate blockchains, which has at least one end capable of -// sending packets and one end capable of receiving packets. -message Channel { - option (gogoproto.goproto_getters) = false; - - // current state of the channel end - State state = 1; - // whether the channel is ordered or unordered - Order ordering = 2; - // counterparty channel end - Counterparty counterparty = 3 [(gogoproto.nullable) = false]; - // list of connection identifiers, in order, along which packets sent on - // this channel will travel - repeated string connection_hops = 4 [(gogoproto.moretags) = "yaml:\"connection_hops\""]; - // opaque channel version, which is agreed upon during the handshake - string version = 5; -} - -// IdentifiedChannel defines a channel with additional port and channel -// identifier fields. -message IdentifiedChannel { - option (gogoproto.goproto_getters) = false; - - // current state of the channel end - State state = 1; - // whether the channel is ordered or unordered - Order ordering = 2; - // counterparty channel end - Counterparty counterparty = 3 [(gogoproto.nullable) = false]; - // list of connection identifiers, in order, along which packets sent on - // this channel will travel - repeated string connection_hops = 4 [(gogoproto.moretags) = "yaml:\"connection_hops\""]; - // opaque channel version, which is agreed upon during the handshake - string version = 5; - // port identifier - string port_id = 6; - // channel identifier - string channel_id = 7; -} - -// State defines if a channel is in one of the following states: -// CLOSED, INIT, TRYOPEN, OPEN or UNINITIALIZED. -enum State { - option (gogoproto.goproto_enum_prefix) = false; - - // Default State - STATE_UNINITIALIZED_UNSPECIFIED = 0 [(gogoproto.enumvalue_customname) = "UNINITIALIZED"]; - // A channel has just started the opening handshake. - STATE_INIT = 1 [(gogoproto.enumvalue_customname) = "INIT"]; - // A channel has acknowledged the handshake step on the counterparty chain. - STATE_TRYOPEN = 2 [(gogoproto.enumvalue_customname) = "TRYOPEN"]; - // A channel has completed the handshake. Open channels are - // ready to send and receive packets. - STATE_OPEN = 3 [(gogoproto.enumvalue_customname) = "OPEN"]; - // A channel has been closed and can no longer be used to send or receive - // packets. - STATE_CLOSED = 4 [(gogoproto.enumvalue_customname) = "CLOSED"]; -} - -// Order defines if a channel is ORDERED or UNORDERED -enum Order { - option (gogoproto.goproto_enum_prefix) = false; - - // zero-value for channel ordering - ORDER_NONE_UNSPECIFIED = 0 [(gogoproto.enumvalue_customname) = "NONE"]; - // packets can be delivered in any order, which may differ from the order in - // which they were sent. - ORDER_UNORDERED = 1 [(gogoproto.enumvalue_customname) = "UNORDERED"]; - // packets are delivered exactly in the order which they were sent - ORDER_ORDERED = 2 [(gogoproto.enumvalue_customname) = "ORDERED"]; -} - -// Counterparty defines a channel end counterparty -message Counterparty { - option (gogoproto.goproto_getters) = false; - - // port on the counterparty chain which owns the other end of the channel. - string port_id = 1 [(gogoproto.moretags) = "yaml:\"port_id\""]; - // channel end on the counterparty chain - string channel_id = 2 [(gogoproto.moretags) = "yaml:\"channel_id\""]; -} - -// Packet defines a type that carries data across different chains through IBC -message Packet { - option (gogoproto.goproto_getters) = false; - - // number corresponds to the order of sends and receives, where a Packet - // with an earlier sequence number must be sent and received before a Packet - // with a later sequence number. - uint64 sequence = 1; - // identifies the port on the sending chain. - string source_port = 2 [(gogoproto.moretags) = "yaml:\"source_port\""]; - // identifies the channel end on the sending chain. - string source_channel = 3 [(gogoproto.moretags) = "yaml:\"source_channel\""]; - // identifies the port on the receiving chain. - string destination_port = 4 [(gogoproto.moretags) = "yaml:\"destination_port\""]; - // identifies the channel end on the receiving chain. - string destination_channel = 5 [(gogoproto.moretags) = "yaml:\"destination_channel\""]; - // actual opaque bytes transferred directly to the application module - bytes data = 6; - // block height after which the packet times out - ibc.core.client.v1.Height timeout_height = 7 - [(gogoproto.moretags) = "yaml:\"timeout_height\"", (gogoproto.nullable) = false]; - // block timestamp (in nanoseconds) after which the packet times out - uint64 timeout_timestamp = 8 [(gogoproto.moretags) = "yaml:\"timeout_timestamp\""]; -} - -// PacketState defines the generic type necessary to retrieve and store -// packet commitments, acknowledgements, and receipts. -// Caller is responsible for knowing the context necessary to interpret this -// state as a commitment, acknowledgement, or a receipt. -message PacketState { - option (gogoproto.goproto_getters) = false; - - // channel port identifier. - string port_id = 1 [(gogoproto.moretags) = "yaml:\"port_id\""]; - // channel unique identifier. - string channel_id = 2 [(gogoproto.moretags) = "yaml:\"channel_id\""]; - // packet sequence. - uint64 sequence = 3; - // embedded data that represents packet state. - bytes data = 4; -} - -// PacketId is an identifer for a unique Packet -// Source chains refer to packets by source port/channel -// Destination chains refer to packets by destination port/channel -message PacketId { - option (gogoproto.goproto_getters) = false; - - // channel port identifier - string port_id = 1 [(gogoproto.moretags) = "yaml:\"port_id\""]; - // channel unique identifier - string channel_id = 2 [(gogoproto.moretags) = "yaml:\"channel_id\""]; - // packet sequence - uint64 sequence = 3; -} - -// Acknowledgement is the recommended acknowledgement format to be used by -// app-specific protocols. -// NOTE: The field numbers 21 and 22 were explicitly chosen to avoid accidental -// conflicts with other protobuf message formats used for acknowledgements. -// The first byte of any message with this format will be the non-ASCII values -// `0xaa` (result) or `0xb2` (error). Implemented as defined by ICS: -// https://github.com/cosmos/ibc/tree/master/spec/core/ics-004-channel-and-packet-semantics#acknowledgement-envelope -message Acknowledgement { - // response contains either a result or an error and must be non-empty - oneof response { - bytes result = 21; - string error = 22; - } -} diff --git a/ampd/proto/third_party/ibc/core/channel/v1/genesis.proto b/ampd/proto/third_party/ibc/core/channel/v1/genesis.proto deleted file mode 100644 index 1c0ff6ee8..000000000 --- a/ampd/proto/third_party/ibc/core/channel/v1/genesis.proto +++ /dev/null @@ -1,32 +0,0 @@ -syntax = "proto3"; - -package ibc.core.channel.v1; - -option go_package = "github.com/cosmos/ibc-go/v4/modules/core/04-channel/types"; - -import "gogoproto/gogo.proto"; -import "ibc/core/channel/v1/channel.proto"; - -// GenesisState defines the ibc channel submodule's genesis state. -message GenesisState { - repeated IdentifiedChannel channels = 1 [(gogoproto.casttype) = "IdentifiedChannel", (gogoproto.nullable) = false]; - repeated PacketState acknowledgements = 2 [(gogoproto.nullable) = false]; - repeated PacketState commitments = 3 [(gogoproto.nullable) = false]; - repeated PacketState receipts = 4 [(gogoproto.nullable) = false]; - repeated PacketSequence send_sequences = 5 - [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"send_sequences\""]; - repeated PacketSequence recv_sequences = 6 - [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"recv_sequences\""]; - repeated PacketSequence ack_sequences = 7 - [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"ack_sequences\""]; - // the sequence for the next generated channel identifier - uint64 next_channel_sequence = 8 [(gogoproto.moretags) = "yaml:\"next_channel_sequence\""]; -} - -// PacketSequence defines the genesis type necessary to retrieve and store -// next send and receive sequences. -message PacketSequence { - string port_id = 1 [(gogoproto.moretags) = "yaml:\"port_id\""]; - string channel_id = 2 [(gogoproto.moretags) = "yaml:\"channel_id\""]; - uint64 sequence = 3; -} diff --git a/ampd/proto/third_party/ibc/core/channel/v1/query.proto b/ampd/proto/third_party/ibc/core/channel/v1/query.proto deleted file mode 100644 index 986633173..000000000 --- a/ampd/proto/third_party/ibc/core/channel/v1/query.proto +++ /dev/null @@ -1,376 +0,0 @@ -syntax = "proto3"; - -package ibc.core.channel.v1; - -option go_package = "github.com/cosmos/ibc-go/v4/modules/core/04-channel/types"; - -import "ibc/core/client/v1/client.proto"; -import "cosmos/base/query/v1beta1/pagination.proto"; -import "ibc/core/channel/v1/channel.proto"; -import "google/api/annotations.proto"; -import "google/protobuf/any.proto"; -import "gogoproto/gogo.proto"; - -// Query provides defines the gRPC querier service -service Query { - // Channel queries an IBC Channel. - rpc Channel(QueryChannelRequest) returns (QueryChannelResponse) { - option (google.api.http).get = "/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}"; - } - - // Channels queries all the IBC channels of a chain. - rpc Channels(QueryChannelsRequest) returns (QueryChannelsResponse) { - option (google.api.http).get = "/ibc/core/channel/v1/channels"; - } - - // ConnectionChannels queries all the channels associated with a connection - // end. - rpc ConnectionChannels(QueryConnectionChannelsRequest) returns (QueryConnectionChannelsResponse) { - option (google.api.http).get = "/ibc/core/channel/v1/connections/{connection}/channels"; - } - - // ChannelClientState queries for the client state for the channel associated - // with the provided channel identifiers. - rpc ChannelClientState(QueryChannelClientStateRequest) returns (QueryChannelClientStateResponse) { - option (google.api.http).get = "/ibc/core/channel/v1/channels/{channel_id}/" - "ports/{port_id}/client_state"; - } - - // ChannelConsensusState queries for the consensus state for the channel - // associated with the provided channel identifiers. - rpc ChannelConsensusState(QueryChannelConsensusStateRequest) returns (QueryChannelConsensusStateResponse) { - option (google.api.http).get = "/ibc/core/channel/v1/channels/{channel_id}/" - "ports/{port_id}/consensus_state/revision/" - "{revision_number}/height/{revision_height}"; - } - - // PacketCommitment queries a stored packet commitment hash. - rpc PacketCommitment(QueryPacketCommitmentRequest) returns (QueryPacketCommitmentResponse) { - option (google.api.http).get = "/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/" - "packet_commitments/{sequence}"; - } - - // PacketCommitments returns all the packet commitments hashes associated - // with a channel. - rpc PacketCommitments(QueryPacketCommitmentsRequest) returns (QueryPacketCommitmentsResponse) { - option (google.api.http).get = "/ibc/core/channel/v1/channels/{channel_id}/" - "ports/{port_id}/packet_commitments"; - } - - // PacketReceipt queries if a given packet sequence has been received on the - // queried chain - rpc PacketReceipt(QueryPacketReceiptRequest) returns (QueryPacketReceiptResponse) { - option (google.api.http).get = "/ibc/core/channel/v1/channels/{channel_id}/" - "ports/{port_id}/packet_receipts/{sequence}"; - } - - // PacketAcknowledgement queries a stored packet acknowledgement hash. - rpc PacketAcknowledgement(QueryPacketAcknowledgementRequest) returns (QueryPacketAcknowledgementResponse) { - option (google.api.http).get = "/ibc/core/channel/v1/channels/{channel_id}/" - "ports/{port_id}/packet_acks/{sequence}"; - } - - // PacketAcknowledgements returns all the packet acknowledgements associated - // with a channel. - rpc PacketAcknowledgements(QueryPacketAcknowledgementsRequest) returns (QueryPacketAcknowledgementsResponse) { - option (google.api.http).get = "/ibc/core/channel/v1/channels/{channel_id}/" - "ports/{port_id}/packet_acknowledgements"; - } - - // UnreceivedPackets returns all the unreceived IBC packets associated with a - // channel and sequences. - rpc UnreceivedPackets(QueryUnreceivedPacketsRequest) returns (QueryUnreceivedPacketsResponse) { - option (google.api.http).get = "/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/" - "packet_commitments/" - "{packet_commitment_sequences}/unreceived_packets"; - } - - // UnreceivedAcks returns all the unreceived IBC acknowledgements associated - // with a channel and sequences. - rpc UnreceivedAcks(QueryUnreceivedAcksRequest) returns (QueryUnreceivedAcksResponse) { - option (google.api.http).get = "/ibc/core/channel/v1/channels/{channel_id}/" - "ports/{port_id}/packet_commitments/" - "{packet_ack_sequences}/unreceived_acks"; - } - - // NextSequenceReceive returns the next receive sequence for a given channel. - rpc NextSequenceReceive(QueryNextSequenceReceiveRequest) returns (QueryNextSequenceReceiveResponse) { - option (google.api.http).get = "/ibc/core/channel/v1/channels/{channel_id}/" - "ports/{port_id}/next_sequence"; - } -} - -// QueryChannelRequest is the request type for the Query/Channel RPC method -message QueryChannelRequest { - // port unique identifier - string port_id = 1; - // channel unique identifier - string channel_id = 2; -} - -// QueryChannelResponse is the response type for the Query/Channel RPC method. -// Besides the Channel end, it includes a proof and the height from which the -// proof was retrieved. -message QueryChannelResponse { - // channel associated with the request identifiers - ibc.core.channel.v1.Channel channel = 1; - // merkle proof of existence - bytes proof = 2; - // height at which the proof was retrieved - ibc.core.client.v1.Height proof_height = 3 [(gogoproto.nullable) = false]; -} - -// QueryChannelsRequest is the request type for the Query/Channels RPC method -message QueryChannelsRequest { - // pagination request - cosmos.base.query.v1beta1.PageRequest pagination = 1; -} - -// QueryChannelsResponse is the response type for the Query/Channels RPC method. -message QueryChannelsResponse { - // list of stored channels of the chain. - repeated ibc.core.channel.v1.IdentifiedChannel channels = 1; - // pagination response - cosmos.base.query.v1beta1.PageResponse pagination = 2; - // query block height - ibc.core.client.v1.Height height = 3 [(gogoproto.nullable) = false]; -} - -// QueryConnectionChannelsRequest is the request type for the -// Query/QueryConnectionChannels RPC method -message QueryConnectionChannelsRequest { - // connection unique identifier - string connection = 1; - // pagination request - cosmos.base.query.v1beta1.PageRequest pagination = 2; -} - -// QueryConnectionChannelsResponse is the Response type for the -// Query/QueryConnectionChannels RPC method -message QueryConnectionChannelsResponse { - // list of channels associated with a connection. - repeated ibc.core.channel.v1.IdentifiedChannel channels = 1; - // pagination response - cosmos.base.query.v1beta1.PageResponse pagination = 2; - // query block height - ibc.core.client.v1.Height height = 3 [(gogoproto.nullable) = false]; -} - -// QueryChannelClientStateRequest is the request type for the Query/ClientState -// RPC method -message QueryChannelClientStateRequest { - // port unique identifier - string port_id = 1; - // channel unique identifier - string channel_id = 2; -} - -// QueryChannelClientStateResponse is the Response type for the -// Query/QueryChannelClientState RPC method -message QueryChannelClientStateResponse { - // client state associated with the channel - ibc.core.client.v1.IdentifiedClientState identified_client_state = 1; - // merkle proof of existence - bytes proof = 2; - // height at which the proof was retrieved - ibc.core.client.v1.Height proof_height = 3 [(gogoproto.nullable) = false]; -} - -// QueryChannelConsensusStateRequest is the request type for the -// Query/ConsensusState RPC method -message QueryChannelConsensusStateRequest { - // port unique identifier - string port_id = 1; - // channel unique identifier - string channel_id = 2; - // revision number of the consensus state - uint64 revision_number = 3; - // revision height of the consensus state - uint64 revision_height = 4; -} - -// QueryChannelClientStateResponse is the Response type for the -// Query/QueryChannelClientState RPC method -message QueryChannelConsensusStateResponse { - // consensus state associated with the channel - google.protobuf.Any consensus_state = 1; - // client ID associated with the consensus state - string client_id = 2; - // merkle proof of existence - bytes proof = 3; - // height at which the proof was retrieved - ibc.core.client.v1.Height proof_height = 4 [(gogoproto.nullable) = false]; -} - -// QueryPacketCommitmentRequest is the request type for the -// Query/PacketCommitment RPC method -message QueryPacketCommitmentRequest { - // port unique identifier - string port_id = 1; - // channel unique identifier - string channel_id = 2; - // packet sequence - uint64 sequence = 3; -} - -// QueryPacketCommitmentResponse defines the client query response for a packet -// which also includes a proof and the height from which the proof was -// retrieved -message QueryPacketCommitmentResponse { - // packet associated with the request fields - bytes commitment = 1; - // merkle proof of existence - bytes proof = 2; - // height at which the proof was retrieved - ibc.core.client.v1.Height proof_height = 3 [(gogoproto.nullable) = false]; -} - -// QueryPacketCommitmentsRequest is the request type for the -// Query/QueryPacketCommitments RPC method -message QueryPacketCommitmentsRequest { - // port unique identifier - string port_id = 1; - // channel unique identifier - string channel_id = 2; - // pagination request - cosmos.base.query.v1beta1.PageRequest pagination = 3; -} - -// QueryPacketCommitmentsResponse is the request type for the -// Query/QueryPacketCommitments RPC method -message QueryPacketCommitmentsResponse { - repeated ibc.core.channel.v1.PacketState commitments = 1; - // pagination response - cosmos.base.query.v1beta1.PageResponse pagination = 2; - // query block height - ibc.core.client.v1.Height height = 3 [(gogoproto.nullable) = false]; -} - -// QueryPacketReceiptRequest is the request type for the -// Query/PacketReceipt RPC method -message QueryPacketReceiptRequest { - // port unique identifier - string port_id = 1; - // channel unique identifier - string channel_id = 2; - // packet sequence - uint64 sequence = 3; -} - -// QueryPacketReceiptResponse defines the client query response for a packet -// receipt which also includes a proof, and the height from which the proof was -// retrieved -message QueryPacketReceiptResponse { - // success flag for if receipt exists - bool received = 2; - // merkle proof of existence - bytes proof = 3; - // height at which the proof was retrieved - ibc.core.client.v1.Height proof_height = 4 [(gogoproto.nullable) = false]; -} - -// QueryPacketAcknowledgementRequest is the request type for the -// Query/PacketAcknowledgement RPC method -message QueryPacketAcknowledgementRequest { - // port unique identifier - string port_id = 1; - // channel unique identifier - string channel_id = 2; - // packet sequence - uint64 sequence = 3; -} - -// QueryPacketAcknowledgementResponse defines the client query response for a -// packet which also includes a proof and the height from which the -// proof was retrieved -message QueryPacketAcknowledgementResponse { - // packet associated with the request fields - bytes acknowledgement = 1; - // merkle proof of existence - bytes proof = 2; - // height at which the proof was retrieved - ibc.core.client.v1.Height proof_height = 3 [(gogoproto.nullable) = false]; -} - -// QueryPacketAcknowledgementsRequest is the request type for the -// Query/QueryPacketCommitments RPC method -message QueryPacketAcknowledgementsRequest { - // port unique identifier - string port_id = 1; - // channel unique identifier - string channel_id = 2; - // pagination request - cosmos.base.query.v1beta1.PageRequest pagination = 3; - // list of packet sequences - repeated uint64 packet_commitment_sequences = 4; -} - -// QueryPacketAcknowledgemetsResponse is the request type for the -// Query/QueryPacketAcknowledgements RPC method -message QueryPacketAcknowledgementsResponse { - repeated ibc.core.channel.v1.PacketState acknowledgements = 1; - // pagination response - cosmos.base.query.v1beta1.PageResponse pagination = 2; - // query block height - ibc.core.client.v1.Height height = 3 [(gogoproto.nullable) = false]; -} - -// QueryUnreceivedPacketsRequest is the request type for the -// Query/UnreceivedPackets RPC method -message QueryUnreceivedPacketsRequest { - // port unique identifier - string port_id = 1; - // channel unique identifier - string channel_id = 2; - // list of packet sequences - repeated uint64 packet_commitment_sequences = 3; -} - -// QueryUnreceivedPacketsResponse is the response type for the -// Query/UnreceivedPacketCommitments RPC method -message QueryUnreceivedPacketsResponse { - // list of unreceived packet sequences - repeated uint64 sequences = 1; - // query block height - ibc.core.client.v1.Height height = 2 [(gogoproto.nullable) = false]; -} - -// QueryUnreceivedAcks is the request type for the -// Query/UnreceivedAcks RPC method -message QueryUnreceivedAcksRequest { - // port unique identifier - string port_id = 1; - // channel unique identifier - string channel_id = 2; - // list of acknowledgement sequences - repeated uint64 packet_ack_sequences = 3; -} - -// QueryUnreceivedAcksResponse is the response type for the -// Query/UnreceivedAcks RPC method -message QueryUnreceivedAcksResponse { - // list of unreceived acknowledgement sequences - repeated uint64 sequences = 1; - // query block height - ibc.core.client.v1.Height height = 2 [(gogoproto.nullable) = false]; -} - -// QueryNextSequenceReceiveRequest is the request type for the -// Query/QueryNextSequenceReceiveRequest RPC method -message QueryNextSequenceReceiveRequest { - // port unique identifier - string port_id = 1; - // channel unique identifier - string channel_id = 2; -} - -// QuerySequenceResponse is the request type for the -// Query/QueryNextSequenceReceiveResponse RPC method -message QueryNextSequenceReceiveResponse { - // next sequence receive number - uint64 next_sequence_receive = 1; - // merkle proof of existence - bytes proof = 2; - // height at which the proof was retrieved - ibc.core.client.v1.Height proof_height = 3 [(gogoproto.nullable) = false]; -} diff --git a/ampd/proto/third_party/ibc/core/channel/v1/tx.proto b/ampd/proto/third_party/ibc/core/channel/v1/tx.proto deleted file mode 100644 index 75248aeb5..000000000 --- a/ampd/proto/third_party/ibc/core/channel/v1/tx.proto +++ /dev/null @@ -1,245 +0,0 @@ -syntax = "proto3"; - -package ibc.core.channel.v1; - -option go_package = "github.com/cosmos/ibc-go/v4/modules/core/04-channel/types"; - -import "gogoproto/gogo.proto"; -import "ibc/core/client/v1/client.proto"; -import "ibc/core/channel/v1/channel.proto"; - -// Msg defines the ibc/channel Msg service. -service Msg { - // ChannelOpenInit defines a rpc handler method for MsgChannelOpenInit. - rpc ChannelOpenInit(MsgChannelOpenInit) returns (MsgChannelOpenInitResponse); - - // ChannelOpenTry defines a rpc handler method for MsgChannelOpenTry. - rpc ChannelOpenTry(MsgChannelOpenTry) returns (MsgChannelOpenTryResponse); - - // ChannelOpenAck defines a rpc handler method for MsgChannelOpenAck. - rpc ChannelOpenAck(MsgChannelOpenAck) returns (MsgChannelOpenAckResponse); - - // ChannelOpenConfirm defines a rpc handler method for MsgChannelOpenConfirm. - rpc ChannelOpenConfirm(MsgChannelOpenConfirm) returns (MsgChannelOpenConfirmResponse); - - // ChannelCloseInit defines a rpc handler method for MsgChannelCloseInit. - rpc ChannelCloseInit(MsgChannelCloseInit) returns (MsgChannelCloseInitResponse); - - // ChannelCloseConfirm defines a rpc handler method for - // MsgChannelCloseConfirm. - rpc ChannelCloseConfirm(MsgChannelCloseConfirm) returns (MsgChannelCloseConfirmResponse); - - // RecvPacket defines a rpc handler method for MsgRecvPacket. - rpc RecvPacket(MsgRecvPacket) returns (MsgRecvPacketResponse); - - // Timeout defines a rpc handler method for MsgTimeout. - rpc Timeout(MsgTimeout) returns (MsgTimeoutResponse); - - // TimeoutOnClose defines a rpc handler method for MsgTimeoutOnClose. - rpc TimeoutOnClose(MsgTimeoutOnClose) returns (MsgTimeoutOnCloseResponse); - - // Acknowledgement defines a rpc handler method for MsgAcknowledgement. - rpc Acknowledgement(MsgAcknowledgement) returns (MsgAcknowledgementResponse); -} - -// ResponseResultType defines the possible outcomes of the execution of a message -enum ResponseResultType { - option (gogoproto.goproto_enum_prefix) = false; - - // Default zero value enumeration - RESPONSE_RESULT_TYPE_UNSPECIFIED = 0 [(gogoproto.enumvalue_customname) = "UNSPECIFIED"]; - // The message did not call the IBC application callbacks (because, for example, the packet had already been relayed) - RESPONSE_RESULT_TYPE_NOOP = 1 [(gogoproto.enumvalue_customname) = "NOOP"]; - // The message was executed successfully - RESPONSE_RESULT_TYPE_SUCCESS = 2 [(gogoproto.enumvalue_customname) = "SUCCESS"]; -} - -// MsgChannelOpenInit defines an sdk.Msg to initialize a channel handshake. It -// is called by a relayer on Chain A. -message MsgChannelOpenInit { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - string port_id = 1 [(gogoproto.moretags) = "yaml:\"port_id\""]; - Channel channel = 2 [(gogoproto.nullable) = false]; - string signer = 3; -} - -// MsgChannelOpenInitResponse defines the Msg/ChannelOpenInit response type. -message MsgChannelOpenInitResponse { - string channel_id = 1 [(gogoproto.moretags) = "yaml:\"channel_id\""]; - string version = 2; -} - -// MsgChannelOpenInit defines a msg sent by a Relayer to try to open a channel -// on Chain B. The version field within the Channel field has been deprecated. Its -// value will be ignored by core IBC. -message MsgChannelOpenTry { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - string port_id = 1 [(gogoproto.moretags) = "yaml:\"port_id\""]; - // Deprecated: this field is unused. Crossing hello's are no longer supported in core IBC. - string previous_channel_id = 2 [deprecated = true, (gogoproto.moretags) = "yaml:\"previous_channel_id\""]; - // NOTE: the version field within the channel has been deprecated. Its value will be ignored by core IBC. - Channel channel = 3 [(gogoproto.nullable) = false]; - string counterparty_version = 4 [(gogoproto.moretags) = "yaml:\"counterparty_version\""]; - bytes proof_init = 5 [(gogoproto.moretags) = "yaml:\"proof_init\""]; - ibc.core.client.v1.Height proof_height = 6 - [(gogoproto.moretags) = "yaml:\"proof_height\"", (gogoproto.nullable) = false]; - string signer = 7; -} - -// MsgChannelOpenTryResponse defines the Msg/ChannelOpenTry response type. -message MsgChannelOpenTryResponse { - string version = 1; -} - -// MsgChannelOpenAck defines a msg sent by a Relayer to Chain A to acknowledge -// the change of channel state to TRYOPEN on Chain B. -message MsgChannelOpenAck { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - string port_id = 1 [(gogoproto.moretags) = "yaml:\"port_id\""]; - string channel_id = 2 [(gogoproto.moretags) = "yaml:\"channel_id\""]; - string counterparty_channel_id = 3 [(gogoproto.moretags) = "yaml:\"counterparty_channel_id\""]; - string counterparty_version = 4 [(gogoproto.moretags) = "yaml:\"counterparty_version\""]; - bytes proof_try = 5 [(gogoproto.moretags) = "yaml:\"proof_try\""]; - ibc.core.client.v1.Height proof_height = 6 - [(gogoproto.moretags) = "yaml:\"proof_height\"", (gogoproto.nullable) = false]; - string signer = 7; -} - -// MsgChannelOpenAckResponse defines the Msg/ChannelOpenAck response type. -message MsgChannelOpenAckResponse {} - -// MsgChannelOpenConfirm defines a msg sent by a Relayer to Chain B to -// acknowledge the change of channel state to OPEN on Chain A. -message MsgChannelOpenConfirm { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - string port_id = 1 [(gogoproto.moretags) = "yaml:\"port_id\""]; - string channel_id = 2 [(gogoproto.moretags) = "yaml:\"channel_id\""]; - bytes proof_ack = 3 [(gogoproto.moretags) = "yaml:\"proof_ack\""]; - ibc.core.client.v1.Height proof_height = 4 - [(gogoproto.moretags) = "yaml:\"proof_height\"", (gogoproto.nullable) = false]; - string signer = 5; -} - -// MsgChannelOpenConfirmResponse defines the Msg/ChannelOpenConfirm response -// type. -message MsgChannelOpenConfirmResponse {} - -// MsgChannelCloseInit defines a msg sent by a Relayer to Chain A -// to close a channel with Chain B. -message MsgChannelCloseInit { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - string port_id = 1 [(gogoproto.moretags) = "yaml:\"port_id\""]; - string channel_id = 2 [(gogoproto.moretags) = "yaml:\"channel_id\""]; - string signer = 3; -} - -// MsgChannelCloseInitResponse defines the Msg/ChannelCloseInit response type. -message MsgChannelCloseInitResponse {} - -// MsgChannelCloseConfirm defines a msg sent by a Relayer to Chain B -// to acknowledge the change of channel state to CLOSED on Chain A. -message MsgChannelCloseConfirm { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - string port_id = 1 [(gogoproto.moretags) = "yaml:\"port_id\""]; - string channel_id = 2 [(gogoproto.moretags) = "yaml:\"channel_id\""]; - bytes proof_init = 3 [(gogoproto.moretags) = "yaml:\"proof_init\""]; - ibc.core.client.v1.Height proof_height = 4 - [(gogoproto.moretags) = "yaml:\"proof_height\"", (gogoproto.nullable) = false]; - string signer = 5; -} - -// MsgChannelCloseConfirmResponse defines the Msg/ChannelCloseConfirm response -// type. -message MsgChannelCloseConfirmResponse {} - -// MsgRecvPacket receives incoming IBC packet -message MsgRecvPacket { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - Packet packet = 1 [(gogoproto.nullable) = false]; - bytes proof_commitment = 2 [(gogoproto.moretags) = "yaml:\"proof_commitment\""]; - ibc.core.client.v1.Height proof_height = 3 - [(gogoproto.moretags) = "yaml:\"proof_height\"", (gogoproto.nullable) = false]; - string signer = 4; -} - -// MsgRecvPacketResponse defines the Msg/RecvPacket response type. -message MsgRecvPacketResponse { - option (gogoproto.goproto_getters) = false; - - ResponseResultType result = 1; -} - -// MsgTimeout receives timed-out packet -message MsgTimeout { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - Packet packet = 1 [(gogoproto.nullable) = false]; - bytes proof_unreceived = 2 [(gogoproto.moretags) = "yaml:\"proof_unreceived\""]; - ibc.core.client.v1.Height proof_height = 3 - [(gogoproto.moretags) = "yaml:\"proof_height\"", (gogoproto.nullable) = false]; - uint64 next_sequence_recv = 4 [(gogoproto.moretags) = "yaml:\"next_sequence_recv\""]; - string signer = 5; -} - -// MsgTimeoutResponse defines the Msg/Timeout response type. -message MsgTimeoutResponse { - option (gogoproto.goproto_getters) = false; - - ResponseResultType result = 1; -} - -// MsgTimeoutOnClose timed-out packet upon counterparty channel closure. -message MsgTimeoutOnClose { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - Packet packet = 1 [(gogoproto.nullable) = false]; - bytes proof_unreceived = 2 [(gogoproto.moretags) = "yaml:\"proof_unreceived\""]; - bytes proof_close = 3 [(gogoproto.moretags) = "yaml:\"proof_close\""]; - ibc.core.client.v1.Height proof_height = 4 - [(gogoproto.moretags) = "yaml:\"proof_height\"", (gogoproto.nullable) = false]; - uint64 next_sequence_recv = 5 [(gogoproto.moretags) = "yaml:\"next_sequence_recv\""]; - string signer = 6; -} - -// MsgTimeoutOnCloseResponse defines the Msg/TimeoutOnClose response type. -message MsgTimeoutOnCloseResponse { - option (gogoproto.goproto_getters) = false; - - ResponseResultType result = 1; -} - -// MsgAcknowledgement receives incoming IBC acknowledgement -message MsgAcknowledgement { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - Packet packet = 1 [(gogoproto.nullable) = false]; - bytes acknowledgement = 2; - bytes proof_acked = 3 [(gogoproto.moretags) = "yaml:\"proof_acked\""]; - ibc.core.client.v1.Height proof_height = 4 - [(gogoproto.moretags) = "yaml:\"proof_height\"", (gogoproto.nullable) = false]; - string signer = 5; -} - -// MsgAcknowledgementResponse defines the Msg/Acknowledgement response type. -message MsgAcknowledgementResponse { - option (gogoproto.goproto_getters) = false; - - ResponseResultType result = 1; -} diff --git a/ampd/proto/third_party/ibc/core/client/v1/client.proto b/ampd/proto/third_party/ibc/core/client/v1/client.proto deleted file mode 100644 index 2ec41ed0c..000000000 --- a/ampd/proto/third_party/ibc/core/client/v1/client.proto +++ /dev/null @@ -1,103 +0,0 @@ -syntax = "proto3"; - -package ibc.core.client.v1; - -option go_package = "github.com/cosmos/ibc-go/v4/modules/core/02-client/types"; - -import "gogoproto/gogo.proto"; -import "google/protobuf/any.proto"; -import "cosmos/upgrade/v1beta1/upgrade.proto"; -import "cosmos_proto/cosmos.proto"; - -// IdentifiedClientState defines a client state with an additional client -// identifier field. -message IdentifiedClientState { - // client identifier - string client_id = 1 [(gogoproto.moretags) = "yaml:\"client_id\""]; - // client state - google.protobuf.Any client_state = 2 [(gogoproto.moretags) = "yaml:\"client_state\""]; -} - -// ConsensusStateWithHeight defines a consensus state with an additional height -// field. -message ConsensusStateWithHeight { - // consensus state height - Height height = 1 [(gogoproto.nullable) = false]; - // consensus state - google.protobuf.Any consensus_state = 2 [(gogoproto.moretags) = "yaml:\"consensus_state\""]; -} - -// ClientConsensusStates defines all the stored consensus states for a given -// client. -message ClientConsensusStates { - // client identifier - string client_id = 1 [(gogoproto.moretags) = "yaml:\"client_id\""]; - // consensus states and their heights associated with the client - repeated ConsensusStateWithHeight consensus_states = 2 - [(gogoproto.moretags) = "yaml:\"consensus_states\"", (gogoproto.nullable) = false]; -} - -// ClientUpdateProposal is a governance proposal. If it passes, the substitute -// client's latest consensus state is copied over to the subject client. The proposal -// handler may fail if the subject and the substitute do not match in client and -// chain parameters (with exception to latest height, frozen height, and chain-id). -message ClientUpdateProposal { - option (gogoproto.goproto_getters) = false; - option (cosmos_proto.implements_interface) = "cosmos.gov.v1beta1.Content"; - // the title of the update proposal - string title = 1; - // the description of the proposal - string description = 2; - // the client identifier for the client to be updated if the proposal passes - string subject_client_id = 3 [(gogoproto.moretags) = "yaml:\"subject_client_id\""]; - // the substitute client identifier for the client standing in for the subject - // client - string substitute_client_id = 4 [(gogoproto.moretags) = "yaml:\"substitute_client_id\""]; -} - -// UpgradeProposal is a gov Content type for initiating an IBC breaking -// upgrade. -message UpgradeProposal { - option (gogoproto.goproto_getters) = false; - option (gogoproto.goproto_stringer) = false; - option (gogoproto.equal) = true; - option (cosmos_proto.implements_interface) = "cosmos.gov.v1beta1.Content"; - - string title = 1; - string description = 2; - cosmos.upgrade.v1beta1.Plan plan = 3 [(gogoproto.nullable) = false]; - - // An UpgradedClientState must be provided to perform an IBC breaking upgrade. - // This will make the chain commit to the correct upgraded (self) client state - // before the upgrade occurs, so that connecting chains can verify that the - // new upgraded client is valid by verifying a proof on the previous version - // of the chain. This will allow IBC connections to persist smoothly across - // planned chain upgrades - google.protobuf.Any upgraded_client_state = 4 [(gogoproto.moretags) = "yaml:\"upgraded_client_state\""]; -} - -// Height is a monotonically increasing data type -// that can be compared against another Height for the purposes of updating and -// freezing clients -// -// Normally the RevisionHeight is incremented at each height while keeping -// RevisionNumber the same. However some consensus algorithms may choose to -// reset the height in certain conditions e.g. hard forks, state-machine -// breaking changes In these cases, the RevisionNumber is incremented so that -// height continues to be monitonically increasing even as the RevisionHeight -// gets reset -message Height { - option (gogoproto.goproto_getters) = false; - option (gogoproto.goproto_stringer) = false; - - // the revision that the client is currently on - uint64 revision_number = 1 [(gogoproto.moretags) = "yaml:\"revision_number\""]; - // the height within the given revision - uint64 revision_height = 2 [(gogoproto.moretags) = "yaml:\"revision_height\""]; -} - -// Params defines the set of IBC light client parameters. -message Params { - // allowed_clients defines the list of allowed client state types. - repeated string allowed_clients = 1 [(gogoproto.moretags) = "yaml:\"allowed_clients\""]; -} diff --git a/ampd/proto/third_party/ibc/core/client/v1/genesis.proto b/ampd/proto/third_party/ibc/core/client/v1/genesis.proto deleted file mode 100644 index b2930c484..000000000 --- a/ampd/proto/third_party/ibc/core/client/v1/genesis.proto +++ /dev/null @@ -1,48 +0,0 @@ -syntax = "proto3"; - -package ibc.core.client.v1; - -option go_package = "github.com/cosmos/ibc-go/v4/modules/core/02-client/types"; - -import "ibc/core/client/v1/client.proto"; -import "gogoproto/gogo.proto"; - -// GenesisState defines the ibc client submodule's genesis state. -message GenesisState { - // client states with their corresponding identifiers - repeated IdentifiedClientState clients = 1 - [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "IdentifiedClientStates"]; - // consensus states from each client - repeated ClientConsensusStates clients_consensus = 2 [ - (gogoproto.nullable) = false, - (gogoproto.castrepeated) = "ClientsConsensusStates", - (gogoproto.moretags) = "yaml:\"clients_consensus\"" - ]; - // metadata from each client - repeated IdentifiedGenesisMetadata clients_metadata = 3 - [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"clients_metadata\""]; - Params params = 4 [(gogoproto.nullable) = false]; - // create localhost on initialization - bool create_localhost = 5 [(gogoproto.moretags) = "yaml:\"create_localhost\""]; - // the sequence for the next generated client identifier - uint64 next_client_sequence = 6 [(gogoproto.moretags) = "yaml:\"next_client_sequence\""]; -} - -// GenesisMetadata defines the genesis type for metadata that clients may return -// with ExportMetadata -message GenesisMetadata { - option (gogoproto.goproto_getters) = false; - - // store key of metadata without clientID-prefix - bytes key = 1; - // metadata value - bytes value = 2; -} - -// IdentifiedGenesisMetadata has the client metadata with the corresponding -// client id. -message IdentifiedGenesisMetadata { - string client_id = 1 [(gogoproto.moretags) = "yaml:\"client_id\""]; - repeated GenesisMetadata client_metadata = 2 - [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"client_metadata\""]; -} diff --git a/ampd/proto/third_party/ibc/core/client/v1/query.proto b/ampd/proto/third_party/ibc/core/client/v1/query.proto deleted file mode 100644 index 2c9618bc8..000000000 --- a/ampd/proto/third_party/ibc/core/client/v1/query.proto +++ /dev/null @@ -1,207 +0,0 @@ -syntax = "proto3"; - -package ibc.core.client.v1; - -option go_package = "github.com/cosmos/ibc-go/v4/modules/core/02-client/types"; - -import "cosmos/base/query/v1beta1/pagination.proto"; -import "ibc/core/client/v1/client.proto"; -import "google/protobuf/any.proto"; -import "google/api/annotations.proto"; -import "gogoproto/gogo.proto"; - -// Query provides defines the gRPC querier service -service Query { - // ClientState queries an IBC light client. - rpc ClientState(QueryClientStateRequest) returns (QueryClientStateResponse) { - option (google.api.http).get = "/ibc/core/client/v1/client_states/{client_id}"; - } - - // ClientStates queries all the IBC light clients of a chain. - rpc ClientStates(QueryClientStatesRequest) returns (QueryClientStatesResponse) { - option (google.api.http).get = "/ibc/core/client/v1/client_states"; - } - - // ConsensusState queries a consensus state associated with a client state at - // a given height. - rpc ConsensusState(QueryConsensusStateRequest) returns (QueryConsensusStateResponse) { - option (google.api.http).get = "/ibc/core/client/v1/consensus_states/" - "{client_id}/revision/{revision_number}/" - "height/{revision_height}"; - } - - // ConsensusStates queries all the consensus state associated with a given - // client. - rpc ConsensusStates(QueryConsensusStatesRequest) returns (QueryConsensusStatesResponse) { - option (google.api.http).get = "/ibc/core/client/v1/consensus_states/{client_id}"; - } - - // ConsensusStateHeights queries the height of every consensus states associated with a given client. - rpc ConsensusStateHeights(QueryConsensusStateHeightsRequest) returns (QueryConsensusStateHeightsResponse) { - option (google.api.http).get = "/ibc/core/client/v1/consensus_states/{client_id}/heights"; - } - - // Status queries the status of an IBC client. - rpc ClientStatus(QueryClientStatusRequest) returns (QueryClientStatusResponse) { - option (google.api.http).get = "/ibc/core/client/v1/client_status/{client_id}"; - } - - // ClientParams queries all parameters of the ibc client. - rpc ClientParams(QueryClientParamsRequest) returns (QueryClientParamsResponse) { - option (google.api.http).get = "/ibc/client/v1/params"; - } - - // UpgradedClientState queries an Upgraded IBC light client. - rpc UpgradedClientState(QueryUpgradedClientStateRequest) returns (QueryUpgradedClientStateResponse) { - option (google.api.http).get = "/ibc/core/client/v1/upgraded_client_states"; - } - - // UpgradedConsensusState queries an Upgraded IBC consensus state. - rpc UpgradedConsensusState(QueryUpgradedConsensusStateRequest) returns (QueryUpgradedConsensusStateResponse) { - option (google.api.http).get = "/ibc/core/client/v1/upgraded_consensus_states"; - } -} - -// QueryClientStateRequest is the request type for the Query/ClientState RPC -// method -message QueryClientStateRequest { - // client state unique identifier - string client_id = 1; -} - -// QueryClientStateResponse is the response type for the Query/ClientState RPC -// method. Besides the client state, it includes a proof and the height from -// which the proof was retrieved. -message QueryClientStateResponse { - // client state associated with the request identifier - google.protobuf.Any client_state = 1; - // merkle proof of existence - bytes proof = 2; - // height at which the proof was retrieved - ibc.core.client.v1.Height proof_height = 3 [(gogoproto.nullable) = false]; -} - -// QueryClientStatesRequest is the request type for the Query/ClientStates RPC -// method -message QueryClientStatesRequest { - // pagination request - cosmos.base.query.v1beta1.PageRequest pagination = 1; -} - -// QueryClientStatesResponse is the response type for the Query/ClientStates RPC -// method. -message QueryClientStatesResponse { - // list of stored ClientStates of the chain. - repeated IdentifiedClientState client_states = 1 - [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "IdentifiedClientStates"]; - // pagination response - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -// QueryConsensusStateRequest is the request type for the Query/ConsensusState -// RPC method. Besides the consensus state, it includes a proof and the height -// from which the proof was retrieved. -message QueryConsensusStateRequest { - // client identifier - string client_id = 1; - // consensus state revision number - uint64 revision_number = 2; - // consensus state revision height - uint64 revision_height = 3; - // latest_height overrrides the height field and queries the latest stored - // ConsensusState - bool latest_height = 4; -} - -// QueryConsensusStateResponse is the response type for the Query/ConsensusState -// RPC method -message QueryConsensusStateResponse { - // consensus state associated with the client identifier at the given height - google.protobuf.Any consensus_state = 1; - // merkle proof of existence - bytes proof = 2; - // height at which the proof was retrieved - ibc.core.client.v1.Height proof_height = 3 [(gogoproto.nullable) = false]; -} - -// QueryConsensusStatesRequest is the request type for the Query/ConsensusStates -// RPC method. -message QueryConsensusStatesRequest { - // client identifier - string client_id = 1; - // pagination request - cosmos.base.query.v1beta1.PageRequest pagination = 2; -} - -// QueryConsensusStatesResponse is the response type for the -// Query/ConsensusStates RPC method -message QueryConsensusStatesResponse { - // consensus states associated with the identifier - repeated ConsensusStateWithHeight consensus_states = 1 [(gogoproto.nullable) = false]; - // pagination response - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -// QueryConsensusStateHeightsRequest is the request type for Query/ConsensusStateHeights -// RPC method. -message QueryConsensusStateHeightsRequest { - // client identifier - string client_id = 1; - // pagination request - cosmos.base.query.v1beta1.PageRequest pagination = 2; -} - -// QueryConsensusStateHeightsResponse is the response type for the -// Query/ConsensusStateHeights RPC method -message QueryConsensusStateHeightsResponse { - // consensus state heights - repeated Height consensus_state_heights = 1 [(gogoproto.nullable) = false]; - // pagination response - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -// QueryClientStatusRequest is the request type for the Query/ClientStatus RPC -// method -message QueryClientStatusRequest { - // client unique identifier - string client_id = 1; -} - -// QueryClientStatusResponse is the response type for the Query/ClientStatus RPC -// method. It returns the current status of the IBC client. -message QueryClientStatusResponse { - string status = 1; -} - -// QueryClientParamsRequest is the request type for the Query/ClientParams RPC -// method. -message QueryClientParamsRequest {} - -// QueryClientParamsResponse is the response type for the Query/ClientParams RPC -// method. -message QueryClientParamsResponse { - // params defines the parameters of the module. - Params params = 1; -} - -// QueryUpgradedClientStateRequest is the request type for the -// Query/UpgradedClientState RPC method -message QueryUpgradedClientStateRequest {} - -// QueryUpgradedClientStateResponse is the response type for the -// Query/UpgradedClientState RPC method. -message QueryUpgradedClientStateResponse { - // client state associated with the request identifier - google.protobuf.Any upgraded_client_state = 1; -} - -// QueryUpgradedConsensusStateRequest is the request type for the -// Query/UpgradedConsensusState RPC method -message QueryUpgradedConsensusStateRequest {} - -// QueryUpgradedConsensusStateResponse is the response type for the -// Query/UpgradedConsensusState RPC method. -message QueryUpgradedConsensusStateResponse { - // Consensus state associated with the request identifier - google.protobuf.Any upgraded_consensus_state = 1; -} diff --git a/ampd/proto/third_party/ibc/core/client/v1/tx.proto b/ampd/proto/third_party/ibc/core/client/v1/tx.proto deleted file mode 100644 index 11dfdadea..000000000 --- a/ampd/proto/third_party/ibc/core/client/v1/tx.proto +++ /dev/null @@ -1,99 +0,0 @@ -syntax = "proto3"; - -package ibc.core.client.v1; - -option go_package = "github.com/cosmos/ibc-go/v4/modules/core/02-client/types"; - -import "gogoproto/gogo.proto"; -import "google/protobuf/any.proto"; - -// Msg defines the ibc/client Msg service. -service Msg { - // CreateClient defines a rpc handler method for MsgCreateClient. - rpc CreateClient(MsgCreateClient) returns (MsgCreateClientResponse); - - // UpdateClient defines a rpc handler method for MsgUpdateClient. - rpc UpdateClient(MsgUpdateClient) returns (MsgUpdateClientResponse); - - // UpgradeClient defines a rpc handler method for MsgUpgradeClient. - rpc UpgradeClient(MsgUpgradeClient) returns (MsgUpgradeClientResponse); - - // SubmitMisbehaviour defines a rpc handler method for MsgSubmitMisbehaviour. - rpc SubmitMisbehaviour(MsgSubmitMisbehaviour) returns (MsgSubmitMisbehaviourResponse); -} - -// MsgCreateClient defines a message to create an IBC client -message MsgCreateClient { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // light client state - google.protobuf.Any client_state = 1 [(gogoproto.moretags) = "yaml:\"client_state\""]; - // consensus state associated with the client that corresponds to a given - // height. - google.protobuf.Any consensus_state = 2 [(gogoproto.moretags) = "yaml:\"consensus_state\""]; - // signer address - string signer = 3; -} - -// MsgCreateClientResponse defines the Msg/CreateClient response type. -message MsgCreateClientResponse {} - -// MsgUpdateClient defines an sdk.Msg to update a IBC client state using -// the given header. -message MsgUpdateClient { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // client unique identifier - string client_id = 1 [(gogoproto.moretags) = "yaml:\"client_id\""]; - // header to update the light client - google.protobuf.Any header = 2; - // signer address - string signer = 3; -} - -// MsgUpdateClientResponse defines the Msg/UpdateClient response type. -message MsgUpdateClientResponse {} - -// MsgUpgradeClient defines an sdk.Msg to upgrade an IBC client to a new client -// state -message MsgUpgradeClient { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // client unique identifier - string client_id = 1 [(gogoproto.moretags) = "yaml:\"client_id\""]; - // upgraded client state - google.protobuf.Any client_state = 2 [(gogoproto.moretags) = "yaml:\"client_state\""]; - // upgraded consensus state, only contains enough information to serve as a - // basis of trust in update logic - google.protobuf.Any consensus_state = 3 [(gogoproto.moretags) = "yaml:\"consensus_state\""]; - // proof that old chain committed to new client - bytes proof_upgrade_client = 4 [(gogoproto.moretags) = "yaml:\"proof_upgrade_client\""]; - // proof that old chain committed to new consensus state - bytes proof_upgrade_consensus_state = 5 [(gogoproto.moretags) = "yaml:\"proof_upgrade_consensus_state\""]; - // signer address - string signer = 6; -} - -// MsgUpgradeClientResponse defines the Msg/UpgradeClient response type. -message MsgUpgradeClientResponse {} - -// MsgSubmitMisbehaviour defines an sdk.Msg type that submits Evidence for -// light client misbehaviour. -message MsgSubmitMisbehaviour { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // client unique identifier - string client_id = 1 [(gogoproto.moretags) = "yaml:\"client_id\""]; - // misbehaviour used for freezing the light client - google.protobuf.Any misbehaviour = 2; - // signer address - string signer = 3; -} - -// MsgSubmitMisbehaviourResponse defines the Msg/SubmitMisbehaviour response -// type. -message MsgSubmitMisbehaviourResponse {} diff --git a/ampd/proto/third_party/ibc/core/commitment/v1/commitment.proto b/ampd/proto/third_party/ibc/core/commitment/v1/commitment.proto deleted file mode 100644 index b6a68a99f..000000000 --- a/ampd/proto/third_party/ibc/core/commitment/v1/commitment.proto +++ /dev/null @@ -1,41 +0,0 @@ -syntax = "proto3"; - -package ibc.core.commitment.v1; - -option go_package = "github.com/cosmos/ibc-go/v4/modules/core/23-commitment/types"; - -import "gogoproto/gogo.proto"; -import "proofs.proto"; - -// MerkleRoot defines a merkle root hash. -// In the Cosmos SDK, the AppHash of a block header becomes the root. -message MerkleRoot { - option (gogoproto.goproto_getters) = false; - - bytes hash = 1; -} - -// MerklePrefix is merkle path prefixed to the key. -// The constructed key from the Path and the key will be append(Path.KeyPath, -// append(Path.KeyPrefix, key...)) -message MerklePrefix { - bytes key_prefix = 1 [(gogoproto.moretags) = "yaml:\"key_prefix\""]; -} - -// MerklePath is the path used to verify commitment proofs, which can be an -// arbitrary structured object (defined by a commitment type). -// MerklePath is represented from root-to-leaf -message MerklePath { - option (gogoproto.goproto_stringer) = false; - - repeated string key_path = 1 [(gogoproto.moretags) = "yaml:\"key_path\""]; -} - -// MerkleProof is a wrapper type over a chain of CommitmentProofs. -// It demonstrates membership or non-membership for an element or set of -// elements, verifiable in conjunction with a known commitment root. Proofs -// should be succinct. -// MerkleProofs are ordered from leaf-to-root -message MerkleProof { - repeated ics23.CommitmentProof proofs = 1; -} diff --git a/ampd/proto/third_party/ibc/core/connection/v1/connection.proto b/ampd/proto/third_party/ibc/core/connection/v1/connection.proto deleted file mode 100644 index 8360af988..000000000 --- a/ampd/proto/third_party/ibc/core/connection/v1/connection.proto +++ /dev/null @@ -1,114 +0,0 @@ -syntax = "proto3"; - -package ibc.core.connection.v1; - -option go_package = "github.com/cosmos/ibc-go/v4/modules/core/03-connection/types"; - -import "gogoproto/gogo.proto"; -import "ibc/core/commitment/v1/commitment.proto"; - -// ICS03 - Connection Data Structures as defined in -// https://github.com/cosmos/ibc/blob/master/spec/core/ics-003-connection-semantics#data-structures - -// ConnectionEnd defines a stateful object on a chain connected to another -// separate one. -// NOTE: there must only be 2 defined ConnectionEnds to establish -// a connection between two chains. -message ConnectionEnd { - option (gogoproto.goproto_getters) = false; - // client associated with this connection. - string client_id = 1 [(gogoproto.moretags) = "yaml:\"client_id\""]; - // IBC version which can be utilised to determine encodings or protocols for - // channels or packets utilising this connection. - repeated Version versions = 2; - // current state of the connection end. - State state = 3; - // counterparty chain associated with this connection. - Counterparty counterparty = 4 [(gogoproto.nullable) = false]; - // delay period that must pass before a consensus state can be used for - // packet-verification NOTE: delay period logic is only implemented by some - // clients. - uint64 delay_period = 5 [(gogoproto.moretags) = "yaml:\"delay_period\""]; -} - -// IdentifiedConnection defines a connection with additional connection -// identifier field. -message IdentifiedConnection { - option (gogoproto.goproto_getters) = false; - // connection identifier. - string id = 1 [(gogoproto.moretags) = "yaml:\"id\""]; - // client associated with this connection. - string client_id = 2 [(gogoproto.moretags) = "yaml:\"client_id\""]; - // IBC version which can be utilised to determine encodings or protocols for - // channels or packets utilising this connection - repeated Version versions = 3; - // current state of the connection end. - State state = 4; - // counterparty chain associated with this connection. - Counterparty counterparty = 5 [(gogoproto.nullable) = false]; - // delay period associated with this connection. - uint64 delay_period = 6 [(gogoproto.moretags) = "yaml:\"delay_period\""]; -} - -// State defines if a connection is in one of the following states: -// INIT, TRYOPEN, OPEN or UNINITIALIZED. -enum State { - option (gogoproto.goproto_enum_prefix) = false; - - // Default State - STATE_UNINITIALIZED_UNSPECIFIED = 0 [(gogoproto.enumvalue_customname) = "UNINITIALIZED"]; - // A connection end has just started the opening handshake. - STATE_INIT = 1 [(gogoproto.enumvalue_customname) = "INIT"]; - // A connection end has acknowledged the handshake step on the counterparty - // chain. - STATE_TRYOPEN = 2 [(gogoproto.enumvalue_customname) = "TRYOPEN"]; - // A connection end has completed the handshake. - STATE_OPEN = 3 [(gogoproto.enumvalue_customname) = "OPEN"]; -} - -// Counterparty defines the counterparty chain associated with a connection end. -message Counterparty { - option (gogoproto.goproto_getters) = false; - - // identifies the client on the counterparty chain associated with a given - // connection. - string client_id = 1 [(gogoproto.moretags) = "yaml:\"client_id\""]; - // identifies the connection end on the counterparty chain associated with a - // given connection. - string connection_id = 2 [(gogoproto.moretags) = "yaml:\"connection_id\""]; - // commitment merkle prefix of the counterparty chain. - ibc.core.commitment.v1.MerklePrefix prefix = 3 [(gogoproto.nullable) = false]; -} - -// ClientPaths define all the connection paths for a client state. -message ClientPaths { - // list of connection paths - repeated string paths = 1; -} - -// ConnectionPaths define all the connection paths for a given client state. -message ConnectionPaths { - // client state unique identifier - string client_id = 1 [(gogoproto.moretags) = "yaml:\"client_id\""]; - // list of connection paths - repeated string paths = 2; -} - -// Version defines the versioning scheme used to negotiate the IBC verison in -// the connection handshake. -message Version { - option (gogoproto.goproto_getters) = false; - - // unique version identifier - string identifier = 1; - // list of features compatible with the specified identifier - repeated string features = 2; -} - -// Params defines the set of Connection parameters. -message Params { - // maximum expected time per block (in nanoseconds), used to enforce block delay. This parameter should reflect the - // largest amount of time that the chain might reasonably take to produce the next block under normal operating - // conditions. A safe choice is 3-5x the expected time per block. - uint64 max_expected_time_per_block = 1 [(gogoproto.moretags) = "yaml:\"max_expected_time_per_block\""]; -} diff --git a/ampd/proto/third_party/ibc/core/connection/v1/genesis.proto b/ampd/proto/third_party/ibc/core/connection/v1/genesis.proto deleted file mode 100644 index f616ae67e..000000000 --- a/ampd/proto/third_party/ibc/core/connection/v1/genesis.proto +++ /dev/null @@ -1,18 +0,0 @@ -syntax = "proto3"; - -package ibc.core.connection.v1; - -option go_package = "github.com/cosmos/ibc-go/v4/modules/core/03-connection/types"; - -import "gogoproto/gogo.proto"; -import "ibc/core/connection/v1/connection.proto"; - -// GenesisState defines the ibc connection submodule's genesis state. -message GenesisState { - repeated IdentifiedConnection connections = 1 [(gogoproto.nullable) = false]; - repeated ConnectionPaths client_connection_paths = 2 - [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"client_connection_paths\""]; - // the sequence for the next generated connection identifier - uint64 next_connection_sequence = 3 [(gogoproto.moretags) = "yaml:\"next_connection_sequence\""]; - Params params = 4 [(gogoproto.nullable) = false]; -} diff --git a/ampd/proto/third_party/ibc/core/connection/v1/query.proto b/ampd/proto/third_party/ibc/core/connection/v1/query.proto deleted file mode 100644 index 129f30a71..000000000 --- a/ampd/proto/third_party/ibc/core/connection/v1/query.proto +++ /dev/null @@ -1,138 +0,0 @@ -syntax = "proto3"; - -package ibc.core.connection.v1; - -option go_package = "github.com/cosmos/ibc-go/v4/modules/core/03-connection/types"; - -import "gogoproto/gogo.proto"; -import "cosmos/base/query/v1beta1/pagination.proto"; -import "ibc/core/client/v1/client.proto"; -import "ibc/core/connection/v1/connection.proto"; -import "google/api/annotations.proto"; -import "google/protobuf/any.proto"; - -// Query provides defines the gRPC querier service -service Query { - // Connection queries an IBC connection end. - rpc Connection(QueryConnectionRequest) returns (QueryConnectionResponse) { - option (google.api.http).get = "/ibc/core/connection/v1/connections/{connection_id}"; - } - - // Connections queries all the IBC connections of a chain. - rpc Connections(QueryConnectionsRequest) returns (QueryConnectionsResponse) { - option (google.api.http).get = "/ibc/core/connection/v1/connections"; - } - - // ClientConnections queries the connection paths associated with a client - // state. - rpc ClientConnections(QueryClientConnectionsRequest) returns (QueryClientConnectionsResponse) { - option (google.api.http).get = "/ibc/core/connection/v1/client_connections/{client_id}"; - } - - // ConnectionClientState queries the client state associated with the - // connection. - rpc ConnectionClientState(QueryConnectionClientStateRequest) returns (QueryConnectionClientStateResponse) { - option (google.api.http).get = "/ibc/core/connection/v1/connections/{connection_id}/client_state"; - } - - // ConnectionConsensusState queries the consensus state associated with the - // connection. - rpc ConnectionConsensusState(QueryConnectionConsensusStateRequest) returns (QueryConnectionConsensusStateResponse) { - option (google.api.http).get = "/ibc/core/connection/v1/connections/{connection_id}/consensus_state/" - "revision/{revision_number}/height/{revision_height}"; - } -} - -// QueryConnectionRequest is the request type for the Query/Connection RPC -// method -message QueryConnectionRequest { - // connection unique identifier - string connection_id = 1; -} - -// QueryConnectionResponse is the response type for the Query/Connection RPC -// method. Besides the connection end, it includes a proof and the height from -// which the proof was retrieved. -message QueryConnectionResponse { - // connection associated with the request identifier - ibc.core.connection.v1.ConnectionEnd connection = 1; - // merkle proof of existence - bytes proof = 2; - // height at which the proof was retrieved - ibc.core.client.v1.Height proof_height = 3 [(gogoproto.nullable) = false]; -} - -// QueryConnectionsRequest is the request type for the Query/Connections RPC -// method -message QueryConnectionsRequest { - cosmos.base.query.v1beta1.PageRequest pagination = 1; -} - -// QueryConnectionsResponse is the response type for the Query/Connections RPC -// method. -message QueryConnectionsResponse { - // list of stored connections of the chain. - repeated ibc.core.connection.v1.IdentifiedConnection connections = 1; - // pagination response - cosmos.base.query.v1beta1.PageResponse pagination = 2; - // query block height - ibc.core.client.v1.Height height = 3 [(gogoproto.nullable) = false]; -} - -// QueryClientConnectionsRequest is the request type for the -// Query/ClientConnections RPC method -message QueryClientConnectionsRequest { - // client identifier associated with a connection - string client_id = 1; -} - -// QueryClientConnectionsResponse is the response type for the -// Query/ClientConnections RPC method -message QueryClientConnectionsResponse { - // slice of all the connection paths associated with a client. - repeated string connection_paths = 1; - // merkle proof of existence - bytes proof = 2; - // height at which the proof was generated - ibc.core.client.v1.Height proof_height = 3 [(gogoproto.nullable) = false]; -} - -// QueryConnectionClientStateRequest is the request type for the -// Query/ConnectionClientState RPC method -message QueryConnectionClientStateRequest { - // connection identifier - string connection_id = 1 [(gogoproto.moretags) = "yaml:\"connection_id\""]; -} - -// QueryConnectionClientStateResponse is the response type for the -// Query/ConnectionClientState RPC method -message QueryConnectionClientStateResponse { - // client state associated with the channel - ibc.core.client.v1.IdentifiedClientState identified_client_state = 1; - // merkle proof of existence - bytes proof = 2; - // height at which the proof was retrieved - ibc.core.client.v1.Height proof_height = 3 [(gogoproto.nullable) = false]; -} - -// QueryConnectionConsensusStateRequest is the request type for the -// Query/ConnectionConsensusState RPC method -message QueryConnectionConsensusStateRequest { - // connection identifier - string connection_id = 1 [(gogoproto.moretags) = "yaml:\"connection_id\""]; - uint64 revision_number = 2; - uint64 revision_height = 3; -} - -// QueryConnectionConsensusStateResponse is the response type for the -// Query/ConnectionConsensusState RPC method -message QueryConnectionConsensusStateResponse { - // consensus state associated with the channel - google.protobuf.Any consensus_state = 1; - // client ID associated with the consensus state - string client_id = 2; - // merkle proof of existence - bytes proof = 3; - // height at which the proof was retrieved - ibc.core.client.v1.Height proof_height = 4 [(gogoproto.nullable) = false]; -} diff --git a/ampd/proto/third_party/ibc/core/connection/v1/tx.proto b/ampd/proto/third_party/ibc/core/connection/v1/tx.proto deleted file mode 100644 index b2fea632c..000000000 --- a/ampd/proto/third_party/ibc/core/connection/v1/tx.proto +++ /dev/null @@ -1,118 +0,0 @@ -syntax = "proto3"; - -package ibc.core.connection.v1; - -option go_package = "github.com/cosmos/ibc-go/v4/modules/core/03-connection/types"; - -import "gogoproto/gogo.proto"; -import "google/protobuf/any.proto"; -import "ibc/core/client/v1/client.proto"; -import "ibc/core/connection/v1/connection.proto"; - -// Msg defines the ibc/connection Msg service. -service Msg { - // ConnectionOpenInit defines a rpc handler method for MsgConnectionOpenInit. - rpc ConnectionOpenInit(MsgConnectionOpenInit) returns (MsgConnectionOpenInitResponse); - - // ConnectionOpenTry defines a rpc handler method for MsgConnectionOpenTry. - rpc ConnectionOpenTry(MsgConnectionOpenTry) returns (MsgConnectionOpenTryResponse); - - // ConnectionOpenAck defines a rpc handler method for MsgConnectionOpenAck. - rpc ConnectionOpenAck(MsgConnectionOpenAck) returns (MsgConnectionOpenAckResponse); - - // ConnectionOpenConfirm defines a rpc handler method for - // MsgConnectionOpenConfirm. - rpc ConnectionOpenConfirm(MsgConnectionOpenConfirm) returns (MsgConnectionOpenConfirmResponse); -} - -// MsgConnectionOpenInit defines the msg sent by an account on Chain A to -// initialize a connection with Chain B. -message MsgConnectionOpenInit { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - string client_id = 1 [(gogoproto.moretags) = "yaml:\"client_id\""]; - Counterparty counterparty = 2 [(gogoproto.nullable) = false]; - Version version = 3; - uint64 delay_period = 4 [(gogoproto.moretags) = "yaml:\"delay_period\""]; - string signer = 5; -} - -// MsgConnectionOpenInitResponse defines the Msg/ConnectionOpenInit response -// type. -message MsgConnectionOpenInitResponse {} - -// MsgConnectionOpenTry defines a msg sent by a Relayer to try to open a -// connection on Chain B. -message MsgConnectionOpenTry { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - string client_id = 1 [(gogoproto.moretags) = "yaml:\"client_id\""]; - // Deprecated: this field is unused. Crossing hellos are no longer supported in core IBC. - string previous_connection_id = 2 [deprecated = true, (gogoproto.moretags) = "yaml:\"previous_connection_id\""]; - google.protobuf.Any client_state = 3 [(gogoproto.moretags) = "yaml:\"client_state\""]; - Counterparty counterparty = 4 [(gogoproto.nullable) = false]; - uint64 delay_period = 5 [(gogoproto.moretags) = "yaml:\"delay_period\""]; - repeated Version counterparty_versions = 6 [(gogoproto.moretags) = "yaml:\"counterparty_versions\""]; - ibc.core.client.v1.Height proof_height = 7 - [(gogoproto.moretags) = "yaml:\"proof_height\"", (gogoproto.nullable) = false]; - // proof of the initialization the connection on Chain A: `UNITIALIZED -> - // INIT` - bytes proof_init = 8 [(gogoproto.moretags) = "yaml:\"proof_init\""]; - // proof of client state included in message - bytes proof_client = 9 [(gogoproto.moretags) = "yaml:\"proof_client\""]; - // proof of client consensus state - bytes proof_consensus = 10 [(gogoproto.moretags) = "yaml:\"proof_consensus\""]; - ibc.core.client.v1.Height consensus_height = 11 - [(gogoproto.moretags) = "yaml:\"consensus_height\"", (gogoproto.nullable) = false]; - string signer = 12; -} - -// MsgConnectionOpenTryResponse defines the Msg/ConnectionOpenTry response type. -message MsgConnectionOpenTryResponse {} - -// MsgConnectionOpenAck defines a msg sent by a Relayer to Chain A to -// acknowledge the change of connection state to TRYOPEN on Chain B. -message MsgConnectionOpenAck { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - string connection_id = 1 [(gogoproto.moretags) = "yaml:\"connection_id\""]; - string counterparty_connection_id = 2 [(gogoproto.moretags) = "yaml:\"counterparty_connection_id\""]; - Version version = 3; - google.protobuf.Any client_state = 4 [(gogoproto.moretags) = "yaml:\"client_state\""]; - ibc.core.client.v1.Height proof_height = 5 - [(gogoproto.moretags) = "yaml:\"proof_height\"", (gogoproto.nullable) = false]; - // proof of the initialization the connection on Chain B: `UNITIALIZED -> - // TRYOPEN` - bytes proof_try = 6 [(gogoproto.moretags) = "yaml:\"proof_try\""]; - // proof of client state included in message - bytes proof_client = 7 [(gogoproto.moretags) = "yaml:\"proof_client\""]; - // proof of client consensus state - bytes proof_consensus = 8 [(gogoproto.moretags) = "yaml:\"proof_consensus\""]; - ibc.core.client.v1.Height consensus_height = 9 - [(gogoproto.moretags) = "yaml:\"consensus_height\"", (gogoproto.nullable) = false]; - string signer = 10; -} - -// MsgConnectionOpenAckResponse defines the Msg/ConnectionOpenAck response type. -message MsgConnectionOpenAckResponse {} - -// MsgConnectionOpenConfirm defines a msg sent by a Relayer to Chain B to -// acknowledge the change of connection state to OPEN on Chain A. -message MsgConnectionOpenConfirm { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - string connection_id = 1 [(gogoproto.moretags) = "yaml:\"connection_id\""]; - // proof for the change of the connection state on Chain A: `INIT -> OPEN` - bytes proof_ack = 2 [(gogoproto.moretags) = "yaml:\"proof_ack\""]; - ibc.core.client.v1.Height proof_height = 3 - [(gogoproto.moretags) = "yaml:\"proof_height\"", (gogoproto.nullable) = false]; - string signer = 4; -} - -// MsgConnectionOpenConfirmResponse defines the Msg/ConnectionOpenConfirm -// response type. -message MsgConnectionOpenConfirmResponse {} diff --git a/ampd/proto/third_party/ibc/core/types/v1/genesis.proto b/ampd/proto/third_party/ibc/core/types/v1/genesis.proto deleted file mode 100644 index 4cc931d32..000000000 --- a/ampd/proto/third_party/ibc/core/types/v1/genesis.proto +++ /dev/null @@ -1,23 +0,0 @@ -syntax = "proto3"; - -package ibc.core.types.v1; - -option go_package = "github.com/cosmos/ibc-go/v4/modules/core/types"; - -import "gogoproto/gogo.proto"; -import "ibc/core/client/v1/genesis.proto"; -import "ibc/core/connection/v1/genesis.proto"; -import "ibc/core/channel/v1/genesis.proto"; - -// GenesisState defines the ibc module's genesis state. -message GenesisState { - // ICS002 - Clients genesis state - ibc.core.client.v1.GenesisState client_genesis = 1 - [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"client_genesis\""]; - // ICS003 - Connections genesis state - ibc.core.connection.v1.GenesisState connection_genesis = 2 - [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"connection_genesis\""]; - // ICS004 - Channel genesis state - ibc.core.channel.v1.GenesisState channel_genesis = 3 - [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"channel_genesis\""]; -} diff --git a/ampd/proto/third_party/ibc/lightclients/localhost/v1/localhost.proto b/ampd/proto/third_party/ibc/lightclients/localhost/v1/localhost.proto deleted file mode 100644 index 9eda835eb..000000000 --- a/ampd/proto/third_party/ibc/lightclients/localhost/v1/localhost.proto +++ /dev/null @@ -1,18 +0,0 @@ -syntax = "proto3"; - -package ibc.lightclients.localhost.v1; - -option go_package = "github.com/cosmos/ibc-go/v4/modules/light-clients/09-localhost/types"; - -import "gogoproto/gogo.proto"; -import "ibc/core/client/v1/client.proto"; - -// ClientState defines a loopback (localhost) client. It requires (read-only) -// access to keys outside the client prefix. -message ClientState { - option (gogoproto.goproto_getters) = false; - // self chain ID - string chain_id = 1 [(gogoproto.moretags) = "yaml:\"chain_id\""]; - // self latest block height - ibc.core.client.v1.Height height = 2 [(gogoproto.nullable) = false]; -} diff --git a/ampd/proto/third_party/ibc/lightclients/solomachine/v1/solomachine.proto b/ampd/proto/third_party/ibc/lightclients/solomachine/v1/solomachine.proto deleted file mode 100644 index 37bd81e92..000000000 --- a/ampd/proto/third_party/ibc/lightclients/solomachine/v1/solomachine.proto +++ /dev/null @@ -1,189 +0,0 @@ -syntax = "proto3"; - -package ibc.lightclients.solomachine.v1; - -option go_package = "github.com/cosmos/ibc-go/v4/modules/core/02-client/legacy/v100"; - -import "ibc/core/connection/v1/connection.proto"; -import "ibc/core/channel/v1/channel.proto"; -import "gogoproto/gogo.proto"; -import "google/protobuf/any.proto"; - -// ClientState defines a solo machine client that tracks the current consensus -// state and if the client is frozen. -message ClientState { - option (gogoproto.goproto_getters) = false; - // latest sequence of the client state - uint64 sequence = 1; - // frozen sequence of the solo machine - uint64 frozen_sequence = 2 [(gogoproto.moretags) = "yaml:\"frozen_sequence\""]; - ConsensusState consensus_state = 3 [(gogoproto.moretags) = "yaml:\"consensus_state\""]; - // when set to true, will allow governance to update a solo machine client. - // The client will be unfrozen if it is frozen. - bool allow_update_after_proposal = 4 [(gogoproto.moretags) = "yaml:\"allow_update_after_proposal\""]; -} - -// ConsensusState defines a solo machine consensus state. The sequence of a -// consensus state is contained in the "height" key used in storing the -// consensus state. -message ConsensusState { - option (gogoproto.goproto_getters) = false; - // public key of the solo machine - google.protobuf.Any public_key = 1 [(gogoproto.moretags) = "yaml:\"public_key\""]; - // diversifier allows the same public key to be re-used across different solo - // machine clients (potentially on different chains) without being considered - // misbehaviour. - string diversifier = 2; - uint64 timestamp = 3; -} - -// Header defines a solo machine consensus header -message Header { - option (gogoproto.goproto_getters) = false; - // sequence to update solo machine public key at - uint64 sequence = 1; - uint64 timestamp = 2; - bytes signature = 3; - google.protobuf.Any new_public_key = 4 [(gogoproto.moretags) = "yaml:\"new_public_key\""]; - string new_diversifier = 5 [(gogoproto.moretags) = "yaml:\"new_diversifier\""]; -} - -// Misbehaviour defines misbehaviour for a solo machine which consists -// of a sequence and two signatures over different messages at that sequence. -message Misbehaviour { - option (gogoproto.goproto_getters) = false; - string client_id = 1 [(gogoproto.moretags) = "yaml:\"client_id\""]; - uint64 sequence = 2; - SignatureAndData signature_one = 3 [(gogoproto.moretags) = "yaml:\"signature_one\""]; - SignatureAndData signature_two = 4 [(gogoproto.moretags) = "yaml:\"signature_two\""]; -} - -// SignatureAndData contains a signature and the data signed over to create that -// signature. -message SignatureAndData { - option (gogoproto.goproto_getters) = false; - bytes signature = 1; - DataType data_type = 2 [(gogoproto.moretags) = "yaml:\"data_type\""]; - bytes data = 3; - uint64 timestamp = 4; -} - -// TimestampedSignatureData contains the signature data and the timestamp of the -// signature. -message TimestampedSignatureData { - option (gogoproto.goproto_getters) = false; - bytes signature_data = 1 [(gogoproto.moretags) = "yaml:\"signature_data\""]; - uint64 timestamp = 2; -} - -// SignBytes defines the signed bytes used for signature verification. -message SignBytes { - option (gogoproto.goproto_getters) = false; - - uint64 sequence = 1; - uint64 timestamp = 2; - string diversifier = 3; - // type of the data used - DataType data_type = 4 [(gogoproto.moretags) = "yaml:\"data_type\""]; - // marshaled data - bytes data = 5; -} - -// DataType defines the type of solo machine proof being created. This is done -// to preserve uniqueness of different data sign byte encodings. -enum DataType { - option (gogoproto.goproto_enum_prefix) = false; - - // Default State - DATA_TYPE_UNINITIALIZED_UNSPECIFIED = 0 [(gogoproto.enumvalue_customname) = "UNSPECIFIED"]; - // Data type for client state verification - DATA_TYPE_CLIENT_STATE = 1 [(gogoproto.enumvalue_customname) = "CLIENT"]; - // Data type for consensus state verification - DATA_TYPE_CONSENSUS_STATE = 2 [(gogoproto.enumvalue_customname) = "CONSENSUS"]; - // Data type for connection state verification - DATA_TYPE_CONNECTION_STATE = 3 [(gogoproto.enumvalue_customname) = "CONNECTION"]; - // Data type for channel state verification - DATA_TYPE_CHANNEL_STATE = 4 [(gogoproto.enumvalue_customname) = "CHANNEL"]; - // Data type for packet commitment verification - DATA_TYPE_PACKET_COMMITMENT = 5 [(gogoproto.enumvalue_customname) = "PACKETCOMMITMENT"]; - // Data type for packet acknowledgement verification - DATA_TYPE_PACKET_ACKNOWLEDGEMENT = 6 [(gogoproto.enumvalue_customname) = "PACKETACKNOWLEDGEMENT"]; - // Data type for packet receipt absence verification - DATA_TYPE_PACKET_RECEIPT_ABSENCE = 7 [(gogoproto.enumvalue_customname) = "PACKETRECEIPTABSENCE"]; - // Data type for next sequence recv verification - DATA_TYPE_NEXT_SEQUENCE_RECV = 8 [(gogoproto.enumvalue_customname) = "NEXTSEQUENCERECV"]; - // Data type for header verification - DATA_TYPE_HEADER = 9 [(gogoproto.enumvalue_customname) = "HEADER"]; -} - -// HeaderData returns the SignBytes data for update verification. -message HeaderData { - option (gogoproto.goproto_getters) = false; - - // header public key - google.protobuf.Any new_pub_key = 1 [(gogoproto.moretags) = "yaml:\"new_pub_key\""]; - // header diversifier - string new_diversifier = 2 [(gogoproto.moretags) = "yaml:\"new_diversifier\""]; -} - -// ClientStateData returns the SignBytes data for client state verification. -message ClientStateData { - option (gogoproto.goproto_getters) = false; - - bytes path = 1; - google.protobuf.Any client_state = 2 [(gogoproto.moretags) = "yaml:\"client_state\""]; -} - -// ConsensusStateData returns the SignBytes data for consensus state -// verification. -message ConsensusStateData { - option (gogoproto.goproto_getters) = false; - - bytes path = 1; - google.protobuf.Any consensus_state = 2 [(gogoproto.moretags) = "yaml:\"consensus_state\""]; -} - -// ConnectionStateData returns the SignBytes data for connection state -// verification. -message ConnectionStateData { - option (gogoproto.goproto_getters) = false; - - bytes path = 1; - ibc.core.connection.v1.ConnectionEnd connection = 2; -} - -// ChannelStateData returns the SignBytes data for channel state -// verification. -message ChannelStateData { - option (gogoproto.goproto_getters) = false; - - bytes path = 1; - ibc.core.channel.v1.Channel channel = 2; -} - -// PacketCommitmentData returns the SignBytes data for packet commitment -// verification. -message PacketCommitmentData { - bytes path = 1; - bytes commitment = 2; -} - -// PacketAcknowledgementData returns the SignBytes data for acknowledgement -// verification. -message PacketAcknowledgementData { - bytes path = 1; - bytes acknowledgement = 2; -} - -// PacketReceiptAbsenceData returns the SignBytes data for -// packet receipt absence verification. -message PacketReceiptAbsenceData { - bytes path = 1; -} - -// NextSequenceRecvData returns the SignBytes data for verification of the next -// sequence to be received. -message NextSequenceRecvData { - bytes path = 1; - uint64 next_seq_recv = 2 [(gogoproto.moretags) = "yaml:\"next_seq_recv\""]; -} diff --git a/ampd/proto/third_party/ibc/lightclients/solomachine/v2/solomachine.proto b/ampd/proto/third_party/ibc/lightclients/solomachine/v2/solomachine.proto deleted file mode 100644 index c735fdddd..000000000 --- a/ampd/proto/third_party/ibc/lightclients/solomachine/v2/solomachine.proto +++ /dev/null @@ -1,189 +0,0 @@ -syntax = "proto3"; - -package ibc.lightclients.solomachine.v2; - -option go_package = "github.com/cosmos/ibc-go/v4/modules/light-clients/06-solomachine/types"; - -import "ibc/core/connection/v1/connection.proto"; -import "ibc/core/channel/v1/channel.proto"; -import "gogoproto/gogo.proto"; -import "google/protobuf/any.proto"; - -// ClientState defines a solo machine client that tracks the current consensus -// state and if the client is frozen. -message ClientState { - option (gogoproto.goproto_getters) = false; - // latest sequence of the client state - uint64 sequence = 1; - // frozen sequence of the solo machine - bool is_frozen = 2 [(gogoproto.moretags) = "yaml:\"is_frozen\""]; - ConsensusState consensus_state = 3 [(gogoproto.moretags) = "yaml:\"consensus_state\""]; - // when set to true, will allow governance to update a solo machine client. - // The client will be unfrozen if it is frozen. - bool allow_update_after_proposal = 4 [(gogoproto.moretags) = "yaml:\"allow_update_after_proposal\""]; -} - -// ConsensusState defines a solo machine consensus state. The sequence of a -// consensus state is contained in the "height" key used in storing the -// consensus state. -message ConsensusState { - option (gogoproto.goproto_getters) = false; - // public key of the solo machine - google.protobuf.Any public_key = 1 [(gogoproto.moretags) = "yaml:\"public_key\""]; - // diversifier allows the same public key to be re-used across different solo - // machine clients (potentially on different chains) without being considered - // misbehaviour. - string diversifier = 2; - uint64 timestamp = 3; -} - -// Header defines a solo machine consensus header -message Header { - option (gogoproto.goproto_getters) = false; - // sequence to update solo machine public key at - uint64 sequence = 1; - uint64 timestamp = 2; - bytes signature = 3; - google.protobuf.Any new_public_key = 4 [(gogoproto.moretags) = "yaml:\"new_public_key\""]; - string new_diversifier = 5 [(gogoproto.moretags) = "yaml:\"new_diversifier\""]; -} - -// Misbehaviour defines misbehaviour for a solo machine which consists -// of a sequence and two signatures over different messages at that sequence. -message Misbehaviour { - option (gogoproto.goproto_getters) = false; - string client_id = 1 [(gogoproto.moretags) = "yaml:\"client_id\""]; - uint64 sequence = 2; - SignatureAndData signature_one = 3 [(gogoproto.moretags) = "yaml:\"signature_one\""]; - SignatureAndData signature_two = 4 [(gogoproto.moretags) = "yaml:\"signature_two\""]; -} - -// SignatureAndData contains a signature and the data signed over to create that -// signature. -message SignatureAndData { - option (gogoproto.goproto_getters) = false; - bytes signature = 1; - DataType data_type = 2 [(gogoproto.moretags) = "yaml:\"data_type\""]; - bytes data = 3; - uint64 timestamp = 4; -} - -// TimestampedSignatureData contains the signature data and the timestamp of the -// signature. -message TimestampedSignatureData { - option (gogoproto.goproto_getters) = false; - bytes signature_data = 1 [(gogoproto.moretags) = "yaml:\"signature_data\""]; - uint64 timestamp = 2; -} - -// SignBytes defines the signed bytes used for signature verification. -message SignBytes { - option (gogoproto.goproto_getters) = false; - - uint64 sequence = 1; - uint64 timestamp = 2; - string diversifier = 3; - // type of the data used - DataType data_type = 4 [(gogoproto.moretags) = "yaml:\"data_type\""]; - // marshaled data - bytes data = 5; -} - -// DataType defines the type of solo machine proof being created. This is done -// to preserve uniqueness of different data sign byte encodings. -enum DataType { - option (gogoproto.goproto_enum_prefix) = false; - - // Default State - DATA_TYPE_UNINITIALIZED_UNSPECIFIED = 0 [(gogoproto.enumvalue_customname) = "UNSPECIFIED"]; - // Data type for client state verification - DATA_TYPE_CLIENT_STATE = 1 [(gogoproto.enumvalue_customname) = "CLIENT"]; - // Data type for consensus state verification - DATA_TYPE_CONSENSUS_STATE = 2 [(gogoproto.enumvalue_customname) = "CONSENSUS"]; - // Data type for connection state verification - DATA_TYPE_CONNECTION_STATE = 3 [(gogoproto.enumvalue_customname) = "CONNECTION"]; - // Data type for channel state verification - DATA_TYPE_CHANNEL_STATE = 4 [(gogoproto.enumvalue_customname) = "CHANNEL"]; - // Data type for packet commitment verification - DATA_TYPE_PACKET_COMMITMENT = 5 [(gogoproto.enumvalue_customname) = "PACKETCOMMITMENT"]; - // Data type for packet acknowledgement verification - DATA_TYPE_PACKET_ACKNOWLEDGEMENT = 6 [(gogoproto.enumvalue_customname) = "PACKETACKNOWLEDGEMENT"]; - // Data type for packet receipt absence verification - DATA_TYPE_PACKET_RECEIPT_ABSENCE = 7 [(gogoproto.enumvalue_customname) = "PACKETRECEIPTABSENCE"]; - // Data type for next sequence recv verification - DATA_TYPE_NEXT_SEQUENCE_RECV = 8 [(gogoproto.enumvalue_customname) = "NEXTSEQUENCERECV"]; - // Data type for header verification - DATA_TYPE_HEADER = 9 [(gogoproto.enumvalue_customname) = "HEADER"]; -} - -// HeaderData returns the SignBytes data for update verification. -message HeaderData { - option (gogoproto.goproto_getters) = false; - - // header public key - google.protobuf.Any new_pub_key = 1 [(gogoproto.moretags) = "yaml:\"new_pub_key\""]; - // header diversifier - string new_diversifier = 2 [(gogoproto.moretags) = "yaml:\"new_diversifier\""]; -} - -// ClientStateData returns the SignBytes data for client state verification. -message ClientStateData { - option (gogoproto.goproto_getters) = false; - - bytes path = 1; - google.protobuf.Any client_state = 2 [(gogoproto.moretags) = "yaml:\"client_state\""]; -} - -// ConsensusStateData returns the SignBytes data for consensus state -// verification. -message ConsensusStateData { - option (gogoproto.goproto_getters) = false; - - bytes path = 1; - google.protobuf.Any consensus_state = 2 [(gogoproto.moretags) = "yaml:\"consensus_state\""]; -} - -// ConnectionStateData returns the SignBytes data for connection state -// verification. -message ConnectionStateData { - option (gogoproto.goproto_getters) = false; - - bytes path = 1; - ibc.core.connection.v1.ConnectionEnd connection = 2; -} - -// ChannelStateData returns the SignBytes data for channel state -// verification. -message ChannelStateData { - option (gogoproto.goproto_getters) = false; - - bytes path = 1; - ibc.core.channel.v1.Channel channel = 2; -} - -// PacketCommitmentData returns the SignBytes data for packet commitment -// verification. -message PacketCommitmentData { - bytes path = 1; - bytes commitment = 2; -} - -// PacketAcknowledgementData returns the SignBytes data for acknowledgement -// verification. -message PacketAcknowledgementData { - bytes path = 1; - bytes acknowledgement = 2; -} - -// PacketReceiptAbsenceData returns the SignBytes data for -// packet receipt absence verification. -message PacketReceiptAbsenceData { - bytes path = 1; -} - -// NextSequenceRecvData returns the SignBytes data for verification of the next -// sequence to be received. -message NextSequenceRecvData { - bytes path = 1; - uint64 next_seq_recv = 2 [(gogoproto.moretags) = "yaml:\"next_seq_recv\""]; -} diff --git a/ampd/proto/third_party/ibc/lightclients/tendermint/v1/tendermint.proto b/ampd/proto/third_party/ibc/lightclients/tendermint/v1/tendermint.proto deleted file mode 100644 index 55a4e0690..000000000 --- a/ampd/proto/third_party/ibc/lightclients/tendermint/v1/tendermint.proto +++ /dev/null @@ -1,114 +0,0 @@ -syntax = "proto3"; - -package ibc.lightclients.tendermint.v1; - -option go_package = "github.com/cosmos/ibc-go/v4/modules/light-clients/07-tendermint/types"; - -import "tendermint/types/validator.proto"; -import "tendermint/types/types.proto"; -import "proofs.proto"; -import "google/protobuf/duration.proto"; -import "google/protobuf/timestamp.proto"; -import "ibc/core/client/v1/client.proto"; -import "ibc/core/commitment/v1/commitment.proto"; -import "gogoproto/gogo.proto"; - -// ClientState from Tendermint tracks the current validator set, latest height, -// and a possible frozen height. -message ClientState { - option (gogoproto.goproto_getters) = false; - - string chain_id = 1; - Fraction trust_level = 2 [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"trust_level\""]; - // duration of the period since the LastestTimestamp during which the - // submitted headers are valid for upgrade - google.protobuf.Duration trusting_period = 3 - [(gogoproto.nullable) = false, (gogoproto.stdduration) = true, (gogoproto.moretags) = "yaml:\"trusting_period\""]; - // duration of the staking unbonding period - google.protobuf.Duration unbonding_period = 4 [ - (gogoproto.nullable) = false, - (gogoproto.stdduration) = true, - (gogoproto.moretags) = "yaml:\"unbonding_period\"" - ]; - // defines how much new (untrusted) header's Time can drift into the future. - google.protobuf.Duration max_clock_drift = 5 - [(gogoproto.nullable) = false, (gogoproto.stdduration) = true, (gogoproto.moretags) = "yaml:\"max_clock_drift\""]; - // Block height when the client was frozen due to a misbehaviour - ibc.core.client.v1.Height frozen_height = 6 - [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"frozen_height\""]; - // Latest height the client was updated to - ibc.core.client.v1.Height latest_height = 7 - [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"latest_height\""]; - - // Proof specifications used in verifying counterparty state - repeated ics23.ProofSpec proof_specs = 8 [(gogoproto.moretags) = "yaml:\"proof_specs\""]; - - // Path at which next upgraded client will be committed. - // Each element corresponds to the key for a single CommitmentProof in the - // chained proof. NOTE: ClientState must stored under - // `{upgradePath}/{upgradeHeight}/clientState` ConsensusState must be stored - // under `{upgradepath}/{upgradeHeight}/consensusState` For SDK chains using - // the default upgrade module, upgrade_path should be []string{"upgrade", - // "upgradedIBCState"}` - repeated string upgrade_path = 9 [(gogoproto.moretags) = "yaml:\"upgrade_path\""]; - - // allow_update_after_expiry is deprecated - bool allow_update_after_expiry = 10 [deprecated = true, (gogoproto.moretags) = "yaml:\"allow_update_after_expiry\""]; - // allow_update_after_misbehaviour is deprecated - bool allow_update_after_misbehaviour = 11 - [deprecated = true, (gogoproto.moretags) = "yaml:\"allow_update_after_misbehaviour\""]; -} - -// ConsensusState defines the consensus state from Tendermint. -message ConsensusState { - option (gogoproto.goproto_getters) = false; - - // timestamp that corresponds to the block height in which the ConsensusState - // was stored. - google.protobuf.Timestamp timestamp = 1 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; - // commitment root (i.e app hash) - ibc.core.commitment.v1.MerkleRoot root = 2 [(gogoproto.nullable) = false]; - bytes next_validators_hash = 3 [ - (gogoproto.casttype) = "github.com/tendermint/tendermint/libs/bytes.HexBytes", - (gogoproto.moretags) = "yaml:\"next_validators_hash\"" - ]; -} - -// Misbehaviour is a wrapper over two conflicting Headers -// that implements Misbehaviour interface expected by ICS-02 -message Misbehaviour { - option (gogoproto.goproto_getters) = false; - - string client_id = 1 [(gogoproto.moretags) = "yaml:\"client_id\""]; - Header header_1 = 2 [(gogoproto.customname) = "Header1", (gogoproto.moretags) = "yaml:\"header_1\""]; - Header header_2 = 3 [(gogoproto.customname) = "Header2", (gogoproto.moretags) = "yaml:\"header_2\""]; -} - -// Header defines the Tendermint client consensus Header. -// It encapsulates all the information necessary to update from a trusted -// Tendermint ConsensusState. The inclusion of TrustedHeight and -// TrustedValidators allows this update to process correctly, so long as the -// ConsensusState for the TrustedHeight exists, this removes race conditions -// among relayers The SignedHeader and ValidatorSet are the new untrusted update -// fields for the client. The TrustedHeight is the height of a stored -// ConsensusState on the client that will be used to verify the new untrusted -// header. The Trusted ConsensusState must be within the unbonding period of -// current time in order to correctly verify, and the TrustedValidators must -// hash to TrustedConsensusState.NextValidatorsHash since that is the last -// trusted validator set at the TrustedHeight. -message Header { - .tendermint.types.SignedHeader signed_header = 1 - [(gogoproto.embed) = true, (gogoproto.moretags) = "yaml:\"signed_header\""]; - - .tendermint.types.ValidatorSet validator_set = 2 [(gogoproto.moretags) = "yaml:\"validator_set\""]; - ibc.core.client.v1.Height trusted_height = 3 - [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"trusted_height\""]; - .tendermint.types.ValidatorSet trusted_validators = 4 [(gogoproto.moretags) = "yaml:\"trusted_validators\""]; -} - -// Fraction defines the protobuf message type for tmmath.Fraction that only -// supports positive values. -message Fraction { - uint64 numerator = 1; - uint64 denominator = 2; -} diff --git a/ampd/proto/third_party/proofs.proto b/ampd/proto/third_party/proofs.proto deleted file mode 100644 index 88b50c1b3..000000000 --- a/ampd/proto/third_party/proofs.proto +++ /dev/null @@ -1,234 +0,0 @@ -syntax = "proto3"; - -package ics23; -option go_package = "github.com/confio/ics23/go"; -enum HashOp { - // NO_HASH is the default if no data passed. Note this is an illegal argument some places. - NO_HASH = 0; - SHA256 = 1; - SHA512 = 2; - KECCAK = 3; - RIPEMD160 = 4; - BITCOIN = 5; // ripemd160(sha256(x)) - SHA512_256 = 6; -} - -/** -LengthOp defines how to process the key and value of the LeafOp -to include length information. After encoding the length with the given -algorithm, the length will be prepended to the key and value bytes. -(Each one with it's own encoded length) -*/ -enum LengthOp { - // NO_PREFIX don't include any length info - NO_PREFIX = 0; - // VAR_PROTO uses protobuf (and go-amino) varint encoding of the length - VAR_PROTO = 1; - // VAR_RLP uses rlp int encoding of the length - VAR_RLP = 2; - // FIXED32_BIG uses big-endian encoding of the length as a 32 bit integer - FIXED32_BIG = 3; - // FIXED32_LITTLE uses little-endian encoding of the length as a 32 bit integer - FIXED32_LITTLE = 4; - // FIXED64_BIG uses big-endian encoding of the length as a 64 bit integer - FIXED64_BIG = 5; - // FIXED64_LITTLE uses little-endian encoding of the length as a 64 bit integer - FIXED64_LITTLE = 6; - // REQUIRE_32_BYTES is like NONE, but will fail if the input is not exactly 32 bytes (sha256 output) - REQUIRE_32_BYTES = 7; - // REQUIRE_64_BYTES is like NONE, but will fail if the input is not exactly 64 bytes (sha512 output) - REQUIRE_64_BYTES = 8; -} - -/** -ExistenceProof takes a key and a value and a set of steps to perform on it. -The result of peforming all these steps will provide a "root hash", which can -be compared to the value in a header. - -Since it is computationally infeasible to produce a hash collission for any of the used -cryptographic hash functions, if someone can provide a series of operations to transform -a given key and value into a root hash that matches some trusted root, these key and values -must be in the referenced merkle tree. - -The only possible issue is maliablity in LeafOp, such as providing extra prefix data, -which should be controlled by a spec. Eg. with lengthOp as NONE, - prefix = FOO, key = BAR, value = CHOICE -and - prefix = F, key = OOBAR, value = CHOICE -would produce the same value. - -With LengthOp this is tricker but not impossible. Which is why the "leafPrefixEqual" field -in the ProofSpec is valuable to prevent this mutability. And why all trees should -length-prefix the data before hashing it. -*/ -message ExistenceProof { - bytes key = 1; - bytes value = 2; - LeafOp leaf = 3; - repeated InnerOp path = 4; -} - -/* -NonExistenceProof takes a proof of two neighbors, one left of the desired key, -one right of the desired key. If both proofs are valid AND they are neighbors, -then there is no valid proof for the given key. -*/ -message NonExistenceProof { - bytes key = 1; // TODO: remove this as unnecessary??? we prove a range - ExistenceProof left = 2; - ExistenceProof right = 3; -} - -/* -CommitmentProof is either an ExistenceProof or a NonExistenceProof, or a Batch of such messages -*/ -message CommitmentProof { - oneof proof { - ExistenceProof exist = 1; - NonExistenceProof nonexist = 2; - BatchProof batch = 3; - CompressedBatchProof compressed = 4; - } -} - -/** -LeafOp represents the raw key-value data we wish to prove, and -must be flexible to represent the internal transformation from -the original key-value pairs into the basis hash, for many existing -merkle trees. - -key and value are passed in. So that the signature of this operation is: - leafOp(key, value) -> output - -To process this, first prehash the keys and values if needed (ANY means no hash in this case): - hkey = prehashKey(key) - hvalue = prehashValue(value) - -Then combine the bytes, and hash it - output = hash(prefix || length(hkey) || hkey || length(hvalue) || hvalue) -*/ -message LeafOp { - HashOp hash = 1; - HashOp prehash_key = 2; - HashOp prehash_value = 3; - LengthOp length = 4; - // prefix is a fixed bytes that may optionally be included at the beginning to differentiate - // a leaf node from an inner node. - bytes prefix = 5; -} - -/** -InnerOp represents a merkle-proof step that is not a leaf. -It represents concatenating two children and hashing them to provide the next result. - -The result of the previous step is passed in, so the signature of this op is: - innerOp(child) -> output - -The result of applying InnerOp should be: - output = op.hash(op.prefix || child || op.suffix) - - where the || operator is concatenation of binary data, -and child is the result of hashing all the tree below this step. - -Any special data, like prepending child with the length, or prepending the entire operation with -some value to differentiate from leaf nodes, should be included in prefix and suffix. -If either of prefix or suffix is empty, we just treat it as an empty string -*/ -message InnerOp { - HashOp hash = 1; - bytes prefix = 2; - bytes suffix = 3; -} - - -/** -ProofSpec defines what the expected parameters are for a given proof type. -This can be stored in the client and used to validate any incoming proofs. - - verify(ProofSpec, Proof) -> Proof | Error - -As demonstrated in tests, if we don't fix the algorithm used to calculate the -LeafHash for a given tree, there are many possible key-value pairs that can -generate a given hash (by interpretting the preimage differently). -We need this for proper security, requires client knows a priori what -tree format server uses. But not in code, rather a configuration object. -*/ -message ProofSpec { - // any field in the ExistenceProof must be the same as in this spec. - // except Prefix, which is just the first bytes of prefix (spec can be longer) - LeafOp leaf_spec = 1; - InnerSpec inner_spec = 2; - // max_depth (if > 0) is the maximum number of InnerOps allowed (mainly for fixed-depth tries) - int32 max_depth = 3; - // min_depth (if > 0) is the minimum number of InnerOps allowed (mainly for fixed-depth tries) - int32 min_depth = 4; -} - -/* -InnerSpec contains all store-specific structure info to determine if two proofs from a -given store are neighbors. - -This enables: - - isLeftMost(spec: InnerSpec, op: InnerOp) - isRightMost(spec: InnerSpec, op: InnerOp) - isLeftNeighbor(spec: InnerSpec, left: InnerOp, right: InnerOp) -*/ -message InnerSpec { - // Child order is the ordering of the children node, must count from 0 - // iavl tree is [0, 1] (left then right) - // merk is [0, 2, 1] (left, right, here) - repeated int32 child_order = 1; - int32 child_size = 2; - int32 min_prefix_length = 3; - int32 max_prefix_length = 4; - // empty child is the prehash image that is used when one child is nil (eg. 20 bytes of 0) - bytes empty_child = 5; - // hash is the algorithm that must be used for each InnerOp - HashOp hash = 6; -} - -/* -BatchProof is a group of multiple proof types than can be compressed -*/ -message BatchProof { - repeated BatchEntry entries = 1; -} - -// Use BatchEntry not CommitmentProof, to avoid recursion -message BatchEntry { - oneof proof { - ExistenceProof exist = 1; - NonExistenceProof nonexist = 2; - } -} - - -/****** all items here are compressed forms *******/ - -message CompressedBatchProof { - repeated CompressedBatchEntry entries = 1; - repeated InnerOp lookup_inners = 2; -} - -// Use BatchEntry not CommitmentProof, to avoid recursion -message CompressedBatchEntry { - oneof proof { - CompressedExistenceProof exist = 1; - CompressedNonExistenceProof nonexist = 2; - } -} - -message CompressedExistenceProof { - bytes key = 1; - bytes value = 2; - LeafOp leaf = 3; - // these are indexes into the lookup_inners table in CompressedBatchProof - repeated int32 path = 4; -} - -message CompressedNonExistenceProof { - bytes key = 1; // TODO: remove this as unnecessary??? we prove a range - CompressedExistenceProof left = 2; - CompressedExistenceProof right = 3; -} diff --git a/ampd/proto/third_party/tendermint/abci/types.proto b/ampd/proto/third_party/tendermint/abci/types.proto deleted file mode 100644 index 44f861129..000000000 --- a/ampd/proto/third_party/tendermint/abci/types.proto +++ /dev/null @@ -1,413 +0,0 @@ -syntax = "proto3"; -package tendermint.abci; - -option go_package = "github.com/tendermint/tendermint/abci/types"; - -// For more information on gogo.proto, see: -// https://github.com/gogo/protobuf/blob/master/extensions.md -import "tendermint/crypto/proof.proto"; -import "tendermint/types/types.proto"; -import "tendermint/crypto/keys.proto"; -import "tendermint/types/params.proto"; -import "google/protobuf/timestamp.proto"; -import "gogoproto/gogo.proto"; - -// This file is copied from http://github.com/tendermint/abci -// NOTE: When using custom types, mind the warnings. -// https://github.com/gogo/protobuf/blob/master/custom_types.md#warnings-and-issues - -//---------------------------------------- -// Request types - -message Request { - oneof value { - RequestEcho echo = 1; - RequestFlush flush = 2; - RequestInfo info = 3; - RequestSetOption set_option = 4; - RequestInitChain init_chain = 5; - RequestQuery query = 6; - RequestBeginBlock begin_block = 7; - RequestCheckTx check_tx = 8; - RequestDeliverTx deliver_tx = 9; - RequestEndBlock end_block = 10; - RequestCommit commit = 11; - RequestListSnapshots list_snapshots = 12; - RequestOfferSnapshot offer_snapshot = 13; - RequestLoadSnapshotChunk load_snapshot_chunk = 14; - RequestApplySnapshotChunk apply_snapshot_chunk = 15; - } -} - -message RequestEcho { - string message = 1; -} - -message RequestFlush {} - -message RequestInfo { - string version = 1; - uint64 block_version = 2; - uint64 p2p_version = 3; -} - -// nondeterministic -message RequestSetOption { - string key = 1; - string value = 2; -} - -message RequestInitChain { - google.protobuf.Timestamp time = 1 - [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; - string chain_id = 2; - ConsensusParams consensus_params = 3; - repeated ValidatorUpdate validators = 4 [(gogoproto.nullable) = false]; - bytes app_state_bytes = 5; - int64 initial_height = 6; -} - -message RequestQuery { - bytes data = 1; - string path = 2; - int64 height = 3; - bool prove = 4; -} - -message RequestBeginBlock { - bytes hash = 1; - tendermint.types.Header header = 2 [(gogoproto.nullable) = false]; - LastCommitInfo last_commit_info = 3 [(gogoproto.nullable) = false]; - repeated Evidence byzantine_validators = 4 [(gogoproto.nullable) = false]; -} - -enum CheckTxType { - NEW = 0 [(gogoproto.enumvalue_customname) = "New"]; - RECHECK = 1 [(gogoproto.enumvalue_customname) = "Recheck"]; -} - -message RequestCheckTx { - bytes tx = 1; - CheckTxType type = 2; -} - -message RequestDeliverTx { - bytes tx = 1; -} - -message RequestEndBlock { - int64 height = 1; -} - -message RequestCommit {} - -// lists available snapshots -message RequestListSnapshots {} - -// offers a snapshot to the application -message RequestOfferSnapshot { - Snapshot snapshot = 1; // snapshot offered by peers - bytes app_hash = 2; // light client-verified app hash for snapshot height -} - -// loads a snapshot chunk -message RequestLoadSnapshotChunk { - uint64 height = 1; - uint32 format = 2; - uint32 chunk = 3; -} - -// Applies a snapshot chunk -message RequestApplySnapshotChunk { - uint32 index = 1; - bytes chunk = 2; - string sender = 3; -} - -//---------------------------------------- -// Response types - -message Response { - oneof value { - ResponseException exception = 1; - ResponseEcho echo = 2; - ResponseFlush flush = 3; - ResponseInfo info = 4; - ResponseSetOption set_option = 5; - ResponseInitChain init_chain = 6; - ResponseQuery query = 7; - ResponseBeginBlock begin_block = 8; - ResponseCheckTx check_tx = 9; - ResponseDeliverTx deliver_tx = 10; - ResponseEndBlock end_block = 11; - ResponseCommit commit = 12; - ResponseListSnapshots list_snapshots = 13; - ResponseOfferSnapshot offer_snapshot = 14; - ResponseLoadSnapshotChunk load_snapshot_chunk = 15; - ResponseApplySnapshotChunk apply_snapshot_chunk = 16; - } -} - -// nondeterministic -message ResponseException { - string error = 1; -} - -message ResponseEcho { - string message = 1; -} - -message ResponseFlush {} - -message ResponseInfo { - string data = 1; - - string version = 2; - uint64 app_version = 3; - - int64 last_block_height = 4; - bytes last_block_app_hash = 5; -} - -// nondeterministic -message ResponseSetOption { - uint32 code = 1; - // bytes data = 2; - string log = 3; - string info = 4; -} - -message ResponseInitChain { - ConsensusParams consensus_params = 1; - repeated ValidatorUpdate validators = 2 [(gogoproto.nullable) = false]; - bytes app_hash = 3; -} - -message ResponseQuery { - uint32 code = 1; - // bytes data = 2; // use "value" instead. - string log = 3; // nondeterministic - string info = 4; // nondeterministic - int64 index = 5; - bytes key = 6; - bytes value = 7; - tendermint.crypto.ProofOps proof_ops = 8; - int64 height = 9; - string codespace = 10; -} - -message ResponseBeginBlock { - repeated Event events = 1 - [(gogoproto.nullable) = false, (gogoproto.jsontag) = "events,omitempty"]; -} - -message ResponseCheckTx { - uint32 code = 1; - bytes data = 2; - string log = 3; // nondeterministic - string info = 4; // nondeterministic - int64 gas_wanted = 5 [json_name = "gas_wanted"]; - int64 gas_used = 6 [json_name = "gas_used"]; - repeated Event events = 7 - [(gogoproto.nullable) = false, (gogoproto.jsontag) = "events,omitempty"]; - string codespace = 8; - string sender = 9; - int64 priority = 10; - - // mempool_error is set by CometBFT. - // ABCI applictions creating a ResponseCheckTX should not set mempool_error. - string mempool_error = 11; -} - -message ResponseDeliverTx { - uint32 code = 1; - bytes data = 2; - string log = 3; // nondeterministic - string info = 4; // nondeterministic - int64 gas_wanted = 5 [json_name = "gas_wanted"]; - int64 gas_used = 6 [json_name = "gas_used"]; - repeated Event events = 7 [ - (gogoproto.nullable) = false, - (gogoproto.jsontag) = "events,omitempty" - ]; // nondeterministic - string codespace = 8; -} - -message ResponseEndBlock { - repeated ValidatorUpdate validator_updates = 1 [(gogoproto.nullable) = false]; - ConsensusParams consensus_param_updates = 2; - repeated Event events = 3 - [(gogoproto.nullable) = false, (gogoproto.jsontag) = "events,omitempty"]; -} - -message ResponseCommit { - // reserve 1 - bytes data = 2; - int64 retain_height = 3; -} - -message ResponseListSnapshots { - repeated Snapshot snapshots = 1; -} - -message ResponseOfferSnapshot { - Result result = 1; - - enum Result { - UNKNOWN = 0; // Unknown result, abort all snapshot restoration - ACCEPT = 1; // Snapshot accepted, apply chunks - ABORT = 2; // Abort all snapshot restoration - REJECT = 3; // Reject this specific snapshot, try others - REJECT_FORMAT = 4; // Reject all snapshots of this format, try others - REJECT_SENDER = 5; // Reject all snapshots from the sender(s), try others - } -} - -message ResponseLoadSnapshotChunk { - bytes chunk = 1; -} - -message ResponseApplySnapshotChunk { - Result result = 1; - repeated uint32 refetch_chunks = 2; // Chunks to refetch and reapply - repeated string reject_senders = 3; // Chunk senders to reject and ban - - enum Result { - UNKNOWN = 0; // Unknown result, abort all snapshot restoration - ACCEPT = 1; // Chunk successfully accepted - ABORT = 2; // Abort all snapshot restoration - RETRY = 3; // Retry chunk (combine with refetch and reject) - RETRY_SNAPSHOT = 4; // Retry snapshot (combine with refetch and reject) - REJECT_SNAPSHOT = 5; // Reject this snapshot, try others - } -} - -//---------------------------------------- -// Misc. - -// ConsensusParams contains all consensus-relevant parameters -// that can be adjusted by the abci app -message ConsensusParams { - BlockParams block = 1; - tendermint.types.EvidenceParams evidence = 2; - tendermint.types.ValidatorParams validator = 3; - tendermint.types.VersionParams version = 4; -} - -// BlockParams contains limits on the block size. -message BlockParams { - // Note: must be greater than 0 - int64 max_bytes = 1; - // Note: must be greater or equal to -1 - int64 max_gas = 2; -} - -message LastCommitInfo { - int32 round = 1; - repeated VoteInfo votes = 2 [(gogoproto.nullable) = false]; -} - -// Event allows application developers to attach additional information to -// ResponseBeginBlock, ResponseEndBlock, ResponseCheckTx and ResponseDeliverTx. -// Later, transactions may be queried using these events. -message Event { - string type = 1; - repeated EventAttribute attributes = 2 [ - (gogoproto.nullable) = false, - (gogoproto.jsontag) = "attributes,omitempty" - ]; -} - -// EventAttribute is a single key-value pair, associated with an event. -message EventAttribute { - bytes key = 1; - bytes value = 2; - bool index = 3; // nondeterministic -} - -// TxResult contains results of executing the transaction. -// -// One usage is indexing transaction results. -message TxResult { - int64 height = 1; - uint32 index = 2; - bytes tx = 3; - ResponseDeliverTx result = 4 [(gogoproto.nullable) = false]; -} - -//---------------------------------------- -// Blockchain Types - -// Validator -message Validator { - bytes address = 1; // The first 20 bytes of SHA256(public key) - // PubKey pub_key = 2 [(gogoproto.nullable)=false]; - int64 power = 3; // The voting power -} - -// ValidatorUpdate -message ValidatorUpdate { - tendermint.crypto.PublicKey pub_key = 1 [(gogoproto.nullable) = false]; - int64 power = 2; -} - -// VoteInfo -message VoteInfo { - Validator validator = 1 [(gogoproto.nullable) = false]; - bool signed_last_block = 2; -} - -enum EvidenceType { - UNKNOWN = 0; - DUPLICATE_VOTE = 1; - LIGHT_CLIENT_ATTACK = 2; -} - -message Evidence { - EvidenceType type = 1; - // The offending validator - Validator validator = 2 [(gogoproto.nullable) = false]; - // The height when the offense occurred - int64 height = 3; - // The corresponding time where the offense occurred - google.protobuf.Timestamp time = 4 - [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; - // Total voting power of the validator set in case the ABCI application does - // not store historical validators. - // https://github.com/tendermint/tendermint/issues/4581 - int64 total_voting_power = 5; -} - -//---------------------------------------- -// State Sync Types - -message Snapshot { - uint64 height = 1; // The height at which the snapshot was taken - uint32 format = 2; // The application-specific snapshot format - uint32 chunks = 3; // Number of chunks in the snapshot - bytes hash = 4; // Arbitrary snapshot hash, equal only if identical - bytes metadata = 5; // Arbitrary application metadata -} - -//---------------------------------------- -// Service Definition - -service ABCIApplication { - rpc Echo(RequestEcho) returns (ResponseEcho); - rpc Flush(RequestFlush) returns (ResponseFlush); - rpc Info(RequestInfo) returns (ResponseInfo); - rpc SetOption(RequestSetOption) returns (ResponseSetOption); - rpc DeliverTx(RequestDeliverTx) returns (ResponseDeliverTx); - rpc CheckTx(RequestCheckTx) returns (ResponseCheckTx); - rpc Query(RequestQuery) returns (ResponseQuery); - rpc Commit(RequestCommit) returns (ResponseCommit); - rpc InitChain(RequestInitChain) returns (ResponseInitChain); - rpc BeginBlock(RequestBeginBlock) returns (ResponseBeginBlock); - rpc EndBlock(RequestEndBlock) returns (ResponseEndBlock); - rpc ListSnapshots(RequestListSnapshots) returns (ResponseListSnapshots); - rpc OfferSnapshot(RequestOfferSnapshot) returns (ResponseOfferSnapshot); - rpc LoadSnapshotChunk(RequestLoadSnapshotChunk) - returns (ResponseLoadSnapshotChunk); - rpc ApplySnapshotChunk(RequestApplySnapshotChunk) - returns (ResponseApplySnapshotChunk); -} diff --git a/ampd/proto/third_party/tendermint/crypto/keys.proto b/ampd/proto/third_party/tendermint/crypto/keys.proto deleted file mode 100644 index 5b94ddaec..000000000 --- a/ampd/proto/third_party/tendermint/crypto/keys.proto +++ /dev/null @@ -1,17 +0,0 @@ -syntax = "proto3"; -package tendermint.crypto; - -option go_package = "github.com/tendermint/tendermint/proto/tendermint/crypto"; - -import "gogoproto/gogo.proto"; - -// PublicKey defines the keys available for use with Validators -message PublicKey { - option (gogoproto.compare) = true; - option (gogoproto.equal) = true; - - oneof sum { - bytes ed25519 = 1; - bytes secp256k1 = 2; - } -} diff --git a/ampd/proto/third_party/tendermint/crypto/proof.proto b/ampd/proto/third_party/tendermint/crypto/proof.proto deleted file mode 100644 index 975df7685..000000000 --- a/ampd/proto/third_party/tendermint/crypto/proof.proto +++ /dev/null @@ -1,41 +0,0 @@ -syntax = "proto3"; -package tendermint.crypto; - -option go_package = "github.com/tendermint/tendermint/proto/tendermint/crypto"; - -import "gogoproto/gogo.proto"; - -message Proof { - int64 total = 1; - int64 index = 2; - bytes leaf_hash = 3; - repeated bytes aunts = 4; -} - -message ValueOp { - // Encoded in ProofOp.Key. - bytes key = 1; - - // To encode in ProofOp.Data - Proof proof = 2; -} - -message DominoOp { - string key = 1; - string input = 2; - string output = 3; -} - -// ProofOp defines an operation used for calculating Merkle root -// The data could be arbitrary format, providing nessecary data -// for example neighbouring node hash -message ProofOp { - string type = 1; - bytes key = 2; - bytes data = 3; -} - -// ProofOps is Merkle proof defined by the list of ProofOps -message ProofOps { - repeated ProofOp ops = 1 [(gogoproto.nullable) = false]; -} diff --git a/ampd/proto/third_party/tendermint/libs/bits/types.proto b/ampd/proto/third_party/tendermint/libs/bits/types.proto deleted file mode 100644 index 3111d113a..000000000 --- a/ampd/proto/third_party/tendermint/libs/bits/types.proto +++ /dev/null @@ -1,9 +0,0 @@ -syntax = "proto3"; -package tendermint.libs.bits; - -option go_package = "github.com/tendermint/tendermint/proto/tendermint/libs/bits"; - -message BitArray { - int64 bits = 1; - repeated uint64 elems = 2; -} diff --git a/ampd/proto/third_party/tendermint/p2p/types.proto b/ampd/proto/third_party/tendermint/p2p/types.proto deleted file mode 100644 index 0d42ea400..000000000 --- a/ampd/proto/third_party/tendermint/p2p/types.proto +++ /dev/null @@ -1,34 +0,0 @@ -syntax = "proto3"; -package tendermint.p2p; - -option go_package = "github.com/tendermint/tendermint/proto/tendermint/p2p"; - -import "gogoproto/gogo.proto"; - -message NetAddress { - string id = 1 [(gogoproto.customname) = "ID"]; - string ip = 2 [(gogoproto.customname) = "IP"]; - uint32 port = 3; -} - -message ProtocolVersion { - uint64 p2p = 1 [(gogoproto.customname) = "P2P"]; - uint64 block = 2; - uint64 app = 3; -} - -message DefaultNodeInfo { - ProtocolVersion protocol_version = 1 [(gogoproto.nullable) = false]; - string default_node_id = 2 [(gogoproto.customname) = "DefaultNodeID"]; - string listen_addr = 3; - string network = 4; - string version = 5; - bytes channels = 6; - string moniker = 7; - DefaultNodeInfoOther other = 8 [(gogoproto.nullable) = false]; -} - -message DefaultNodeInfoOther { - string tx_index = 1; - string rpc_address = 2 [(gogoproto.customname) = "RPCAddress"]; -} diff --git a/ampd/proto/third_party/tendermint/types/block.proto b/ampd/proto/third_party/tendermint/types/block.proto deleted file mode 100644 index 84e9bb15d..000000000 --- a/ampd/proto/third_party/tendermint/types/block.proto +++ /dev/null @@ -1,15 +0,0 @@ -syntax = "proto3"; -package tendermint.types; - -option go_package = "github.com/tendermint/tendermint/proto/tendermint/types"; - -import "gogoproto/gogo.proto"; -import "tendermint/types/types.proto"; -import "tendermint/types/evidence.proto"; - -message Block { - Header header = 1 [(gogoproto.nullable) = false]; - Data data = 2 [(gogoproto.nullable) = false]; - tendermint.types.EvidenceList evidence = 3 [(gogoproto.nullable) = false]; - Commit last_commit = 4; -} diff --git a/ampd/proto/third_party/tendermint/types/evidence.proto b/ampd/proto/third_party/tendermint/types/evidence.proto deleted file mode 100644 index 451b8dca3..000000000 --- a/ampd/proto/third_party/tendermint/types/evidence.proto +++ /dev/null @@ -1,38 +0,0 @@ -syntax = "proto3"; -package tendermint.types; - -option go_package = "github.com/tendermint/tendermint/proto/tendermint/types"; - -import "gogoproto/gogo.proto"; -import "google/protobuf/timestamp.proto"; -import "tendermint/types/types.proto"; -import "tendermint/types/validator.proto"; - -message Evidence { - oneof sum { - DuplicateVoteEvidence duplicate_vote_evidence = 1; - LightClientAttackEvidence light_client_attack_evidence = 2; - } -} - -// DuplicateVoteEvidence contains evidence of a validator signed two conflicting votes. -message DuplicateVoteEvidence { - tendermint.types.Vote vote_a = 1; - tendermint.types.Vote vote_b = 2; - int64 total_voting_power = 3; - int64 validator_power = 4; - google.protobuf.Timestamp timestamp = 5 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; -} - -// LightClientAttackEvidence contains evidence of a set of validators attempting to mislead a light client. -message LightClientAttackEvidence { - tendermint.types.LightBlock conflicting_block = 1; - int64 common_height = 2; - repeated tendermint.types.Validator byzantine_validators = 3; - int64 total_voting_power = 4; - google.protobuf.Timestamp timestamp = 5 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; -} - -message EvidenceList { - repeated Evidence evidence = 1 [(gogoproto.nullable) = false]; -} diff --git a/ampd/proto/third_party/tendermint/types/params.proto b/ampd/proto/third_party/tendermint/types/params.proto deleted file mode 100644 index 0de7d846f..000000000 --- a/ampd/proto/third_party/tendermint/types/params.proto +++ /dev/null @@ -1,80 +0,0 @@ -syntax = "proto3"; -package tendermint.types; - -option go_package = "github.com/tendermint/tendermint/proto/tendermint/types"; - -import "gogoproto/gogo.proto"; -import "google/protobuf/duration.proto"; - -option (gogoproto.equal_all) = true; - -// ConsensusParams contains consensus critical parameters that determine the -// validity of blocks. -message ConsensusParams { - BlockParams block = 1 [(gogoproto.nullable) = false]; - EvidenceParams evidence = 2 [(gogoproto.nullable) = false]; - ValidatorParams validator = 3 [(gogoproto.nullable) = false]; - VersionParams version = 4 [(gogoproto.nullable) = false]; -} - -// BlockParams contains limits on the block size. -message BlockParams { - // Max block size, in bytes. - // Note: must be greater than 0 - int64 max_bytes = 1; - // Max gas per block. - // Note: must be greater or equal to -1 - int64 max_gas = 2; - // Minimum time increment between consecutive blocks (in milliseconds) If the - // block header timestamp is ahead of the system clock, decrease this value. - // - // Not exposed to the application. - int64 time_iota_ms = 3; -} - -// EvidenceParams determine how we handle evidence of malfeasance. -message EvidenceParams { - // Max age of evidence, in blocks. - // - // The basic formula for calculating this is: MaxAgeDuration / {average block - // time}. - int64 max_age_num_blocks = 1; - - // Max age of evidence, in time. - // - // It should correspond with an app's "unbonding period" or other similar - // mechanism for handling [Nothing-At-Stake - // attacks](https://github.com/ethereum/wiki/wiki/Proof-of-Stake-FAQ#what-is-the-nothing-at-stake-problem-and-how-can-it-be-fixed). - google.protobuf.Duration max_age_duration = 2 - [(gogoproto.nullable) = false, (gogoproto.stdduration) = true]; - - // This sets the maximum size of total evidence in bytes that can be committed in a single block. - // and should fall comfortably under the max block bytes. - // Default is 1048576 or 1MB - int64 max_bytes = 3; -} - -// ValidatorParams restrict the public key types validators can use. -// NOTE: uses ABCI pubkey naming, not Amino names. -message ValidatorParams { - option (gogoproto.populate) = true; - option (gogoproto.equal) = true; - - repeated string pub_key_types = 1; -} - -// VersionParams contains the ABCI application version. -message VersionParams { - option (gogoproto.populate) = true; - option (gogoproto.equal) = true; - - uint64 app_version = 1; -} - -// HashedParams is a subset of ConsensusParams. -// -// It is hashed into the Header.ConsensusHash. -message HashedParams { - int64 block_max_bytes = 1; - int64 block_max_gas = 2; -} diff --git a/ampd/proto/third_party/tendermint/types/types.proto b/ampd/proto/third_party/tendermint/types/types.proto deleted file mode 100644 index 3ce169459..000000000 --- a/ampd/proto/third_party/tendermint/types/types.proto +++ /dev/null @@ -1,157 +0,0 @@ -syntax = "proto3"; -package tendermint.types; - -option go_package = "github.com/tendermint/tendermint/proto/tendermint/types"; - -import "gogoproto/gogo.proto"; -import "google/protobuf/timestamp.proto"; -import "tendermint/crypto/proof.proto"; -import "tendermint/version/types.proto"; -import "tendermint/types/validator.proto"; - -// BlockIdFlag indicates which BlcokID the signature is for -enum BlockIDFlag { - option (gogoproto.goproto_enum_stringer) = true; - option (gogoproto.goproto_enum_prefix) = false; - - BLOCK_ID_FLAG_UNKNOWN = 0 [(gogoproto.enumvalue_customname) = "BlockIDFlagUnknown"]; - BLOCK_ID_FLAG_ABSENT = 1 [(gogoproto.enumvalue_customname) = "BlockIDFlagAbsent"]; - BLOCK_ID_FLAG_COMMIT = 2 [(gogoproto.enumvalue_customname) = "BlockIDFlagCommit"]; - BLOCK_ID_FLAG_NIL = 3 [(gogoproto.enumvalue_customname) = "BlockIDFlagNil"]; -} - -// SignedMsgType is a type of signed message in the consensus. -enum SignedMsgType { - option (gogoproto.goproto_enum_stringer) = true; - option (gogoproto.goproto_enum_prefix) = false; - - SIGNED_MSG_TYPE_UNKNOWN = 0 [(gogoproto.enumvalue_customname) = "UnknownType"]; - // Votes - SIGNED_MSG_TYPE_PREVOTE = 1 [(gogoproto.enumvalue_customname) = "PrevoteType"]; - SIGNED_MSG_TYPE_PRECOMMIT = 2 [(gogoproto.enumvalue_customname) = "PrecommitType"]; - - // Proposals - SIGNED_MSG_TYPE_PROPOSAL = 32 [(gogoproto.enumvalue_customname) = "ProposalType"]; -} - -// PartsetHeader -message PartSetHeader { - uint32 total = 1; - bytes hash = 2; -} - -message Part { - uint32 index = 1; - bytes bytes = 2; - tendermint.crypto.Proof proof = 3 [(gogoproto.nullable) = false]; -} - -// BlockID -message BlockID { - bytes hash = 1; - PartSetHeader part_set_header = 2 [(gogoproto.nullable) = false]; -} - -// -------------------------------- - -// Header defines the structure of a block header. -message Header { - // basic block info - tendermint.version.Consensus version = 1 [(gogoproto.nullable) = false]; - string chain_id = 2 [(gogoproto.customname) = "ChainID"]; - int64 height = 3; - google.protobuf.Timestamp time = 4 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; - - // prev block info - BlockID last_block_id = 5 [(gogoproto.nullable) = false]; - - // hashes of block data - bytes last_commit_hash = 6; // commit from validators from the last block - bytes data_hash = 7; // transactions - - // hashes from the app output from the prev block - bytes validators_hash = 8; // validators for the current block - bytes next_validators_hash = 9; // validators for the next block - bytes consensus_hash = 10; // consensus params for current block - bytes app_hash = 11; // state after txs from the previous block - bytes last_results_hash = 12; // root hash of all results from the txs from the previous block - - // consensus info - bytes evidence_hash = 13; // evidence included in the block - bytes proposer_address = 14; // original proposer of the block -} - -// Data contains the set of transactions included in the block -message Data { - // Txs that will be applied by state @ block.Height+1. - // NOTE: not all txs here are valid. We're just agreeing on the order first. - // This means that block.AppHash does not include these txs. - repeated bytes txs = 1; -} - -// Vote represents a prevote, precommit, or commit vote from validators for -// consensus. -message Vote { - SignedMsgType type = 1; - int64 height = 2; - int32 round = 3; - BlockID block_id = 4 - [(gogoproto.nullable) = false, (gogoproto.customname) = "BlockID"]; // zero if vote is nil. - google.protobuf.Timestamp timestamp = 5 - [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; - bytes validator_address = 6; - int32 validator_index = 7; - bytes signature = 8; -} - -// Commit contains the evidence that a block was committed by a set of validators. -message Commit { - int64 height = 1; - int32 round = 2; - BlockID block_id = 3 [(gogoproto.nullable) = false, (gogoproto.customname) = "BlockID"]; - repeated CommitSig signatures = 4 [(gogoproto.nullable) = false]; -} - -// CommitSig is a part of the Vote included in a Commit. -message CommitSig { - BlockIDFlag block_id_flag = 1; - bytes validator_address = 2; - google.protobuf.Timestamp timestamp = 3 - [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; - bytes signature = 4; -} - -message Proposal { - SignedMsgType type = 1; - int64 height = 2; - int32 round = 3; - int32 pol_round = 4; - BlockID block_id = 5 [(gogoproto.customname) = "BlockID", (gogoproto.nullable) = false]; - google.protobuf.Timestamp timestamp = 6 - [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; - bytes signature = 7; -} - -message SignedHeader { - Header header = 1; - Commit commit = 2; -} - -message LightBlock { - SignedHeader signed_header = 1; - tendermint.types.ValidatorSet validator_set = 2; -} - -message BlockMeta { - BlockID block_id = 1 [(gogoproto.customname) = "BlockID", (gogoproto.nullable) = false]; - int64 block_size = 2; - Header header = 3 [(gogoproto.nullable) = false]; - int64 num_txs = 4; -} - -// TxProof represents a Merkle proof of the presence of a transaction in the Merkle tree. -message TxProof { - bytes root_hash = 1; - bytes data = 2; - tendermint.crypto.Proof proof = 3; -} diff --git a/ampd/proto/third_party/tendermint/types/validator.proto b/ampd/proto/third_party/tendermint/types/validator.proto deleted file mode 100644 index 49860b96d..000000000 --- a/ampd/proto/third_party/tendermint/types/validator.proto +++ /dev/null @@ -1,25 +0,0 @@ -syntax = "proto3"; -package tendermint.types; - -option go_package = "github.com/tendermint/tendermint/proto/tendermint/types"; - -import "gogoproto/gogo.proto"; -import "tendermint/crypto/keys.proto"; - -message ValidatorSet { - repeated Validator validators = 1; - Validator proposer = 2; - int64 total_voting_power = 3; -} - -message Validator { - bytes address = 1; - tendermint.crypto.PublicKey pub_key = 2 [(gogoproto.nullable) = false]; - int64 voting_power = 3; - int64 proposer_priority = 4; -} - -message SimpleValidator { - tendermint.crypto.PublicKey pub_key = 1; - int64 voting_power = 2; -} diff --git a/ampd/proto/third_party/tendermint/version/types.proto b/ampd/proto/third_party/tendermint/version/types.proto deleted file mode 100644 index 6061868bd..000000000 --- a/ampd/proto/third_party/tendermint/version/types.proto +++ /dev/null @@ -1,24 +0,0 @@ -syntax = "proto3"; -package tendermint.version; - -option go_package = "github.com/tendermint/tendermint/proto/tendermint/version"; - -import "gogoproto/gogo.proto"; - -// App includes the protocol and software version for the application. -// This information is included in ResponseInfo. The App.Protocol can be -// updated in ResponseEndBlock. -message App { - uint64 protocol = 1; - string software = 2; -} - -// Consensus captures the consensus rules for processing a block in the blockchain, -// including all blockchain data structures and the rules of the application's -// state transition machine. -message Consensus { - option (gogoproto.equal) = true; - - uint64 block = 1; - uint64 app = 2; -} diff --git a/ampd/src/broadcaster/confirm_tx.rs b/ampd/src/broadcaster/confirm_tx.rs deleted file mode 100644 index c9770ec97..000000000 --- a/ampd/src/broadcaster/confirm_tx.rs +++ /dev/null @@ -1,352 +0,0 @@ -use std::time::Duration; - -use axelar_wasm_std::FnExt; -use cosmrs::proto::cosmos::tx::v1beta1::{GetTxRequest, GetTxResponse}; -use error_stack::{report, Report, Result}; -use futures::{StreamExt, TryFutureExt}; -use thiserror::Error; -use tokio::sync::{mpsc, Mutex}; -use tokio::time; -use tokio_stream::wrappers::ReceiverStream; -use tonic::Status; -use tracing::error; - -use super::cosmos; - -#[derive(Debug, PartialEq)] -pub enum TxStatus { - Success, - Failure, -} - -impl From for TxStatus { - fn from(code: u32) -> Self { - match code { - 0 => Self::Success, - _ => Self::Failure, - } - } -} - -#[derive(Debug, PartialEq)] -pub struct TxResponse { - pub status: TxStatus, - pub response: cosmrs::proto::cosmos::base::abci::v1beta1::TxResponse, -} - -impl From for TxResponse { - fn from(response: cosmrs::proto::cosmos::base::abci::v1beta1::TxResponse) -> Self { - Self { - status: response.code.into(), - response, - } - } -} - -#[derive(Error, Debug)] -pub enum Error { - #[error("failed confirming tx due to tx not found: {tx_hash}")] - Confirmation { tx_hash: String }, - #[error("failed confirming tx due to grpc error {status}: {tx_hash}")] - Grpc { status: Status, tx_hash: String }, - #[error("failed sending tx response")] - SendTxRes(#[from] Box>), -} - -enum ConfirmationResult { - Confirmed(Box), - NotFound, - GRPCError(Status), -} - -pub struct TxConfirmer -where - T: cosmos::BroadcastClient, -{ - client: T, - sleep: Duration, - max_attempts: u32, - tx_hash_receiver: mpsc::Receiver, - tx_res_sender: mpsc::Sender, -} - -impl TxConfirmer -where - T: cosmos::BroadcastClient, -{ - pub fn new( - client: T, - sleep: Duration, - max_attempts: u32, - tx_hash_receiver: mpsc::Receiver, - tx_res_sender: mpsc::Sender, - ) -> Self { - Self { - client, - sleep, - max_attempts, - tx_hash_receiver, - tx_res_sender, - } - } - - pub async fn run(self) -> Result<(), Error> { - let Self { - client, - sleep, - max_attempts, - tx_hash_receiver, - tx_res_sender, - } = self; - let limit = tx_hash_receiver.capacity(); - let client = Mutex::new(client); - let mut tx_hash_stream = ReceiverStream::new(tx_hash_receiver) - .map(|tx_hash| { - confirm_tx(&client, tx_hash, sleep, max_attempts).and_then(|tx| async { - tx_res_sender - .send(tx) - .await - .map_err(Box::new) - .map_err(Into::into) - .map_err(Report::new) - }) - }) - .buffer_unordered(limit); - - while let Some(res) = tx_hash_stream.next().await { - res?; - } - - Ok(()) - } -} - -async fn confirm_tx( - client: &Mutex, - tx_hash: String, - sleep: Duration, - attempts: u32, -) -> Result -where - T: cosmos::BroadcastClient, -{ - for i in 0..attempts { - let req = GetTxRequest { - hash: tx_hash.clone(), - }; - - match client - .lock() - .await - .get_tx(req) - .await - .then(evaluate_tx_response) - { - ConfirmationResult::Confirmed(tx) => return Ok(*tx), - ConfirmationResult::NotFound if i == attempts.saturating_sub(1) => { - return Err(report!(Error::Confirmation { tx_hash })) - } - ConfirmationResult::GRPCError(status) if i == attempts.saturating_sub(1) => { - return Err(report!(Error::Grpc { status, tx_hash })) - } - _ => time::sleep(sleep).await, - } - } - - unreachable!("confirmation loop should have returned by now") -} - -fn evaluate_tx_response( - response: core::result::Result, -) -> ConfirmationResult { - match response { - Err(status) => ConfirmationResult::GRPCError(status), - Ok(GetTxResponse { - tx_response: None, .. - }) => ConfirmationResult::NotFound, - Ok(GetTxResponse { - tx_response: Some(response), - .. - }) => ConfirmationResult::Confirmed(Box::new(response.into())), - } -} - -#[cfg(test)] -mod test { - use std::time::Duration; - - use cosmrs::proto::cosmos::tx::v1beta1::GetTxRequest; - use mockall::predicate; - use tokio::sync::mpsc; - use tokio::test; - - use super::{Error, TxConfirmer, TxResponse, TxStatus}; - use crate::broadcaster::cosmos::MockBroadcastClient; - - #[test] - async fn should_confirm_successful_tx_and_send_it_back() { - let tx_hash = "tx_hash".to_string(); - let tx_response = cosmrs::proto::cosmos::base::abci::v1beta1::TxResponse { - code: 0, - txhash: tx_hash.clone(), - ..Default::default() - }; - let tx_res = cosmrs::proto::cosmos::tx::v1beta1::GetTxResponse { - tx_response: Some(tx_response.clone()), - ..Default::default() - }; - - let mut client = MockBroadcastClient::new(); - client - .expect_get_tx() - .with(predicate::eq(GetTxRequest { - hash: tx_hash.clone(), - })) - .return_once(|_| Ok(tx_res)); - - let sleep = Duration::from_secs(5); - let max_attempts = 3; - let (tx_confirmer_sender, tx_confirmer_receiver) = mpsc::channel(100); - let (tx_res_sender, mut tx_res_receiver) = mpsc::channel(100); - - let tx_confirmer = TxConfirmer::new( - client, - sleep, - max_attempts, - tx_confirmer_receiver, - tx_res_sender, - ); - let handle = tokio::spawn(tx_confirmer.run()); - - tx_confirmer_sender.send(tx_hash).await.unwrap(); - assert_eq!( - tx_res_receiver.recv().await.unwrap(), - TxResponse { - status: TxStatus::Success, - response: tx_response - } - ); - drop(tx_confirmer_sender); - assert!(handle.await.unwrap().is_ok()); - } - - #[test] - async fn should_confirm_failed_tx_and_send_it_back() { - let tx_hash = "tx_hash".to_string(); - let tx_response = cosmrs::proto::cosmos::base::abci::v1beta1::TxResponse { - code: 1, - txhash: tx_hash.clone(), - ..Default::default() - }; - let tx_res = cosmrs::proto::cosmos::tx::v1beta1::GetTxResponse { - tx_response: Some(tx_response.clone()), - ..Default::default() - }; - - let mut client = MockBroadcastClient::new(); - client - .expect_get_tx() - .with(predicate::eq(GetTxRequest { - hash: tx_hash.clone(), - })) - .return_once(|_| Ok(tx_res)); - - let sleep = Duration::from_secs(5); - let max_attempts = 3; - let (tx_confirmer_sender, tx_confirmer_receiver) = mpsc::channel(100); - let (tx_res_sender, mut tx_res_receiver) = mpsc::channel(100); - - let tx_confirmer = TxConfirmer::new( - client, - sleep, - max_attempts, - tx_confirmer_receiver, - tx_res_sender, - ); - let handle = tokio::spawn(tx_confirmer.run()); - - tx_confirmer_sender.send(tx_hash).await.unwrap(); - assert_eq!( - tx_res_receiver.recv().await.unwrap(), - TxResponse { - status: TxStatus::Failure, - response: tx_response - } - ); - drop(tx_confirmer_sender); - assert!(handle.await.unwrap().is_ok()); - } - - #[test] - async fn should_retry_when_tx_is_not_found() { - let tx_hash = "tx_hash".to_string(); - - let mut client = MockBroadcastClient::new(); - client - .expect_get_tx() - .with(predicate::eq(GetTxRequest { - hash: tx_hash.clone(), - })) - .times(3) - .returning(|_| Ok(cosmrs::proto::cosmos::tx::v1beta1::GetTxResponse::default())); - - let sleep = Duration::from_millis(100); - let max_attempts = 3; - let (tx_confirmer_sender, tx_confirmer_receiver) = mpsc::channel(100); - let (tx_res_sender, _tx_res_receiver) = mpsc::channel(100); - - let tx_confirmer = TxConfirmer::new( - client, - sleep, - max_attempts, - tx_confirmer_receiver, - tx_res_sender, - ); - let handle = tokio::spawn(tx_confirmer.run()); - - tx_confirmer_sender.send(tx_hash.clone()).await.unwrap(); - assert!(matches!( - handle.await.unwrap().unwrap_err().current_context(), - Error::Confirmation { tx_hash: actual } if *actual == tx_hash - )); - } - - #[test] - async fn should_retry_when_grpc_error() { - let tx_hash = "tx_hash".to_string(); - - let mut client = MockBroadcastClient::new(); - client - .expect_get_tx() - .with(predicate::eq(GetTxRequest { - hash: tx_hash.clone(), - })) - .times(3) - .returning(|_| { - Err(tonic::Status::new( - tonic::Code::Internal, - "internal server error", - )) - }); - - let sleep = Duration::from_millis(100); - let max_attempts = 3; - let (tx_confirmer_sender, tx_confirmer_receiver) = mpsc::channel(100); - let (tx_res_sender, _tx_res_receiver) = mpsc::channel(100); - - let tx_confirmer = TxConfirmer::new( - client, - sleep, - max_attempts, - tx_confirmer_receiver, - tx_res_sender, - ); - let handle = tokio::spawn(tx_confirmer.run()); - - tx_confirmer_sender.send(tx_hash.clone()).await.unwrap(); - assert!(matches!( - handle.await.unwrap().unwrap_err().current_context(), - Error::Grpc { tx_hash: actual, status } if *actual == tx_hash && status.code() == tonic::Code::Internal - )); - } -} diff --git a/ampd/src/broadcaster/mod.rs b/ampd/src/broadcaster/mod.rs index 487c4e53f..dea57bd1d 100644 --- a/ampd/src/broadcaster/mod.rs +++ b/ampd/src/broadcaster/mod.rs @@ -1,7 +1,7 @@ -use std::cmp; use std::convert::TryInto; use std::ops::Mul; use std::time::Duration; +use std::{cmp, thread}; use async_trait::async_trait; use axelar_wasm_std::FnExt; @@ -10,32 +10,34 @@ use cosmrs::proto::cosmos::auth::v1beta1::{ }; use cosmrs::proto::cosmos::bank::v1beta1::QueryBalanceRequest; use cosmrs::proto::cosmos::base::abci::v1beta1::TxResponse; -use cosmrs::proto::cosmos::tx::v1beta1::{BroadcastMode, BroadcastTxRequest, SimulateRequest}; +use cosmrs::proto::cosmos::tx::v1beta1::{ + BroadcastMode, BroadcastTxRequest, GetTxRequest, GetTxResponse, SimulateRequest, +}; use cosmrs::proto::traits::MessageExt; use cosmrs::tendermint::chain::Id; use cosmrs::tx::Fee; use cosmrs::{Amount, Coin, Denom, Gas}; use dec_coin::DecCoin; -use error_stack::{ensure, report, FutureExt, Result, ResultExt}; +use error_stack::{ensure, report, FutureExt, Report, Result, ResultExt}; use futures::TryFutureExt; use k256::sha2::{Digest, Sha256}; use mockall::automock; use num_traits::{cast, Zero}; use prost::Message; use prost_types::Any; -use report::ResultCompatExt; +use report::{LoggableError, ResultCompatExt}; use serde::{Deserialize, Serialize}; use thiserror::Error; use tonic::{Code, Status}; -use tracing::info; +use tracing::{debug, info}; use tx::Tx; use typed_builder::TypedBuilder; +use valuable::Valuable; use crate::tofnd; use crate::tofnd::grpc::Multisig; use crate::types::{PublicKey, TMAddress}; -pub mod confirm_tx; mod cosmos; mod dec_coin; mod tx; @@ -50,6 +52,10 @@ pub enum Error { FeeEstimation, #[error("broadcast failed")] Broadcast, + #[error("failed to confirm inclusion in block for tx with hash '{tx_hash}'")] + TxConfirmation { tx_hash: String }, + #[error("failed to execute tx")] + Execution, #[error("failed to query balance for address '{address}' and denomination '{denom}'")] QueryBalance { address: TMAddress, denom: Denom }, #[error("failed to query account for address '{address}'")] @@ -96,7 +102,6 @@ impl Default for Config { #[automock] #[async_trait] pub trait Broadcaster { - fn sender_address(&self) -> TMAddress; async fn broadcast(&mut self, msgs: Vec) -> Result; async fn estimate_fee(&mut self, msgs: Vec) -> Result; } @@ -210,10 +215,6 @@ where S: Multisig + Send + Sync, Q: cosmos::AccountQueryClient + Send, { - fn sender_address(&self) -> TMAddress { - self.address.clone() - } - async fn broadcast(&mut self, msgs: Vec) -> Result { let (acc_number, acc_sequence) = self.acc_number_and_sequence().await?; let tx = Tx::builder() @@ -258,6 +259,10 @@ where info!(tx_hash, "broadcasted transaction"); + self.confirm_tx(tx_hash).await?; + + info!(tx_hash, "confirmed transaction"); + self.acc_sequence.replace( acc_sequence .checked_add(1) @@ -347,6 +352,48 @@ where }) .await } + + async fn confirm_tx(&mut self, tx_hash: &str) -> Result<(), Error> { + let mut result: Result<(), Status> = Ok(()); + + for i in 0..self.config.tx_fetch_max_retries.saturating_add(1) { + if i > 0 { + thread::sleep(self.config.tx_fetch_interval) + } + + let response = self + .client + .get_tx(GetTxRequest { + hash: tx_hash.to_string(), + }) + .await; + + match evaluate_tx_response(response) { + ConfirmationResult::Success => { + if let Err(report) = result { + debug!( + err = LoggableError::from(&report).as_value(), + "tx confirmed after {} retries", i + ) + } + + return Ok(()); + } + ConfirmationResult::Critical(err) => return Err(err), + ConfirmationResult::Retriable(err) => { + if let Err(result) = result.as_mut() { + result.extend_one(err); + } else { + result = Err(err); + } + } + }; + } + + result.change_context(Error::TxConfirmation { + tx_hash: tx_hash.to_string(), + }) + } } fn decode_base_account(account: Any) -> Result { @@ -357,6 +404,27 @@ fn decode_base_account(account: Any) -> Result { .attach_printable_lazy(|| format!("{{ value = {:?} }}", account.value)) } +fn evaluate_tx_response( + response: core::result::Result, +) -> ConfirmationResult { + match response { + Err(err) => ConfirmationResult::Retriable(report!(err)), + Ok(GetTxResponse { + tx_response: None, .. + }) => ConfirmationResult::Retriable(Report::new(Status::not_found("tx not found"))), + Ok(GetTxResponse { + tx_response: Some(response), + .. + }) => match response { + TxResponse { code: 0, .. } => ConfirmationResult::Success, + _ => ConfirmationResult::Critical( + report!(Error::Execution) + .attach_printable(format!("{{ response = {response:?} }}")), + ), + }, + } +} + fn remap_account_not_found_error( response: core::result::Result, ) -> core::result::Result { @@ -367,6 +435,12 @@ fn remap_account_not_found_error( } } +enum ConfirmationResult { + Success, + Retriable(Report), + Critical(Report), +} + #[cfg(test)] mod tests { use cosmrs::bank::MsgSend; @@ -490,6 +564,72 @@ mod tests { )); } + #[test] + async fn tx_confirmation_failed() { + let mut client = MockBroadcastClient::new(); + client.expect_simulate().returning(|_| { + Ok(SimulateResponse { + gas_info: Some(GasInfo { + gas_wanted: 0, + gas_used: 0, + }), + result: None, + }) + }); + client + .expect_broadcast_tx() + .returning(|_| Ok(TxResponse::default())); + client + .expect_get_tx() + .times((Config::default().tx_fetch_max_retries + 1) as usize) + .returning(|_| Err(Status::deadline_exceeded("time out"))); + + let mut broadcaster = init_validated_broadcaster(None, None, Some(client)).await; + let msgs = vec![dummy_msg()]; + + assert!(matches!( + broadcaster + .broadcast(msgs) + .await + .unwrap_err() + .current_context(), + Error::TxConfirmation { .. } + )); + } + + #[test] + async fn tx_execution_failed() { + let mut client = MockBroadcastClient::new(); + client.expect_simulate().returning(|_| { + Ok(SimulateResponse { + gas_info: Some(GasInfo { + gas_wanted: 0, + gas_used: 0, + }), + result: None, + }) + }); + client + .expect_broadcast_tx() + .returning(|_| Ok(TxResponse::default())); + client.expect_get_tx().times(1).returning(|_| { + Ok(GetTxResponse { + tx_response: Some(TxResponse { + code: 32, + ..TxResponse::default() + }), + ..GetTxResponse::default() + }) + }); + + let mut broadcaster = init_validated_broadcaster(None, None, Some(client)).await; + let msgs = vec![dummy_msg()]; + + let report = broadcaster.broadcast(msgs).await.unwrap_err(); + + assert!(matches!(report.current_context(), Error::Execution)); + } + #[test] async fn broadcast_confirmed() { let mut broadcaster = init_validated_broadcaster(None, None, None).await; diff --git a/ampd/src/lib.rs b/ampd/src/lib.rs index a134c2fae..08804d5fb 100644 --- a/ampd/src/lib.rs +++ b/ampd/src/lib.rs @@ -2,7 +2,6 @@ use std::time::Duration; use asyncutil::task::{CancellableTask, TaskError, TaskGroup}; use block_height_monitor::BlockHeightMonitor; -use broadcaster::confirm_tx::TxConfirmer; use broadcaster::Broadcaster; use cosmrs::proto::cosmos::auth::v1beta1::query_client::QueryClient as AuthQueryClient; use cosmrs::proto::cosmos::bank::v1beta1::query_client::QueryClient as BankQueryClient; @@ -17,10 +16,8 @@ use router_api::ChainName; use thiserror::Error; use tofnd::grpc::{Multisig, MultisigClient}; use tokio::signal::unix::{signal, SignalKind}; -use tokio::sync::mpsc; use tokio::time::interval; use tokio_util::sync::CancellationToken; -use tonic::transport::Channel; use tracing::info; use types::TMAddress; @@ -95,7 +92,7 @@ async fn prepare_app(cfg: Config) -> Result, Error> { .auth_query_client(auth_query_client) .bank_query_client(bank_query_client) .address_prefix(PREFIX.to_string()) - .client(service_client.clone()) + .client(service_client) .signer(multisig_client.clone()) .pub_key((tofnd_config.key_uid, pub_key)) .config(broadcast.clone()) @@ -114,7 +111,6 @@ async fn prepare_app(cfg: Config) -> Result, Error> { App::new( tm_client, broadcaster, - service_client, multisig_client, broadcast, event_processor.stream_buffer_size, @@ -149,7 +145,6 @@ where event_subscriber: event_sub::EventSubscriber, event_processor: TaskGroup, broadcaster: QueuedBroadcaster, - tx_confirmer: TxConfirmer>, multisig_client: MultisigClient, block_height_monitor: BlockHeightMonitor, health_check_server: health_check::Server, @@ -164,7 +159,6 @@ where fn new( tm_client: tendermint_rpc::HttpClient, broadcaster: T, - service_client: ServiceClient, multisig_client: MultisigClient, broadcast_cfg: broadcaster::Config, event_buffer_cap: usize, @@ -176,24 +170,12 @@ where let (event_publisher, event_subscriber) = event_sub::EventPublisher::new(tm_client, event_buffer_cap); - let (tx_confirmer_sender, tx_confirmer_receiver) = mpsc::channel(1000); - let (tx_res_sender, tx_res_receiver) = mpsc::channel(1000); - let event_processor = TaskGroup::new(); let broadcaster = QueuedBroadcaster::new( broadcaster, broadcast_cfg.batch_gas_limit, broadcast_cfg.queue_cap, interval(broadcast_cfg.broadcast_interval), - tx_confirmer_sender, - tx_res_receiver, - ); - let tx_confirmer = TxConfirmer::new( - service_client, - broadcast_cfg.tx_fetch_interval, - broadcast_cfg.tx_fetch_max_retries.saturating_add(1), - tx_confirmer_receiver, - tx_res_sender, ); Self { @@ -201,7 +183,6 @@ where event_subscriber, event_processor, broadcaster, - tx_confirmer, multisig_client, block_height_monitor, health_check_server, @@ -366,7 +347,6 @@ where event_publisher, event_processor, broadcaster, - tx_confirmer, block_height_monitor, health_check_server, token, @@ -409,9 +389,6 @@ where .run(token) .change_context(Error::EventProcessor) })) - .add_task(CancellableTask::create(|_| { - tx_confirmer.run().change_context(Error::TxConfirmer) - })) .add_task(CancellableTask::create(|_| { broadcaster.run().change_context(Error::Broadcaster) })) @@ -428,8 +405,6 @@ pub enum Error { EventProcessor, #[error("broadcaster failed")] Broadcaster, - #[error("tx confirmer failed")] - TxConfirmer, #[error("tofnd failed")] Tofnd, #[error("connection failed")] diff --git a/ampd/src/queue/mod.rs b/ampd/src/queue/mod.rs index d7568b662..2a6ce0415 100644 --- a/ampd/src/queue/mod.rs +++ b/ampd/src/queue/mod.rs @@ -1,3 +1,2 @@ mod msg_queue; -mod proto; pub mod queued_broadcaster; diff --git a/ampd/src/queue/proto.rs b/ampd/src/queue/proto.rs deleted file mode 100644 index 322f2ab62..000000000 --- a/ampd/src/queue/proto.rs +++ /dev/null @@ -1,42 +0,0 @@ -use cosmrs::proto::traits::TypeUrl; - -pub mod axelar { - pub mod auxiliary { - pub mod v1beta1 { - tonic::include_proto!("axelar.auxiliary.v1beta1"); - } - } -} - -mod cosmos { - pub mod base { - pub mod abci { - pub mod v1beta1 { - tonic::include_proto!("cosmos.base.abci.v1beta1"); - } - } - } -} - -mod tendermint { - #[allow(clippy::large_enum_variant)] - pub mod abci { - tonic::include_proto!("tendermint.abci"); - } - - pub mod crypto { - tonic::include_proto!("tendermint.crypto"); - } - - pub mod types { - tonic::include_proto!("tendermint.types"); - } - - pub mod version { - tonic::include_proto!("tendermint.version"); - } -} - -impl TypeUrl for axelar::auxiliary::v1beta1::BatchRequest { - const TYPE_URL: &'static str = "/axelar.auxiliary.v1beta1.BatchRequest"; -} diff --git a/ampd/src/queue/queued_broadcaster.rs b/ampd/src/queue/queued_broadcaster.rs index 836325acb..cd3feb4ae 100644 --- a/ampd/src/queue/queued_broadcaster.rs +++ b/ampd/src/queue/queued_broadcaster.rs @@ -1,5 +1,4 @@ use async_trait::async_trait; -use cosmrs::tx::MessageExt; use cosmrs::{Any, Gas}; use error_stack::{self, Report, ResultExt}; use mockall::automock; @@ -10,8 +9,6 @@ use tokio::time::Interval; use tracing::{info, warn}; use super::msg_queue::MsgQueue; -use super::proto; -use crate::broadcaster::confirm_tx::{TxResponse, TxStatus}; use crate::broadcaster::Broadcaster; type Result = error_stack::Result; @@ -27,10 +24,6 @@ pub enum Error { Client, #[error("failed to queue message")] Queue, - #[error("failed to confirm transaction")] - TxConfirmation, - #[error("failed to decode tx response")] - DecodeTxResponse(#[from] prost::DecodeError), } #[automock] @@ -65,8 +58,6 @@ where batch_gas_limit: Gas, channel: Option<(mpsc::Sender, mpsc::Receiver)>, broadcast_interval: Interval, - tx_confirmer_sender: mpsc::Sender, - tx_confirmer_receiver: mpsc::Receiver, } impl QueuedBroadcaster @@ -78,8 +69,6 @@ where batch_gas_limit: Gas, capacity: usize, broadcast_interval: Interval, - tx_confirmer_sender: mpsc::Sender, - tx_res_receiver: mpsc::Receiver, ) -> Self { Self { broadcaster, @@ -87,8 +76,6 @@ where batch_gas_limit, channel: Some(mpsc::channel(capacity)), broadcast_interval, - tx_confirmer_sender, - tx_confirmer_receiver: tx_res_receiver, } } @@ -108,18 +95,10 @@ where self.broadcast_all().await?; self.broadcast_interval.reset(); }, - Some(tx_res) = self.tx_confirmer_receiver.recv() => self.handle_tx_res(tx_res).await?, } } - self.clean_up().await - } - - async fn clean_up(mut self) -> Result { self.broadcast_all().await?; - while let Some(tx_res) = self.tx_confirmer_receiver.recv().await { - self.handle_tx_res(tx_res).await?; - } Ok(()) } @@ -135,30 +114,6 @@ where } } - async fn handle_tx_res(&self, tx_res: TxResponse) -> Result { - let tx_hash = tx_res.response.txhash; - - match tx_res.status { - TxStatus::Success => { - tx_res.response.logs.iter().for_each(|log| { - let msg_index = log.msg_index; - - log.events - .iter() - .enumerate() - .for_each(|(event_index, event)| { - info!(tx_hash, msg_index, event_index, "tx event {:?}", event); - }); - }); - } - TxStatus::Failure => { - warn!(tx_hash, "tx failed"); - } - } - - Ok(()) - } - async fn broadcast_all(&mut self) -> Result { let msgs = self.queue.pop_all(); @@ -167,25 +122,11 @@ where n => { info!(message_count = n, "ready to broadcast messages"); - let batch_req = proto::axelar::auxiliary::v1beta1::BatchRequest { - sender: self.broadcaster.sender_address().as_ref().to_bytes(), - messages: msgs, - } - .to_any() - .expect("failed to serialize proto message for batch request"); - - let tx_hash = self - .broadcaster - .broadcast(vec![batch_req]) - .await - .change_context(Error::Broadcast)? - .txhash; - self.tx_confirmer_sender - .send(tx_hash) + self.broadcaster + .broadcast(msgs) .await - .change_context(Error::TxConfirmation)?; - - Ok(()) + .map(|_| ()) + .change_context(Error::Broadcast) } } } @@ -232,20 +173,16 @@ where mod test { use cosmrs::bank::MsgSend; use cosmrs::proto::cosmos::base::abci::v1beta1::TxResponse; - use cosmrs::tx::{Fee, MessageExt, Msg}; + use cosmrs::tx::{Fee, Msg}; use cosmrs::{AccountId, Any}; use error_stack::Report; - use futures::StreamExt; use tokio::sync::mpsc; use tokio::test; use tokio::time::{interval, timeout, Duration, Instant}; - use tokio_stream::wrappers::ReceiverStream; use super::{Error, QueuedBroadcaster}; use crate::broadcaster::{self, MockBroadcaster}; - use crate::queue::proto; use crate::queue::queued_broadcaster::BroadcasterClient; - use crate::PREFIX; #[test] async fn should_ignore_msg_when_fee_estimation_fails() { @@ -254,17 +191,8 @@ mod test { .expect_estimate_fee() .return_once(|_| Err(Report::new(broadcaster::Error::FeeEstimation))); - let (tx_confirmer_sender, _tx_confirmer_receiver) = mpsc::channel(1000); - let (tx_res_sender, tx_res_receiver) = mpsc::channel(1000); let broadcast_interval = interval(Duration::from_secs(5)); - let queued_broadcaster = QueuedBroadcaster::new( - broadcaster, - 100, - 10, - broadcast_interval, - tx_confirmer_sender, - tx_res_receiver, - ); + let queued_broadcaster = QueuedBroadcaster::new(broadcaster, 100, 10, broadcast_interval); let client = queued_broadcaster.client(); let handle = tokio::spawn(queued_broadcaster.run()); @@ -277,7 +205,6 @@ mod test { Error::EstimateFee )); drop(client); - drop(tx_res_sender); assert!(handle.await.unwrap().is_ok()); } @@ -303,39 +230,24 @@ mod test { payer: None, }) }); - broadcaster - .expect_sender_address() - .once() - .returning(|| AccountId::new(PREFIX, &[1, 2, 3]).unwrap().into()); + broadcaster .expect_broadcast() - .once() + .times(1) .returning(move |msgs| { - assert_eq!(msgs.len(), 1); - let msg = msgs.first().unwrap(); - let msg = proto::axelar::auxiliary::v1beta1::BatchRequest::from_any(msg).unwrap(); - assert_eq!(msg.messages.len(), tx_count); - + assert_eq!(msgs.len(), tx_count); tx.try_send(()) .expect("Failed to send broadcast completion signal"); - Ok(TxResponse::default()) }); - let (tx_confirmer_sender, tx_confirmer_receiver) = mpsc::channel(1000); - let (tx_res_sender, tx_res_receiver) = mpsc::channel(1000); let mut broadcast_interval = interval(interval_duration); broadcast_interval.tick().await; - let queued_broadcaster = QueuedBroadcaster::new( - broadcaster, - batch_gas_limit, - tx_count, - broadcast_interval, - tx_confirmer_sender, - tx_res_receiver, - ); + + let queued_broadcaster = + QueuedBroadcaster::new(broadcaster, batch_gas_limit, tx_count, broadcast_interval); let client = queued_broadcaster.client(); - let handle = tokio::spawn(queued_broadcaster.run()); + let _handle = tokio::spawn(queued_broadcaster.run()); let start_time = Instant::now(); @@ -352,14 +264,8 @@ mod test { assert!(elapsed > interval_duration); assert!(elapsed < interval_duration * 2); } - Err(_) => panic!("broadcast did not occur within the expected timeframe"), + Err(_) => panic!("Broadcast did not occur within the expected timeframe"), } - - drop(client); - drop(tx_res_sender); - - assert!(handle.await.unwrap().is_ok()); - assert_eq!(ReceiverStream::new(tx_confirmer_receiver).count().await, 1); } #[test(start_paused = true)] @@ -371,73 +277,52 @@ mod test { let interval_duration = Duration::from_secs(5); let mut broadcaster = MockBroadcaster::new(); + broadcaster.expect_estimate_fee().returning(move |_| { + Ok(Fee { + gas_limit, + amount: vec![], + granter: None, + payer: None, + }) + }); broadcaster - .expect_estimate_fee() - .times(tx_count) - .returning(move |_| { - Ok(Fee { - gas_limit, - amount: vec![], - granter: None, - payer: None, - }) + .expect_broadcast() + .once() + .returning(move |msgs| { + assert_eq!(msgs.len(), 9); + + Ok(TxResponse::default()) }); - broadcaster - .expect_sender_address() - .times(3) - .returning(|| AccountId::new(PREFIX, &[1, 2, 3]).unwrap().into()); - let mut call_count = 0; broadcaster .expect_broadcast() - .times(3) + .once() .returning(move |msgs| { - call_count += 1; - - assert_eq!(msgs.len(), 1); - let msg = msgs.first().unwrap(); - let msg = proto::axelar::auxiliary::v1beta1::BatchRequest::from_any(msg).unwrap(); - - if call_count < 3 { - assert_eq!(msg.messages.len(), 9); - } else { - assert_eq!(msg.messages.len(), 2); - } + assert_eq!(msgs.len(), 9); Ok(TxResponse::default()) }); - let (tx_confirmer_sender, tx_confirmer_receiver) = mpsc::channel(1000); - let (tx_res_sender, tx_res_receiver) = mpsc::channel(1000); + let mut broadcast_interval = interval(interval_duration); - // get rid of tick on startup broadcast_interval.tick().await; - let queued_broadcaster = QueuedBroadcaster::new( - broadcaster, - batch_gas_limit, - batch_size, - broadcast_interval, - tx_confirmer_sender, - tx_res_receiver, - ); + + let queued_broadcaster = + QueuedBroadcaster::new(broadcaster, batch_gas_limit, batch_size, broadcast_interval); let client = queued_broadcaster.client(); - let handle = tokio::spawn(queued_broadcaster.run()); + let _handle = tokio::spawn(queued_broadcaster.run()); let start_time = Instant::now(); for _ in 0..tx_count { client.broadcast(dummy_msg()).await.unwrap(); } + // Advance time by a small amount to allow processing tokio::time::advance(Duration::from_millis(100)).await; let elapsed = start_time.elapsed(); + // Assert that broadcasts happened faster than the interval assert!(elapsed < interval_duration); - - drop(client); - drop(tx_res_sender); - - assert_eq!(ReceiverStream::new(tx_confirmer_receiver).count().await, 3); - assert!(handle.await.unwrap().is_ok()); } #[test(start_paused = true)] @@ -458,52 +343,36 @@ mod test { payer: None, }) }); - broadcaster - .expect_sender_address() - .times(2) - .returning(|| AccountId::new(PREFIX, &[1, 2, 3]).unwrap().into()); - let mut broadcast_count = 0; broadcaster .expect_broadcast() - .times(2) + .once() .returning(move |msgs| { - broadcast_count += 1; + assert_eq!(msgs.len(), tx_count - 1); + Ok(TxResponse::default()) + }); + broadcaster + .expect_broadcast() + .once() + .returning(move |msgs| { assert_eq!(msgs.len(), 1); - let msg = msgs.first().unwrap(); - let msg = proto::axelar::auxiliary::v1beta1::BatchRequest::from_any(msg).unwrap(); - - if broadcast_count == 1 { - assert_eq!(msg.messages.len(), tx_count - 1); - } else { - assert_eq!(msg.messages.len(), 1); - } - Ok(TxResponse::default()) }); - let (tx_confirmer_sender, tx_confirmer_receiver) = mpsc::channel(1000); - let (tx_res_sender, tx_res_receiver) = mpsc::channel(1000); let mut broadcast_interval = interval(Duration::from_secs(5)); // get rid of tick on startup broadcast_interval.tick().await; - let queued_broadcaster = QueuedBroadcaster::new( - broadcaster, - batch_gas_limit, - tx_count, - broadcast_interval, - tx_confirmer_sender, - tx_res_receiver, - ); + + let queued_broadcaster = + QueuedBroadcaster::new(broadcaster, batch_gas_limit, tx_count, broadcast_interval); let client = queued_broadcaster.client(); let handle = tokio::spawn(queued_broadcaster.run()); for _ in 0..tx_count { client.broadcast(dummy_msg()).await.unwrap(); } + drop(client); - drop(tx_res_sender); - assert_eq!(ReceiverStream::new(tx_confirmer_receiver).count().await, 2); assert!(handle.await.unwrap().is_ok()); }