Skip to content

Commit

Permalink
Merge branch 'main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
yihuang authored May 6, 2024
2 parents f0eee3e + 9aa7258 commit 585ad54
Show file tree
Hide file tree
Showing 22 changed files with 75 additions and 77 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
needs: ["release"]
strategy:
matrix:
runner: [macos-latest, macos-14]
runner: [macos-13, macos-14]
runs-on: ${{ matrix.runner }}
environment: release
steps:
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
* [#1377](https://github.com/crypto-org-chain/cronos/pull/1377) Upgrade sdk to 0.50, and integrate block-stm parallel tx execution.
* [#1394](https://github.com/crypto-org-chain/cronos/pull/1394) Add icahost wirings but disable in parameters.
* [#1407](https://github.com/crypto-org-chain/cronos/pull/1407) Add end-to-end encryption module.
* [#1414](https://github.com/crypto-org-chain/cronos/pull/1414) Integrate new evm tx format.

### Improvements

Expand All @@ -16,6 +17,7 @@
* (versiondb) [#1387](https://github.com/crypto-org-chain/cronos/pull/1387) Add dedicated config section for versiondb, prepare for sdk 0.50 integration.
* (e2ee)[#1413](https://github.com/crypto-org-chain/cronos/pull/1413) Add custom keyring implementation for e2ee module.
* (e2ee)[#1415](https://github.com/crypto-org-chain/cronos/pull/1415) Add batch keys query for e2ee module.
* (e2ee)[#1421](https://github.com/crypto-org-chain/cronos/pull/1421) Validate e2ee key when register.

### Bug Fixes

Expand Down
2 changes: 1 addition & 1 deletion SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ Once we receive a vulnerability report, Crypto.org will take these steps to addr
4. Crypto.org will publicly release the security patch for the vulnerability, and acknowledge the security fix in the release notes once the issue has been resolved. Public release notes can reference to the person or people who reported the vulnerability, unless they wish to stay anonymous.

## Contact Us
If you find a security issue, you can report it on the [Cronos Immunefi Bug Bounty Program](https://immunefi.com/bounty/cronos/) or you can contact our team directly at [[email protected]](mailto:[email protected]).
If you find a security issue, you can report it on the [Hackenproof Bug Bounty Program](https://hackenproof.com/cronos) or you can contact our team directly at [[email protected]](mailto:[email protected]).
To communicate sensitive information, you can use the latest key in the
[cryptocom's Keybase account](https://keybase.io/cryptocom/pgp_keys.asc) or use its [chat functionality](https://keybase.io/cryptocom/chat).
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -274,9 +274,9 @@ replace (
// dgrijalva/jwt-go is deprecated and doesn't receive security updates.
// TODO: remove it: https://github.com/cosmos/cosmos-sdk/issues/13134
github.com/dgrijalva/jwt-go => github.com/golang-jwt/jwt/v4 v4.4.2
github.com/ethereum/go-ethereum => github.com/crypto-org-chain/go-ethereum v1.10.20-0.20231207063621-43cf32d91c3e
github.com/ethereum/go-ethereum => github.com/crypto-org-chain/go-ethereum v1.10.20-0.20240425065928-ebb09502e7a7
// block-stm branch
github.com/evmos/ethermint => github.com/crypto-org-chain/ethermint v0.6.1-0.20240419013511-775ac80b75c7
github.com/evmos/ethermint => github.com/crypto-org-chain/ethermint v0.6.1-0.20240502052908-179e436703b3
// Fix upstream GHSA-h395-qcrw-5vmq and GHSA-3vp4-m3rf-835h vulnerabilities.
// TODO Remove it: https://github.com/cosmos/cosmos-sdk/issues/10409
github.com/gin-gonic/gin => github.com/gin-gonic/gin v1.9.0
Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -429,12 +429,12 @@ github.com/crypto-org-chain/cosmos-sdk/store v0.0.0-20240415105151-0108877a3201
github.com/crypto-org-chain/cosmos-sdk/store v0.0.0-20240415105151-0108877a3201/go.mod h1:lfuLI1f4o+0SGtlHQS4x5qsjRcZZfYqG8bp3k8hM0M8=
github.com/crypto-org-chain/cosmos-sdk/x/tx v0.0.0-20240415105151-0108877a3201 h1:DbCOM19ywdL5K+bOy4h+0MppzcPgI2guHnYCfDNnAcM=
github.com/crypto-org-chain/cosmos-sdk/x/tx v0.0.0-20240415105151-0108877a3201/go.mod h1:CBCU6fsRVz23QGFIQBb1DNX2DztJCf3jWyEkHY2nJQ0=
github.com/crypto-org-chain/ethermint v0.6.1-0.20240419013511-775ac80b75c7 h1:tawNK/e1F1AexRdhxC9o6M70IIrbCuvM6C8F/ujHwTY=
github.com/crypto-org-chain/ethermint v0.6.1-0.20240419013511-775ac80b75c7/go.mod h1:OSFT4cvzHl0g2DizYR9vIy5/xRYAvFJrnRydAmgCqyM=
github.com/crypto-org-chain/ethermint v0.6.1-0.20240502052908-179e436703b3 h1:YYmMJowZyiyioNHYnps5hw3XkV1zcXSC3jy/xzqK2Rg=
github.com/crypto-org-chain/ethermint v0.6.1-0.20240502052908-179e436703b3/go.mod h1:9MVSajfKloRP8h2chP78LhCKx5u9O2pCMBvxrmx6+0s=
github.com/crypto-org-chain/go-block-stm v0.0.0-20240408011717-9f11af197bde h1:sQIHTJfVt5VTrF7po9eZiFkZiPjlHbFvnXtGCOoBjNM=
github.com/crypto-org-chain/go-block-stm v0.0.0-20240408011717-9f11af197bde/go.mod h1:iwQTX9xMX8NV9k3o2BiWXA0SswpsZrDk5q3gA7nWYiE=
github.com/crypto-org-chain/go-ethereum v1.10.20-0.20231207063621-43cf32d91c3e h1:vnyepPQ/m25+19xcTuBUdRxmltZ/EjVWNqEjhg7Ummk=
github.com/crypto-org-chain/go-ethereum v1.10.20-0.20231207063621-43cf32d91c3e/go.mod h1:+a8pUj1tOyJ2RinsNQD4326YS+leSoKGiG/uVVb0x6Y=
github.com/crypto-org-chain/go-ethereum v1.10.20-0.20240425065928-ebb09502e7a7 h1:V43F3JFcqG4MUThf9W/DytnPblpR6CcaLBw2Wx6zTgE=
github.com/crypto-org-chain/go-ethereum v1.10.20-0.20240425065928-ebb09502e7a7/go.mod h1:+a8pUj1tOyJ2RinsNQD4326YS+leSoKGiG/uVVb0x6Y=
github.com/danieljoos/wincred v1.2.0 h1:ozqKHaLK0W/ii4KVbbvluM91W2H3Sh0BncbUNPS7jLE=
github.com/danieljoos/wincred v1.2.0/go.mod h1:FzQLLMKBFdvu+osBrnFODiv32YGwCfx0SkRa/eYHgec=
github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
Expand Down
8 changes: 4 additions & 4 deletions gomod2nix.toml
Original file line number Diff line number Diff line change
Expand Up @@ -258,12 +258,12 @@ schema = 3
version = "v1.6.1"
hash = "sha256-zOpoaepCfPLmU9iQji/Ait+SVEHI9eF3rwtW0h/8lho="
[mod."github.com/ethereum/go-ethereum"]
version = "v1.10.20-0.20231207063621-43cf32d91c3e"
hash = "sha256-lDIqRLUrXYCb9mmFBY/+WW+ee69+IkxOgqjHVyo4ij0="
version = "v1.10.20-0.20240425065928-ebb09502e7a7"
hash = "sha256-lE4G5FaRb3MVi9FFVn+WlwsSTOB4SbjmVboKyQ5yB0A="
replaced = "github.com/crypto-org-chain/go-ethereum"
[mod."github.com/evmos/ethermint"]
version = "v0.6.1-0.20240419013511-775ac80b75c7"
hash = "sha256-94bgC0Z+VD8w9j8+mwW/7PJSZlpKdtdR87C1E8hg3T4="
version = "v0.6.1-0.20240502052908-179e436703b3"
hash = "sha256-Qc5A89wi+KCKfFdyvZit5MI4yKDhDvvSjkiYL0EIzNA="
replaced = "github.com/crypto-org-chain/ethermint"
[mod."github.com/fatih/color"]
version = "v1.16.0"
Expand Down
2 changes: 1 addition & 1 deletion integration_tests/configs/default.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
e2ee: {
keys: [{
address: 'crc16z0herz998946wr659lr84c8c556da55dc34hh',
key: std.base64('key'),
key: 'age1k3mpspxytgvx6e0jja0xgrtzz7vw2p00c2a3xmq5ygfzhwh4wg0s35z4c8',
}],
},
gov: {
Expand Down
4 changes: 2 additions & 2 deletions integration_tests/cosmoscli.py
Original file line number Diff line number Diff line change
Expand Up @@ -1852,7 +1852,7 @@ def query_e2ee_key(self, address):
home=self.data_dir,
output="json",
)
)["key"]
).get("key")

def query_e2ee_keys(self, *addresses):
return json.loads(
Expand All @@ -1864,7 +1864,7 @@ def query_e2ee_keys(self, *addresses):
home=self.data_dir,
output="json",
)
)["keys"]
).get("keys")

def register_e2ee_key(self, key, **kwargs):
kwargs.setdefault("gas_prices", DEFAULT_GAS_PRICE)
Expand Down
3 changes: 2 additions & 1 deletion integration_tests/ibc_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,8 @@ def get_balances(chain, addr):

def ibc_multi_transfer(ibc):
chains = [ibc.cronos.cosmos_cli(), ibc.chainmain.cosmos_cli()]
users = [f"user{i}" for i in range(1, 21)]
# FIXME: more users after batch fix
users = [f"user{i}" for i in range(1, 2)]
addrs0 = [chains[0].address(user) for user in users]
addrs1 = [chains[1].address(user) for user in users]
denom0 = "basetcro"
Expand Down
7 changes: 7 additions & 0 deletions integration_tests/test_e2ee.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
def test_register(cronos):
cli = cronos.cosmos_cli()
pubkey0 = cli.keygen(keyring_name="key0")
cli.register_e2ee_key(pubkey0 + "malformed", _from="validator")
assert not cli.query_e2ee_key(cli.address("validator"))


def test_encrypt_decrypt(cronos):
cli = cronos.cosmos_cli()

Expand Down
6 changes: 3 additions & 3 deletions integration_tests/test_ibc_rly.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@
cronos_transfer_source_tokens,
cronos_transfer_source_tokens_with_proxy,
get_balance,
hermes_transfer,
ibc_denom,
ibc_incentivized_transfer,
ibc_multi_transfer,
prepare_network,
rly_transfer,
)
from .utils import (
ADDRS,
Expand Down Expand Up @@ -54,7 +54,7 @@ def ibc(request, tmp_path_factory):
yield from prepare_network(
path,
name,
relayer=cluster.Relayer.HERMES.value,
relayer=cluster.Relayer.RLY.value,
)


Expand Down Expand Up @@ -232,7 +232,7 @@ def test_ibc(ibc):
w3 = ibc.cronos.w3
wait_for_new_blocks(ibc.cronos.cosmos_cli(), 1)
start = w3.eth.get_block_number()
hermes_transfer(ibc)
rly_transfer(ibc)
denom = ibc_denom(channel, src_denom)
dst_addr = eth_to_bech32(cronos_signer2)
old_dst_balance = get_balance(ibc.cronos, dst_addr, dst_denom)
Expand Down
4 changes: 2 additions & 2 deletions nix/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,11 @@ import sources.nixpkgs {
cosmovisor = pkgs.callPackage ./cosmovisor.nix { };
})
(_: pkgs: {
rly = pkgs.buildGo120Module rec {
rly = pkgs.buildGo121Module rec {
name = "rly";
src = sources.relayer;
subPackages = [ "." ];
vendorHash = "sha256-5s5URiAZk59mOfZdUcqYAB/IvzFuBiQH5jDBuh6huTE=";
vendorHash = "sha256-dwKZZu9wKOo2u1/8AAWFx89iC9pWZbCxAERMMAOFsts=";
doCheck = false;
GOWORK = "off";
postInstall = ''
Expand Down
6 changes: 3 additions & 3 deletions nix/sources.json
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,10 @@
"homepage": "https://github.com/crypto-org-chain/relayer",
"owner": "crypto-org-chain",
"repo": "relayer",
"rev": "bd88a2cba9154450924837ecda915688ff8f9e04",
"sha256": "106mf4mc2ag4a5d21lcqpsq7ixvq70097jglw862jz4g9lbxyv8f",
"rev": "9479327b768a0a0e527c1b34eca353afebac5d15",
"sha256": "0ksxv4al8fjq7p8j3s28h23rr1qzn8fv7gmhcpchwz1536jx2kk4",
"type": "tarball",
"url": "https://github.com/crypto-org-chain/relayer/archive/bd88a2cba9154450924837ecda915688ff8f9e04.tar.gz",
"url": "https://github.com/crypto-org-chain/relayer/archive/9479327b768a0a0e527c1b34eca353afebac5d15.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
}
}
4 changes: 2 additions & 2 deletions x/cronos/keeper/evm.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const DefaultGasCap uint64 = 25000000
// CallEVM execute an evm message from native module
func (k Keeper) CallEVM(ctx sdk.Context, to *common.Address, data []byte, value *big.Int, gasLimit uint64) (*core.Message, *evmtypes.MsgEthereumTxResponse, error) {
nonce := k.evmKeeper.GetNonce(ctx, types.EVMModuleAddress)
msg := core.Message{
msg := &core.Message{
From: types.EVMModuleAddress,
To: to,
Nonce: nonce,
Expand All @@ -47,7 +47,7 @@ func (k Keeper) CallEVM(ctx sdk.Context, to *common.Address, data []byte, value
}
}

return &msg, ret, nil
return msg, ret, nil
}

// CallModuleCRC21 call a method of ModuleCRC21 contract
Expand Down
2 changes: 1 addition & 1 deletion x/cronos/keeper/evm_hooks.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ func NewLogProcessEvmHook(handlers ...types.EvmLogHandler) *LogProcessEvmHook {
}

// PostTxProcessing implements EvmHook interface
func (h LogProcessEvmHook) PostTxProcessing(ctx sdk.Context, msg core.Message, receipt *ethtypes.Receipt) error {
func (h LogProcessEvmHook) PostTxProcessing(ctx sdk.Context, _ *core.Message, receipt *ethtypes.Receipt) error {
addLogToReceiptFunc := newFuncAddLogToReceipt(receipt)
for _, log := range receipt.Logs {
if len(log.Topics) == 0 {
Expand Down
9 changes: 4 additions & 5 deletions x/cronos/keeper/evm_hooks_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (

sdkmath "cosmossdk.io/math"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core"
ethtypes "github.com/ethereum/go-ethereum/core/types"

sdk "github.com/cosmos/cosmos-sdk/types"
Expand Down Expand Up @@ -42,7 +41,7 @@ func (suite *KeeperTestSuite) TestEvmHooks() {
receipt := &ethtypes.Receipt{
Logs: logs,
}
err := suite.app.EvmKeeper.PostTxProcessing(suite.ctx, core.Message{}, receipt)
err := suite.app.EvmKeeper.PostTxProcessing(suite.ctx, nil, receipt)
suite.Require().NoError(err)
},
},
Expand All @@ -64,7 +63,7 @@ func (suite *KeeperTestSuite) TestEvmHooks() {
receipt := &ethtypes.Receipt{
Logs: logs,
}
err = suite.app.EvmKeeper.PostTxProcessing(suite.ctx, core.Message{}, receipt)
err = suite.app.EvmKeeper.PostTxProcessing(suite.ctx, nil, receipt)
suite.Require().Error(err)
},
},
Expand Down Expand Up @@ -94,7 +93,7 @@ func (suite *KeeperTestSuite) TestEvmHooks() {
receipt := &ethtypes.Receipt{
Logs: logs,
}
err = suite.app.EvmKeeper.PostTxProcessing(suite.ctx, core.Message{}, receipt)
err = suite.app.EvmKeeper.PostTxProcessing(suite.ctx, nil, receipt)
suite.Require().NoError(err)

balance = suite.app.BankKeeper.GetBalance(suite.ctx, sdk.AccAddress(contract.Bytes()), denom)
Expand Down Expand Up @@ -144,7 +143,7 @@ func (suite *KeeperTestSuite) TestEvmHooks() {
receipt := &ethtypes.Receipt{
Logs: logs,
}
err = suite.app.EvmKeeper.PostTxProcessing(suite.ctx, core.Message{}, receipt)
err = suite.app.EvmKeeper.PostTxProcessing(suite.ctx, nil, receipt)
// should fail, because of not ibc denom name
suite.Require().Error(err)
},
Expand Down
7 changes: 1 addition & 6 deletions x/cronos/keeper/grpc_query.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,16 +75,11 @@ func (k Keeper) ReplayBlock(goCtx context.Context, req *types.ReplayBlockRequest
// we assume the message executions are successful, they are filtered in json-rpc api
for _, msg := range req.Msgs {
// deduct fee
txData, err := evmtypes.UnpackTxData(msg.Data)
if err != nil {
return nil, err
}

// populate the `From` field
if _, err := msg.GetSenderLegacy(ethtypes.LatestSignerForChainID(chainID)); err != nil {
return nil, err
}
fees, err := evmkeeper.VerifyFee(txData, evmDenom, baseFee, homestead, istanbul, shanghai, ctx.IsCheckTx())
fees, err := evmkeeper.VerifyFee(msg, evmDenom, baseFee, homestead, istanbul, shanghai, ctx.IsCheckTx())
if err != nil {
return nil, errorsmod.Wrapf(err, "failed to verify the fees")
}
Expand Down
26 changes: 9 additions & 17 deletions x/cronos/rpc/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -159,12 +159,7 @@ func (api *CronosAPI) GetTransactionReceiptsByBlock(blockNrOrHash rpctypes.Block
return nil, fmt.Errorf("invalid tx type: %T", msg)
}

txData, err := evmtypes.UnpackTxData(ethMsg.Data)
if err != nil {
api.logger.Error("failed to unpack tx data", "error", err.Error())
return nil, err
}

txData := ethMsg.AsTransaction()
parsedTx := parsedTxs.GetTxByMsgIndex(msgIndex)

// Get the transaction result from the log
Expand All @@ -179,7 +174,7 @@ func (api *CronosAPI) GetTransactionReceiptsByBlock(blockNrOrHash rpctypes.Block
return nil, err
}

logs, err := evmtypes.DecodeMsgLogsFromEvents(txResult.Data, parsedTx.MsgIndex, uint64(blockRes.Height))
logs, err := evmtypes.DecodeMsgLogsFromEvents(txResult.Data, txResult.Events, parsedTx.MsgIndex, uint64(blockRes.Height))
if err != nil {
api.logger.Debug("failed to parse logs", "block", resBlock.Block.Height, "txIndex", txIndex, "msgIndex", msgIndex, "error", err.Error())
}
Expand All @@ -197,7 +192,7 @@ func (api *CronosAPI) GetTransactionReceiptsByBlock(blockNrOrHash rpctypes.Block

// Implementation fields: These fields are added by geth when processing a transaction.
// They are stored in the chain database.
"transactionHash": ethMsg.Hash,
"transactionHash": txData.Hash(),
"contractAddress": nil,
"gasUsed": hexutil.Uint64(parsedTx.GasUsed),

Expand All @@ -209,21 +204,18 @@ func (api *CronosAPI) GetTransactionReceiptsByBlock(blockNrOrHash rpctypes.Block

// sender and receiver (contract or EOA) addreses
"from": from,
"to": txData.GetTo(),
"type": hexutil.Uint(ethMsg.AsTransaction().Type()),
"to": txData.To(),
"type": hexutil.Uint(txData.Type()),
}

// If the to is empty, assume it is a contract creation
if txData.GetTo() == nil {
receipt["contractAddress"] = crypto.CreateAddress(from, txData.GetNonce())
if txData.To() == nil {
receipt["contractAddress"] = crypto.CreateAddress(from, txData.Nonce())
}

if dynamicTx, ok := txData.(*evmtypes.DynamicFeeTx); ok {
receipt["effectiveGasPrice"] = hexutil.Big(*dynamicTx.EffectiveGasPrice(baseFee))
if txData.Type() == ethtypes.DynamicFeeTxType {
receipt["effectiveGasPrice"] = hexutil.Big(*ethMsg.GetEffectiveGasPrice(baseFee))
}

receipts = append(receipts, receipt)

txIndex++
}
cumulativeGasUsed += msgCumulativeGasUsed
Expand Down
2 changes: 1 addition & 1 deletion x/cronos/types/interfaces.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ type EvmLogHandler interface {
// EvmKeeper defines the interface for evm keeper
type EvmKeeper interface {
GetNonce(ctx sdk.Context, addr common.Address) uint64
ApplyMessage(ctx sdk.Context, msg core.Message, tracer vm.EVMLogger, commit bool) (*evmtypes.MsgEthereumTxResponse, error)
ApplyMessage(ctx sdk.Context, msg *core.Message, tracer vm.EVMLogger, commit bool) (*evmtypes.MsgEthereumTxResponse, error)
GetParams(ctx sdk.Context) evmtypes.Params

// to replay the messages
Expand Down
23 changes: 15 additions & 8 deletions x/e2ee/keeper/keeper.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,26 @@ func NewKeeper(storeKey storetypes.StoreKey, addressCodec address.Codec) Keeper
}
}

func (k Keeper) registerEncryptionKey(
ctx context.Context,
address string,
key []byte,
) error {
bz, err := k.addressCodec.StringToBytes(address)
if err != nil {
return err
}
sdk.UnwrapSDKContext(ctx).KVStore(k.storeKey).Set(types.KeyPrefix(bz), key)
return nil
}

func (k Keeper) RegisterEncryptionKey(
ctx context.Context,
req *types.MsgRegisterEncryptionKey,
) (*types.MsgRegisterEncryptionKeyResponse, error) {
bz, err := k.addressCodec.StringToBytes(req.Address)
if err != nil {
if err := k.registerEncryptionKey(ctx, req.Address, []byte(req.Key)); err != nil {
return nil, err
}
sdkCtx := sdk.UnwrapSDKContext(ctx)
sdkCtx.KVStore(k.storeKey).Set(types.KeyPrefix(bz), []byte(req.Key))
return &types.MsgRegisterEncryptionKeyResponse{}, nil
}

Expand All @@ -46,10 +56,7 @@ func (k Keeper) InitGenesis(
state *types.GenesisState,
) error {
for _, key := range state.Keys {
if _, err := k.RegisterEncryptionKey(ctx, &types.MsgRegisterEncryptionKey{
Address: key.Address,
Key: key.Key,
}); err != nil {
if err := k.registerEncryptionKey(ctx, key.Address, []byte(key.Key)); err != nil {
return err
}
}
Expand Down
Loading

0 comments on commit 585ad54

Please sign in to comment.