diff --git a/.gitignore b/.gitignore index 64c9c630b..5860fa05d 100644 --- a/.gitignore +++ b/.gitignore @@ -18,3 +18,5 @@ artifacts #build artifacts /module/artifacts + +build \ No newline at end of file diff --git a/docs/developer/code-structure.md b/docs/developer/code-structure.md index c34c49a21..55f7ecb6d 100644 --- a/docs/developer/code-structure.md +++ b/docs/developer/code-structure.md @@ -46,7 +46,7 @@ The user may call [MsgCancelSendToEth](/module/proto/gravity/v1/msgs.proto) whic Alternatively a relayer using the [BatchFees](/module/proto/gravity/v1/query.proto) query endpoint may decide to call [MsgRequestBatch](/module/proto/gravity/v1/msgs.proto). Note automatic execution of request batch is not currently implemented and is in issue #305 -RequestBatch in [msg_server.go](/module/x/gravity/keeper/msg_server.go) calls [BuildOutgoingTXBatch](/module/x/gravity/keeper/batch.go) which implements the protocol defined in the [batch creation spec](/spec/batch-creation-spec.md). Creating a batch of up to `OutgoingTxBatchSize` number of withdraws in order of descending fee amounts. +RequestBatch in [msg_server.go](/module/x/gravity/keeper/msg_server.go) calls [BuildOutgoingTxBatch](/module/x/gravity/keeper/batch.go) which implements the protocol defined in the [batch creation spec](/spec/batch-creation-spec.md). Creating a batch of up to `OutgoingTxBatchSize` number of withdraws in order of descending fee amounts. Now the resulting batch is made available to [Ethereum signers](/docs/design/ethereum-signing.md) via the [LastPendingBatchRequestByAddr](/module/proto/gravity/v1/query.proto) endpoint. The [LastPendingBatchRequestsByAddr](/module/x/gravity/keeper/grpc_query.go) endpoint looks up for the Ethereum signer what batches it has not yet signed that it must sign to avoid slashing see [slashing spec](/spec/slashing-spec.md). diff --git a/docs/developer/hotspots.md b/docs/developer/hotspots.md index da981e801..571e91b15 100644 --- a/docs/developer/hotspots.md +++ b/docs/developer/hotspots.md @@ -30,7 +30,7 @@ The [batch creation spec](/spec/batch-creation-spec.md) is a good place to start The [batch creation spec](/spec/batch-creation-spec.md) is a good place to start for background here. -[BuildOutgoingTXBatch](/module/x/gravity/keeper/batch.go) builds transaction batches out of the on-chain transaction pool of withdraws to Ethereum. Transactions must successfully be removed from the index, included only once, and returned properly in `OutgoingTxBatchExecuted` +[BuildOutgoingTxBatch](/module/x/gravity/keeper/batch.go) builds transaction batches out of the on-chain transaction pool of withdraws to Ethereum. Transactions must successfully be removed from the index, included only once, and returned properly in `OutgoingTxBatchExecuted` ## Outgoing tx batch executed diff --git a/module/proto/gravity/v1/msgs.proto b/module/proto/gravity/v1/msgs.proto index 41f932ddf..a246690a7 100644 --- a/module/proto/gravity/v1/msgs.proto +++ b/module/proto/gravity/v1/msgs.proto @@ -22,19 +22,24 @@ service Msg { rpc ConfirmBatch(MsgConfirmBatch) returns (MsgConfirmBatchResponse) { option (google.api.http).post = "/gravity/v1/confirm_batch"; } - rpc ConfirmLogicCall(MsgConfirmLogicCall) returns (MsgConfirmLogicCallResponse) { + rpc ConfirmLogicCall(MsgConfirmLogicCall) + returns (MsgConfirmLogicCallResponse) { option (google.api.http).post = "/gravity/v1/confim_logic"; } - rpc SendToCosmosClaim(MsgSendToCosmosClaim) returns (MsgSendToCosmosClaimResponse) { + rpc SendToCosmosClaim(MsgSendToCosmosClaim) + returns (MsgSendToCosmosClaimResponse) { option (google.api.http).post = "/gravity/v1/send_to_cosmos_claim"; } - rpc ExecuteIbcAutoForwards(MsgExecuteIbcAutoForwards) returns (MsgExecuteIbcAutoForwardsResponse) { + rpc ExecuteIbcAutoForwards(MsgExecuteIbcAutoForwards) + returns (MsgExecuteIbcAutoForwardsResponse) { option (google.api.http).post = "/gravity/v1/execute_ibc_auto_forwards"; } - rpc BatchSendToEthClaim(MsgBatchSendToEthClaim) returns (MsgBatchSendToEthClaimResponse) { + rpc BatchSendToEthClaim(MsgBatchSendToEthClaim) + returns (MsgBatchSendToEthClaimResponse) { option (google.api.http).post = "/gravity/v1/batch_send_to_eth_claim"; } - rpc ValsetUpdateClaim(MsgValsetUpdatedClaim) returns (MsgValsetUpdatedClaimResponse) { + rpc ValsetUpdateClaim(MsgValsetUpdatedClaim) + returns (MsgValsetUpdatedClaimResponse) { option (google.api.http).post = "/gravity/v1/valset_updated_claim"; } rpc ERC20DeployedClaim(MsgERC20DeployedClaim) @@ -45,13 +50,15 @@ service Msg { returns (MsgLogicCallExecutedClaimResponse) { option (google.api.http).post = "/gravity/v1/logic_call_executed_claim"; } - rpc SetOrchestratorAddress(MsgSetOrchestratorAddress) returns (MsgSetOrchestratorAddressResponse) { + rpc SetOrchestratorAddress(MsgSetOrchestratorAddress) + returns (MsgSetOrchestratorAddressResponse) { option (google.api.http).post = "/gravity/v1/set_orchestrator_address"; } rpc CancelSendToEth(MsgCancelSendToEth) returns (MsgCancelSendToEthResponse) { option (google.api.http).post = "/gravity/v1/cancel_send_to_eth"; } - rpc SubmitBadSignatureEvidence(MsgSubmitBadSignatureEvidence) returns (MsgSubmitBadSignatureEvidenceResponse) { + rpc SubmitBadSignatureEvidence(MsgSubmitBadSignatureEvidence) + returns (MsgSubmitBadSignatureEvidenceResponse) { option (google.api.http).post = "/gravity/v1/submit_bad_signature_evidence"; } } @@ -67,12 +74,12 @@ service Msg { // The orchestrator field is a cosmos1... string (i.e. sdk.AccAddress) that // references the key that is being delegated to // ETH_ADDRESS -// This is a hex encoded 0x Ethereum public key that will be used by this validator -// on Ethereum +// This is a hex encoded 0x Ethereum public key that will be used by this +// validator on Ethereum message MsgSetOrchestratorAddress { - string validator = 1; + string validator = 1; string orchestrator = 2; - string eth_address = 3; + string eth_address = 3; } message MsgSetOrchestratorAddressResponse {} @@ -93,10 +100,10 @@ message MsgSetOrchestratorAddressResponse {} // chain store and submit them to Ethereum to update the validator set // ------------- message MsgValsetConfirm { - uint64 nonce = 1; + uint64 nonce = 1; string orchestrator = 2; - string eth_address = 3; - string signature = 4; + string eth_address = 3; + string signature = 4; } message MsgValsetConfirmResponse {} @@ -114,14 +121,10 @@ message MsgValsetConfirmResponse {} // actually send this message in the first place. So a successful send has // two layers of fees for the user message MsgSendToEth { - string sender = 1; - string eth_dest = 2; - cosmos.base.v1beta1.Coin amount = 3 [ - (gogoproto.nullable) = false - ]; - cosmos.base.v1beta1.Coin bridge_fee = 4 [ - (gogoproto.nullable) = false - ]; + string sender = 1; + string eth_dest = 2; + cosmos.base.v1beta1.Coin amount = 3 [ (gogoproto.nullable) = false ]; + cosmos.base.v1beta1.Coin bridge_fee = 4 [ (gogoproto.nullable) = false ]; } message MsgSendToEthResponse {} @@ -137,7 +140,7 @@ message MsgSendToEthResponse {} // ------------- message MsgRequestBatch { string sender = 1; - string denom = 2; + string denom = 2; } message MsgRequestBatchResponse {} @@ -151,11 +154,11 @@ message MsgRequestBatchResponse {} // as well as an Ethereum signature over this batch by the validator // ------------- message MsgConfirmBatch { - uint64 nonce = 1; + uint64 nonce = 1; string token_contract = 2; - string eth_signer = 3; - string orchestrator = 4; - string signature = 5; + string eth_signer = 3; + string orchestrator = 4; + string signature = 5; } message MsgConfirmBatchResponse {} @@ -169,11 +172,11 @@ message MsgConfirmBatchResponse {} // as well as an Ethereum signature over this batch by the validator // ------------- message MsgConfirmLogicCall { - string invalidation_id = 1; + string invalidation_id = 1; uint64 invalidation_nonce = 2; - string eth_signer = 3; - string orchestrator = 4; - string signature = 5; + string eth_signer = 3; + string orchestrator = 4; + string signature = 5; } message MsgConfirmLogicCallResponse {} @@ -184,26 +187,28 @@ message MsgConfirmLogicCallResponse {} // issued to the Cosmos address in question // ------------- message MsgSendToCosmosClaim { - uint64 event_nonce = 1; - uint64 eth_block_height = 2; + uint64 event_nonce = 1; + uint64 eth_block_height = 2; string token_contract = 3; - string amount = 4 [ + string amount = 4 [ (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.nullable) = false + (gogoproto.nullable) = false ]; string ethereum_sender = 5; string cosmos_receiver = 6; - string orchestrator = 7; + string orchestrator = 7; } message MsgSendToCosmosClaimResponse {} // MsgExecuteIbcAutoForwards // Prompts the forwarding of Pending IBC Auto-Forwards in the queue -// The Pending forwards will be executed in order of their original SendToCosmos.EventNonce -// The funds in the queue will be sent to a local gravity-prefixed address if IBC transfer is not possible +// The Pending forwards will be executed in order of their original +// SendToCosmos.EventNonce The funds in the queue will be sent to a local +// gravity-prefixed address if IBC transfer is not possible message MsgExecuteIbcAutoForwards { - uint64 forwards_to_clear = 1; // How many queued forwards to clear, be careful about gas limits + uint64 forwards_to_clear = + 1; // How many queued forwards to clear, be careful about gas limits string executor = 2; // This message's sender } @@ -212,11 +217,12 @@ message MsgExecuteIbcAutoForwardsResponse {} // BatchSendToEthClaim claims that a batch of send to eth // operations on the bridge contract was executed. message MsgBatchSendToEthClaim { - uint64 event_nonce = 1; - uint64 eth_block_height = 2; - uint64 batch_nonce = 3; + uint64 event_nonce = 1; + uint64 eth_block_height = 2; + uint64 batch_nonce = 3; string token_contract = 4; - string orchestrator = 5; + string orchestrator = 5; + string evm_chain_prefix = 6; } message MsgBatchSendToEthClaimResponse {} @@ -225,14 +231,14 @@ message MsgBatchSendToEthClaimResponse {} // to learn about an ERC20 that someone deployed // to represent a Cosmos asset message MsgERC20DeployedClaim { - uint64 event_nonce = 1; - uint64 eth_block_height = 2; - string cosmos_denom = 3; + uint64 event_nonce = 1; + uint64 eth_block_height = 2; + string cosmos_denom = 3; string token_contract = 4; - string name = 5; - string symbol = 6; - uint64 decimals = 7; - string orchestrator = 8; + string name = 5; + string symbol = 6; + uint64 decimals = 7; + string orchestrator = 8; } message MsgERC20DeployedClaimResponse {} @@ -240,11 +246,11 @@ message MsgERC20DeployedClaimResponse {} // This informs the Cosmos module that a logic // call has been executed message MsgLogicCallExecutedClaim { - uint64 event_nonce = 1; - uint64 eth_block_height = 2; - bytes invalidation_id = 3; + uint64 event_nonce = 1; + uint64 eth_block_height = 2; + bytes invalidation_id = 3; uint64 invalidation_nonce = 4; - string orchestrator = 5; + string orchestrator = 5; } message MsgLogicCallExecutedClaimResponse {} @@ -252,16 +258,16 @@ message MsgLogicCallExecutedClaimResponse {} // This informs the Cosmos module that a validator // set has been updated. message MsgValsetUpdatedClaim { - uint64 event_nonce = 1; - uint64 valset_nonce = 2; - uint64 eth_block_height = 3; - repeated BridgeValidator members = 4 [(gogoproto.nullable) = false]; - string reward_amount = 5 [ + uint64 event_nonce = 1; + uint64 valset_nonce = 2; + uint64 eth_block_height = 3; + repeated BridgeValidator members = 4 [ (gogoproto.nullable) = false ]; + string reward_amount = 5 [ (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.nullable) = false + (gogoproto.nullable) = false ]; - string reward_token = 6; - string orchestrator = 7; + string reward_token = 6; + string orchestrator = 7; } message MsgValsetUpdatedClaimResponse {} @@ -271,20 +277,20 @@ message MsgValsetUpdatedClaimResponse {} // of the tokens message MsgCancelSendToEth { uint64 transaction_id = 1; - string sender = 2; + string sender = 2; } message MsgCancelSendToEthResponse {} // This call allows anyone to submit evidence that a // validator has signed a valset, batch, or logic call that never -// existed on the Cosmos chain. +// existed on the Cosmos chain. // Subject contains the batch, valset, or logic call. message MsgSubmitBadSignatureEvidence { google.protobuf.Any subject = 1 [ (cosmos_proto.accepts_interface) = "EthereumSigned" ]; - string signature = 2; - string sender = 3; + string signature = 2; + string sender = 3; } message MsgSubmitBadSignatureEvidenceResponse {} @@ -295,33 +301,31 @@ message EventSetOperatorAddress { } message EventValsetConfirmKey { - string message = 1; - string key = 2; + string message = 1; + string key = 2; } message EventBatchCreated { - string message = 1; - string batch_nonce = 2; + string message = 1; + string batch_nonce = 2; } message EventBatchConfirmKey { - string message = 1; + string message = 1; string batch_confirm_key = 2; } -message EventBatchSendToEthClaim { - string nonce = 1; -} +message EventBatchSendToEthClaim { string nonce = 1; } message EventClaim { - string message = 1; - string claim_hash = 2; + string message = 1; + string claim_hash = 2; string attestation_id = 3; } message EventBadSignatureEvidence { - string message = 1; - string bad_eth_signature = 2; + string message = 1; + string bad_eth_signature = 2; string bad_eth_signature_subject = 3; } @@ -330,28 +334,26 @@ message EventERC20DeployedClaim { string nonce = 2; } -message EventValsetUpdatedClaim { - string nonce = 1; -} +message EventValsetUpdatedClaim { string nonce = 1; } message EventMultisigUpdateRequest { string bridge_contract = 1; string bridge_chain_id = 2; - string multisig_id = 3; - string nonce = 4; + string multisig_id = 3; + string nonce = 4; } message EventOutgoingLogicCallCanceled { - string logic_call_invalidation_id = 1; - string logic_call_invalidation_nonce = 2; + string logic_call_invalidation_id = 1; + string logic_call_invalidation_nonce = 2; } message EventSignatureSlashing { - string type = 1; - string address = 2; + string type = 1; + string address = 2; } message EventOutgoingTxId { - string message = 1; - string tx_id = 2; + string message = 1; + string tx_id = 2; } \ No newline at end of file diff --git a/module/proto/gravity/v1/query.proto b/module/proto/gravity/v1/query.proto index 8ded1e4b2..4137160b9 100644 --- a/module/proto/gravity/v1/query.proto +++ b/module/proto/gravity/v1/query.proto @@ -18,19 +18,24 @@ service Query { rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { option (google.api.http).get = "/gravity/v1beta/params"; } - rpc CurrentValset(QueryCurrentValsetRequest) returns (QueryCurrentValsetResponse) { + rpc CurrentValset(QueryCurrentValsetRequest) + returns (QueryCurrentValsetResponse) { option (google.api.http).get = "/gravity/v1beta/valset/current"; } - rpc ValsetRequest(QueryValsetRequestRequest) returns (QueryValsetRequestResponse) { + rpc ValsetRequest(QueryValsetRequestRequest) + returns (QueryValsetRequestResponse) { option (google.api.http).get = "/gravity/v1beta/valset"; } - rpc ValsetConfirm(QueryValsetConfirmRequest) returns (QueryValsetConfirmResponse) { + rpc ValsetConfirm(QueryValsetConfirmRequest) + returns (QueryValsetConfirmResponse) { option (google.api.http).get = "/gravity/v1beta/valset/confirm"; } - rpc ValsetConfirmsByNonce(QueryValsetConfirmsByNonceRequest) returns (QueryValsetConfirmsByNonceResponse) { + rpc ValsetConfirmsByNonce(QueryValsetConfirmsByNonceRequest) + returns (QueryValsetConfirmsByNonceResponse) { option (google.api.http).get = "/gravity/v1beta/confirms/{nonce}"; } - rpc LastValsetRequests(QueryLastValsetRequestsRequest) returns (QueryLastValsetRequestsResponse) { + rpc LastValsetRequests(QueryLastValsetRequestsRequest) + returns (QueryLastValsetRequestsResponse) { option (google.api.http).get = "/gravity/v1beta/valset/requests"; } rpc LastPendingValsetRequestByAddr(QueryLastPendingValsetRequestByAddrRequest) @@ -39,210 +44,217 @@ service Query { } rpc LastPendingBatchRequestByAddr(QueryLastPendingBatchRequestByAddrRequest) returns (QueryLastPendingBatchRequestByAddrResponse) { - option (google.api.http).get = "/gravity/v1beta/batch/last_pending_request_by_addr"; + option (google.api.http).get = + "/gravity/v1beta/batch/last_pending_request_by_addr"; } rpc LastPendingLogicCallByAddr(QueryLastPendingLogicCallByAddrRequest) returns (QueryLastPendingLogicCallByAddrResponse) { option (google.api.http).get = "/gravity/v1beta/logic/{address}"; } - rpc LastEventNonceByAddr(QueryLastEventNonceByAddrRequest) returns (QueryLastEventNonceByAddrResponse) { - option (google.api.http).get = "/gravity/v1beta/oracle/eventnonce/{address}"; + rpc LastEventNonceByAddr(QueryLastEventNonceByAddrRequest) + returns (QueryLastEventNonceByAddrResponse) { + option (google.api.http).get = + "/gravity/v1beta/oracle/eventnonce/{address}"; } rpc BatchFees(QueryBatchFeeRequest) returns (QueryBatchFeeResponse) { option (google.api.http).get = "/gravity/v1beta/batchfees"; } - rpc OutgoingTxBatches(QueryOutgoingTxBatchesRequest) returns (QueryOutgoingTxBatchesResponse) { + rpc OutgoingTxBatches(QueryOutgoingTxBatchesRequest) + returns (QueryOutgoingTxBatchesResponse) { option (google.api.http).get = "/gravity/v1beta/batch/outgoingtx"; } - rpc OutgoingLogicCalls(QueryOutgoingLogicCallsRequest) returns (QueryOutgoingLogicCallsResponse) { + rpc OutgoingLogicCalls(QueryOutgoingLogicCallsRequest) + returns (QueryOutgoingLogicCallsResponse) { option (google.api.http).get = "/gravity/v1beta/batch/outgoinglogic"; } - rpc BatchRequestByNonce(QueryBatchRequestByNonceRequest) returns (QueryBatchRequestByNonceResponse) { + rpc BatchRequestByNonce(QueryBatchRequestByNonceRequest) + returns (QueryBatchRequestByNonceResponse) { option (google.api.http).get = "/gravity/v1beta/batch/request_by_nonce"; } - rpc BatchConfirms(QueryBatchConfirmsRequest) returns (QueryBatchConfirmsResponse) { + rpc BatchConfirms(QueryBatchConfirmsRequest) + returns (QueryBatchConfirmsResponse) { option (google.api.http).get = "/gravity/v1beta/batch/confirms"; } - rpc LogicConfirms(QueryLogicConfirmsRequest) returns (QueryLogicConfirmsResponse) { + rpc LogicConfirms(QueryLogicConfirmsRequest) + returns (QueryLogicConfirmsResponse) { option (google.api.http).get = "/gravity/v1beta/logic/confirms"; } - rpc ERC20ToDenom(QueryERC20ToDenomRequest) returns (QueryERC20ToDenomResponse) { - option (google.api.http).get = "/gravity/v1beta/cosmos_originated/erc20_to_denom"; + rpc ERC20ToDenom(QueryERC20ToDenomRequest) + returns (QueryERC20ToDenomResponse) { + option (google.api.http).get = + "/gravity/v1beta/cosmos_originated/erc20_to_denom"; } - rpc DenomToERC20(QueryDenomToERC20Request) returns (QueryDenomToERC20Response) { - option (google.api.http).get = "/gravity/v1beta/cosmos_originated/denom_to_erc20"; + rpc DenomToERC20(QueryDenomToERC20Request) + returns (QueryDenomToERC20Response) { + option (google.api.http).get = + "/gravity/v1beta/cosmos_originated/denom_to_erc20"; } - rpc GetLastObservedEthBlock(QueryLastObservedEthBlockRequest) returns (QueryLastObservedEthBlockResponse) { - option (google.api.http).get = "/gravity/v1beta/query_last_observed_eth_block"; + rpc GetLastObservedEthBlock(QueryLastObservedEthBlockRequest) + returns (QueryLastObservedEthBlockResponse) { + option (google.api.http).get = + "/gravity/v1beta/query_last_observed_eth_block"; } - rpc GetLastObservedEthNonce(QueryLastObservedEthNonceRequest) returns (QueryLastObservedEthNonceResponse) { - option (google.api.http).get = "/gravity/v1beta/query_last_observed_eth_nonce"; + rpc GetLastObservedEthNonce(QueryLastObservedEthNonceRequest) + returns (QueryLastObservedEthNonceResponse) { + option (google.api.http).get = + "/gravity/v1beta/query_last_observed_eth_nonce"; } - rpc GetAttestations(QueryAttestationsRequest) returns (QueryAttestationsResponse) { + rpc GetAttestations(QueryAttestationsRequest) + returns (QueryAttestationsResponse) { option (google.api.http).get = "/gravity/v1beta/query_attestations"; } rpc GetDelegateKeyByValidator(QueryDelegateKeysByValidatorAddress) returns (QueryDelegateKeysByValidatorAddressResponse) { - option (google.api.http).get = "/gravity/v1beta/query_delegate_keys_by_validator"; + option (google.api.http).get = + "/gravity/v1beta/query_delegate_keys_by_validator"; } - rpc GetDelegateKeyByEth(QueryDelegateKeysByEthAddress) returns (QueryDelegateKeysByEthAddressResponse) { + rpc GetDelegateKeyByEth(QueryDelegateKeysByEthAddress) + returns (QueryDelegateKeysByEthAddressResponse) { option (google.api.http).get = "/gravity/v1beta/query_delegate_keys_by_eth"; } rpc GetDelegateKeyByOrchestrator(QueryDelegateKeysByOrchestratorAddress) returns (QueryDelegateKeysByOrchestratorAddressResponse) { - option (google.api.http).get = "/gravity/v1beta/query_delegate_keys_by_orchestrator"; + option (google.api.http).get = + "/gravity/v1beta/query_delegate_keys_by_orchestrator"; } - rpc GetPendingSendToEth(QueryPendingSendToEth) returns (QueryPendingSendToEthResponse) { + rpc GetPendingSendToEth(QueryPendingSendToEth) + returns (QueryPendingSendToEthResponse) { option (google.api.http).get = "/gravity/v1beta/query_pending_send_to_eth"; } - rpc GetPendingIbcAutoForwards(QueryPendingIbcAutoForwards) returns (QueryPendingIbcAutoForwardsResponse) { - option (google.api.http).get = "/gravity/v1beta/query_pending_ibc_auto_forwards"; + rpc GetPendingIbcAutoForwards(QueryPendingIbcAutoForwards) + returns (QueryPendingIbcAutoForwardsResponse) { + option (google.api.http).get = + "/gravity/v1beta/query_pending_ibc_auto_forwards"; } } message QueryParamsRequest {} message QueryParamsResponse { - Params params = 1 [(gogoproto.nullable) = false]; + Params params = 1 [ (gogoproto.nullable) = false ]; } message QueryCurrentValsetRequest {} message QueryCurrentValsetResponse { - Valset valset = 1 [(gogoproto.nullable) = false]; + Valset valset = 1 [ (gogoproto.nullable) = false ]; } -message QueryValsetRequestRequest { - uint64 nonce = 1; -} -message QueryValsetRequestResponse { - Valset valset = 1; -} +message QueryValsetRequestRequest { uint64 nonce = 1; } +message QueryValsetRequestResponse { Valset valset = 1; } message QueryValsetConfirmRequest { - uint64 nonce = 1; + uint64 nonce = 1; string address = 2; } -message QueryValsetConfirmResponse { - MsgValsetConfirm confirm = 1; -} +message QueryValsetConfirmResponse { MsgValsetConfirm confirm = 1; } -message QueryValsetConfirmsByNonceRequest { - uint64 nonce = 1; -} +message QueryValsetConfirmsByNonceRequest { uint64 nonce = 1; } message QueryValsetConfirmsByNonceResponse { - repeated MsgValsetConfirm confirms = 1 [(gogoproto.nullable) = false]; + repeated MsgValsetConfirm confirms = 1 [ (gogoproto.nullable) = false ]; } message QueryLastValsetRequestsRequest {} message QueryLastValsetRequestsResponse { - repeated Valset valsets = 1 [(gogoproto.nullable) = false]; + repeated Valset valsets = 1 [ (gogoproto.nullable) = false ]; } -message QueryLastPendingValsetRequestByAddrRequest { - string address = 1; -} +message QueryLastPendingValsetRequestByAddrRequest { string address = 1; } message QueryLastPendingValsetRequestByAddrResponse { - repeated Valset valsets = 1 [(gogoproto.nullable) = false]; + repeated Valset valsets = 1 [ (gogoproto.nullable) = false ]; } message QueryBatchFeeRequest {} message QueryBatchFeeResponse { - repeated BatchFees batch_fees = 1 [(gogoproto.nullable) = false]; -} -message QueryLastPendingBatchRequestByAddrRequest { - string address = 1; + repeated BatchFees batch_fees = 1 [ (gogoproto.nullable) = false ]; } +message QueryLastPendingBatchRequestByAddrRequest { string address = 1; } message QueryLastPendingBatchRequestByAddrResponse { - repeated OutgoingTxBatch batch = 1 [(gogoproto.nullable) = false]; -} -message QueryLastPendingLogicCallByAddrRequest { - string address = 1; + repeated OutgoingTxBatch batch = 1 [ (gogoproto.nullable) = false ]; } +message QueryLastPendingLogicCallByAddrRequest { string address = 1; } message QueryLastPendingLogicCallByAddrResponse { - repeated OutgoingLogicCall call = 1 [(gogoproto.nullable) = false]; + repeated OutgoingLogicCall call = 1 [ (gogoproto.nullable) = false ]; } message QueryOutgoingTxBatchesRequest {} message QueryOutgoingTxBatchesResponse { - repeated OutgoingTxBatch batches = 1 [(gogoproto.nullable) = false]; + repeated OutgoingTxBatch batches = 1 [ (gogoproto.nullable) = false ]; } message QueryOutgoingLogicCallsRequest {} message QueryOutgoingLogicCallsResponse { - repeated OutgoingLogicCall calls = 1 [(gogoproto.nullable) = false]; + repeated OutgoingLogicCall calls = 1 [ (gogoproto.nullable) = false ]; } message QueryBatchRequestByNonceRequest { - uint64 nonce = 1; + uint64 nonce = 1; string contract_address = 2; } message QueryBatchRequestByNonceResponse { - OutgoingTxBatch batch = 1 [(gogoproto.nullable) = false]; + OutgoingTxBatch batch = 1 [ (gogoproto.nullable) = false ]; } message QueryBatchConfirmsRequest { - uint64 nonce = 1; + uint64 nonce = 1; string contract_address = 2; } message QueryBatchConfirmsResponse { - repeated MsgConfirmBatch confirms = 1 [(gogoproto.nullable) = false]; + repeated MsgConfirmBatch confirms = 1 [ (gogoproto.nullable) = false ]; } message QueryLogicConfirmsRequest { - bytes invalidation_id = 1; + bytes invalidation_id = 1; uint64 invalidation_nonce = 2; } message QueryLogicConfirmsResponse { - repeated MsgConfirmLogicCall confirms = 1 [(gogoproto.nullable) = false]; + repeated MsgConfirmLogicCall confirms = 1 [ (gogoproto.nullable) = false ]; } -message QueryLastEventNonceByAddrRequest { - string address = 1; -} -message QueryLastEventNonceByAddrResponse { - uint64 event_nonce = 1; -} +message QueryLastEventNonceByAddrRequest { string address = 1; } +message QueryLastEventNonceByAddrResponse { uint64 event_nonce = 1; } -message QueryERC20ToDenomRequest { - string erc20 = 1; -} +message QueryERC20ToDenomRequest { string erc20 = 1; } message QueryERC20ToDenomResponse { - string denom = 1; - bool cosmos_originated = 2; -} - -message QueryDenomToERC20Request { string denom = 1; + bool cosmos_originated = 2; } + +message QueryDenomToERC20Request { string denom = 1; } message QueryDenomToERC20Response { - string erc20 = 1; - bool cosmos_originated = 2; + string erc20 = 1; + bool cosmos_originated = 2; } -// QueryLastObservedEthBlockRequest defines the request for getting the height of the -// last applied Ethereum Event on the bridge. This is expected to lag the actual -// Ethereum block height significantly due to 1. Ethereum Finality and +// QueryLastObservedEthBlockRequest defines the request for getting the height +// of the last applied Ethereum Event on the bridge. This is expected to lag the +// actual Ethereum block height significantly due to 1. Ethereum Finality and // 2. Consensus mirroring the state on Ethereum -message QueryLastObservedEthBlockRequest{ - // indicates whether to search for store data using the old Gravity v1 key "LastObservedEthereumBlockHeightKey" - // Note that queries before the Mercury upgrade at height 1282013 must set this to true +message QueryLastObservedEthBlockRequest { + // indicates whether to search for store data using the old Gravity v1 key + // "LastObservedEthereumBlockHeightKey" Note that queries before the Mercury + // upgrade at height 1282013 must set this to true bool use_v1_key = 1; + // new version query by evm chain prefix + string evm_chain_prefix = 2; } -message QueryLastObservedEthBlockResponse{ - // a response of 0 indicates that no Ethereum events have been observed, and thus - // the bridge is inactive +message QueryLastObservedEthBlockResponse { + // a response of 0 indicates that no Ethereum events have been observed, and + // thus the bridge is inactive uint64 block = 1; } -// QueryLastObservedEthNonceRequest defines the request for getting the event nonce -// of the last applied Ethereum Event on the bridge. -// Note that this is likely to lag the last executed event a little -// due to 1. Ethereum Finality and 2. Consensus mirroring the Ethereum state -message QueryLastObservedEthNonceRequest{ - // indicates whether to search for store data using the old Gravity v1 key "LastObservedEventNonceKey" - // Note that queries before the Mercury upgrade at height 1282013 must set this to true +// QueryLastObservedEthNonceRequest defines the request for getting the event +// nonce of the last applied Ethereum Event on the bridge. Note that this is +// likely to lag the last executed event a little due to 1. Ethereum Finality +// and 2. Consensus mirroring the Ethereum state +message QueryLastObservedEthNonceRequest { + // indicates whether to search for store data using the old Gravity v1 key + // "LastObservedEventNonceKey" Note that queries before the Mercury upgrade at + // height 1282013 must set this to true bool use_v1_key = 1; + // new version query by evm chain prefix + string evm_chain_prefix = 2; } -message QueryLastObservedEthNonceResponse{ - // a response of 0 indicates that no Ethereum events have been observed, and thus - // the bridge is inactive +message QueryLastObservedEthNonceResponse { + // a response of 0 indicates that no Ethereum events have been observed, and + // thus the bridge is inactive uint64 nonce = 1; } @@ -266,28 +278,25 @@ message QueryAttestationsRequest { uint64 nonce = 4; // height allows filtering attestations by Ethereum claim height. uint64 height = 5; - // indicates whether to search for store data using the old Gravity v1 key "OracleAttestationKey" - // Note that queries before the Mercury upgrade at height 1282013 must set this to true + // indicates whether to search for store data using the old Gravity v1 key + // "OracleAttestationKey" Note that queries before the Mercury upgrade at + // height 1282013 must set this to true bool use_v1_key = 6; } message QueryAttestationsResponse { - repeated Attestation attestations = 1 [(gogoproto.nullable) = false]; + repeated Attestation attestations = 1 [ (gogoproto.nullable) = false ]; } -message QueryDelegateKeysByValidatorAddress { - string validator_address = 1; -} +message QueryDelegateKeysByValidatorAddress { string validator_address = 1; } message QueryDelegateKeysByValidatorAddressResponse { - string eth_address = 1; + string eth_address = 1; string orchestrator_address = 2; } -message QueryDelegateKeysByEthAddress { - string eth_address = 1; -} +message QueryDelegateKeysByEthAddress { string eth_address = 1; } message QueryDelegateKeysByEthAddressResponse { - string validator_address = 1; + string validator_address = 1; string orchestrator_address = 2; } @@ -296,22 +305,23 @@ message QueryDelegateKeysByOrchestratorAddress { } message QueryDelegateKeysByOrchestratorAddressResponse { string validator_address = 1; - string eth_address = 2; + string eth_address = 2; } -message QueryPendingSendToEth { - string sender_address = 1; -} +message QueryPendingSendToEth { string sender_address = 1; } message QueryPendingSendToEthResponse { - repeated OutgoingTransferTx transfers_in_batches = 1 [(gogoproto.nullable) = false]; - repeated OutgoingTransferTx unbatched_transfers = 2 [(gogoproto.nullable) = false]; + repeated OutgoingTransferTx transfers_in_batches = 1 + [ (gogoproto.nullable) = false ]; + repeated OutgoingTransferTx unbatched_transfers = 2 + [ (gogoproto.nullable) = false ]; } -message QueryPendingIbcAutoForwards{ - // limit defines the number of pending forwards to return, in order of their SendToCosmos.EventNonce +message QueryPendingIbcAutoForwards { + // limit defines the number of pending forwards to return, in order of their + // SendToCosmos.EventNonce uint64 limit = 1; } -message QueryPendingIbcAutoForwardsResponse{ +message QueryPendingIbcAutoForwardsResponse { repeated PendingIbcAutoForward pending_ibc_auto_forwards = 1; } diff --git a/module/x/gravity/abci.go b/module/x/gravity/abci.go index 659379a7c..8cba7ccdd 100644 --- a/module/x/gravity/abci.go +++ b/module/x/gravity/abci.go @@ -156,7 +156,7 @@ func cleanupTimedOutBatches(ctx sdk.Context, k keeper.Keeper, evmChainPrefix str batches := k.GetOutgoingTxBatches(ctx, evmChainPrefix) for _, batch := range batches { if batch.BatchTimeout < evmChainHeight { - err := k.CancelOutgoingTXBatch(ctx, evmChainPrefix, batch.TokenContract, batch.BatchNonce) + err := k.CancelOutgoingTxBatch(ctx, evmChainPrefix, batch.TokenContract, batch.BatchNonce) if err != nil { panic("Failed to cancel outgoing txbatch!") } diff --git a/module/x/gravity/abci_test.go b/module/x/gravity/abci_test.go index a57ea3f68..820157ce0 100644 --- a/module/x/gravity/abci_test.go +++ b/module/x/gravity/abci_test.go @@ -534,22 +534,22 @@ func TestBatchTimeout(t *testing.T) { ctx = ctx.WithBlockHeight(250) // check that we can make a batch without first setting an ethereum block height - b1, err1 := pk.BuildOutgoingTXBatch(ctx, evmChain.EvmChainPrefix, *tokenContract, 1) + b1, err1 := pk.BuildOutgoingTxBatch(ctx, evmChain.EvmChainPrefix, *tokenContract, 1) require.NoError(t, err1) require.Equal(t, b1.BatchTimeout, uint64(0)) pk.SetLastObservedEvmChainBlockHeight(ctx, evmChain.EvmChainPrefix, 500) // increase number of max txs to create more profitable batch - b2, err2 := pk.BuildOutgoingTXBatch(ctx, evmChain.EvmChainPrefix, *tokenContract, 2) + b2, err2 := pk.BuildOutgoingTxBatch(ctx, evmChain.EvmChainPrefix, *tokenContract, 2) require.NoError(t, err2) // this is exactly block 500 plus twelve hours require.Equal(t, b2.BatchTimeout, uint64(504)) // make sure the batches got stored in the first place - gotFirstBatch := input.GravityKeeper.GetOutgoingTXBatch(ctx, evmChain.EvmChainPrefix, b1.TokenContract, b1.BatchNonce) + gotFirstBatch := input.GravityKeeper.GetOutgoingTxBatch(ctx, evmChain.EvmChainPrefix, b1.TokenContract, b1.BatchNonce) require.NotNil(t, gotFirstBatch) - gotSecondBatch := input.GravityKeeper.GetOutgoingTXBatch(ctx, evmChain.EvmChainPrefix, b2.TokenContract, b2.BatchNonce) + gotSecondBatch := input.GravityKeeper.GetOutgoingTxBatch(ctx, evmChain.EvmChainPrefix, b2.TokenContract, b2.BatchNonce) require.NotNil(t, gotSecondBatch) // persist confirmations for second batch to test their deletion on batch timeout @@ -576,30 +576,30 @@ func TestBatchTimeout(t *testing.T) { ctx = ctx.WithBlockTime(now) ctx = ctx.WithBlockHeight(9) - b3, err2 := pk.BuildOutgoingTXBatch(ctx, evmChain.EvmChainPrefix, *tokenContract, 3) + b3, err2 := pk.BuildOutgoingTxBatch(ctx, evmChain.EvmChainPrefix, *tokenContract, 3) require.NoError(t, err2) EndBlocker(ctx, pk) // this had a timeout of zero should be deleted. - gotFirstBatch = input.GravityKeeper.GetOutgoingTXBatch(ctx, evmChain.EvmChainPrefix, b1.TokenContract, b1.BatchNonce) + gotFirstBatch = input.GravityKeeper.GetOutgoingTxBatch(ctx, evmChain.EvmChainPrefix, b1.TokenContract, b1.BatchNonce) require.Nil(t, gotFirstBatch) // make sure the end blocker does not delete these, as the block height has not officially // been updated by a relay event - gotSecondBatch = input.GravityKeeper.GetOutgoingTXBatch(ctx, evmChain.EvmChainPrefix, b2.TokenContract, b2.BatchNonce) + gotSecondBatch = input.GravityKeeper.GetOutgoingTxBatch(ctx, evmChain.EvmChainPrefix, b2.TokenContract, b2.BatchNonce) require.NotNil(t, gotSecondBatch) - gotThirdBatch := input.GravityKeeper.GetOutgoingTXBatch(ctx, evmChain.EvmChainPrefix, b3.TokenContract, b3.BatchNonce) + gotThirdBatch := input.GravityKeeper.GetOutgoingTxBatch(ctx, evmChain.EvmChainPrefix, b3.TokenContract, b3.BatchNonce) require.NotNil(t, gotThirdBatch) pk.SetLastObservedEvmChainBlockHeight(ctx, evmChain.EvmChainPrefix, 5000) EndBlocker(ctx, pk) // make sure the end blocker does delete these, as we've got a new Ethereum block height - gotFirstBatch = input.GravityKeeper.GetOutgoingTXBatch(ctx, evmChain.EvmChainPrefix, b1.TokenContract, b1.BatchNonce) + gotFirstBatch = input.GravityKeeper.GetOutgoingTxBatch(ctx, evmChain.EvmChainPrefix, b1.TokenContract, b1.BatchNonce) require.Nil(t, gotFirstBatch) - gotSecondBatch = input.GravityKeeper.GetOutgoingTXBatch(ctx, evmChain.EvmChainPrefix, b2.TokenContract, b2.BatchNonce) + gotSecondBatch = input.GravityKeeper.GetOutgoingTxBatch(ctx, evmChain.EvmChainPrefix, b2.TokenContract, b2.BatchNonce) require.Nil(t, gotSecondBatch) - gotThirdBatch = input.GravityKeeper.GetOutgoingTXBatch(ctx, evmChain.EvmChainPrefix, b3.TokenContract, b3.BatchNonce) + gotThirdBatch = input.GravityKeeper.GetOutgoingTxBatch(ctx, evmChain.EvmChainPrefix, b3.TokenContract, b3.BatchNonce) require.NotNil(t, gotThirdBatch) // verify that second batch confirms are deleted diff --git a/module/x/gravity/client/cli/query.go b/module/x/gravity/client/cli/query.go index 653cd8af6..5ecb7f2fc 100644 --- a/module/x/gravity/client/cli/query.go +++ b/module/x/gravity/client/cli/query.go @@ -34,7 +34,7 @@ func GetQueryCmd() *cobra.Command { CmdGetValsetRequest(), CmdGetValsetConfirm(), CmdGetPendingValsetRequest(), - CmdGetPendingOutgoingTXBatchRequest(), + CmdGetPendingOutgoingTxBatchRequest(), CmdGetPendingSendToEth(), GetCmdPendingIbcAutoForwards(), CmdGetAttestations(), @@ -171,7 +171,7 @@ func CmdGetPendingValsetRequest() *cobra.Command { return cmd } -func CmdGetPendingOutgoingTXBatchRequest() *cobra.Command { +func CmdGetPendingOutgoingTxBatchRequest() *cobra.Command { // nolint: exhaustruct cmd := &cobra.Command{ Use: "pending-batch-request [bech32 orchestrator address]", diff --git a/module/x/gravity/keeper/attestation.go b/module/x/gravity/keeper/attestation.go index 905552b14..44776b4ec 100644 --- a/module/x/gravity/keeper/attestation.go +++ b/module/x/gravity/keeper/attestation.go @@ -342,13 +342,13 @@ func (k Keeper) GetLastObservedEvmChainBlockHeight(ctx sdk.Context, evmChainPref if len(bytes) == 0 { return types.LastObservedEthereumBlockHeight{ - CosmosEthBlockHeight: 0, - EthereumBlockHeight: 0, + CosmosBlockHeight: 0, + EthereumBlockHeight: 0, } } height := types.LastObservedEthereumBlockHeight{ - CosmosEthBlockHeight: 0, - EthereumBlockHeight: 0, + CosmosBlockHeight: 0, + EthereumBlockHeight: 0, } k.cdc.MustUnmarshal(bytes, &height) return height diff --git a/module/x/gravity/keeper/attestation_handler.go b/module/x/gravity/keeper/attestation_handler.go index 218266fc5..7093f2fa8 100644 --- a/module/x/gravity/keeper/attestation_handler.go +++ b/module/x/gravity/keeper/attestation_handler.go @@ -518,7 +518,7 @@ func (a AttestationHandler) sendCoinToLocalAddress( } else { // no error a.keeper.logger(ctx).Info("SendToCosmos to local gravity receiver", "ethSender", claim.EthereumSender, "receiver", receiver, "denom", coin.Denom, "amount", coin.Amount.String(), "nonce", claim.EventNonce, - "ethContract", claim.TokenContract, "BlockHeight", claim.BlockHeight, + "ethContract", claim.TokenContract, "BlockHeight", claim.EthBlockHeight, "cosmosBlockHeight", ctx.BlockHeight(), ) if err := ctx.EventManager().EmitTypedEvent(&types.EventSendToCosmosLocal{ diff --git a/module/x/gravity/keeper/batch.go b/module/x/gravity/keeper/batch.go index 495795ec3..8a2bcf8db 100644 --- a/module/x/gravity/keeper/batch.go +++ b/module/x/gravity/keeper/batch.go @@ -13,14 +13,14 @@ import ( const OutgoingTxBatchSize = 100 -// BuildOutgoingTXBatch starts the following process chain: +// BuildOutgoingTxBatch starts the following process chain: // - find bridged denominator for given voucher type // - determine if an unexecuted batch is already waiting for this token type, if so confirm the new batch would // have a higher total fees. If not exit without creating a batch // - select available transactions from the outgoing transaction pool sorted by fee desc // - persist an outgoing batch object with an incrementing ID = nonce // - emit an event -func (k Keeper) BuildOutgoingTXBatch( +func (k Keeper) BuildOutgoingTxBatch( ctx sdk.Context, evmChainPrefix string, contract types.EthAddress, @@ -106,12 +106,12 @@ func (k Keeper) getBatchTimeoutHeight(ctx sdk.Context, evmChainPrefix string) ui // It frees all the transactions in the batch, then cancels all earlier batches, this function panics instead // of returning errors because any failure will cause a double spend. func (k Keeper) OutgoingTxBatchExecuted(ctx sdk.Context, evmChainPrefix string, tokenContract types.EthAddress, claim types.MsgBatchSendToEthClaim) { - b := k.GetOutgoingTXBatch(ctx, evmChainPrefix, tokenContract, claim.BatchNonce) + b := k.GetOutgoingTxBatch(ctx, evmChainPrefix, tokenContract, claim.BatchNonce) if b == nil { panic(fmt.Sprintf("unknown batch nonce for outgoing tx batch %s %d", tokenContract.GetAddress().Hex(), claim.BatchNonce)) } - if b.BatchTimeout <= claim.BlockHeight { - panic(fmt.Sprintf("Batch with nonce %d submitted after it timed out (submission %d >= timeout %d)?", claim.BatchNonce, claim.BlockHeight, b.BatchTimeout)) + if b.BatchTimeout <= claim.EthBlockHeight { + panic(fmt.Sprintf("Batch with nonce %d submitted after it timed out (submission %d >= timeout %d)?", claim.BatchNonce, claim.EthBlockHeight, b.BatchTimeout)) } contract := b.TokenContract // Burn tokens if they're evm chain originated @@ -135,7 +135,7 @@ func (k Keeper) OutgoingTxBatchExecuted(ctx sdk.Context, evmChainPrefix string, k.IterateOutgoingTxBatches(ctx, evmChainPrefix, func(key []byte, batch types.InternalOutgoingTxBatch) bool { // If the iterated batches nonce is lower than the one that was just executed, cancel it if batch.BatchNonce < b.BatchNonce && batch.TokenContract.GetAddress() == tokenContract.GetAddress() { - err := k.CancelOutgoingTXBatch(ctx, evmChainPrefix, tokenContract, batch.BatchNonce) + err := k.CancelOutgoingTxBatch(ctx, evmChainPrefix, tokenContract, batch.BatchNonce) if err != nil { panic(fmt.Sprintf("Failed cancel out batch %s %d while trying to execute %s %d with %s", tokenContract.GetAddress().Hex(), batch.BatchNonce, @@ -218,8 +218,8 @@ func (k Keeper) pickUnbatchedTxs( return selectedTxs, err } -// GetOutgoingTXBatch loads a batch object. Returns nil when not exists. -func (k Keeper) GetOutgoingTXBatch(ctx sdk.Context, evmChainPrefix string, tokenContract types.EthAddress, nonce uint64) *types.InternalOutgoingTxBatch { +// GetOutgoingTxBatch loads a batch object. Returns nil when not exists. +func (k Keeper) GetOutgoingTxBatch(ctx sdk.Context, evmChainPrefix string, tokenContract types.EthAddress, nonce uint64) *types.InternalOutgoingTxBatch { store := ctx.KVStore(k.storeKey) key := types.GetOutgoingTxBatchKey(evmChainPrefix, tokenContract, nonce) bz := store.Get(key) @@ -239,9 +239,9 @@ func (k Keeper) GetOutgoingTXBatch(ctx sdk.Context, evmChainPrefix string, token return ret } -// CancelOutgoingTXBatch releases all TX in the batch and deletes the batch -func (k Keeper) CancelOutgoingTXBatch(ctx sdk.Context, evmChainPrefix string, tokenContract types.EthAddress, nonce uint64) error { - batch := k.GetOutgoingTXBatch(ctx, evmChainPrefix, tokenContract, nonce) +// CancelOutgoingTxBatch releases all TX in the batch and deletes the batch +func (k Keeper) CancelOutgoingTxBatch(ctx sdk.Context, evmChainPrefix string, tokenContract types.EthAddress, nonce uint64) error { + batch := k.GetOutgoingTxBatch(ctx, evmChainPrefix, tokenContract, nonce) if batch == nil { return types.ErrUnknown } @@ -270,7 +270,7 @@ func (k Keeper) CancelOutgoingTXBatch(ctx sdk.Context, evmChainPrefix string, to // IterateOutgoingTxBatches iterates through all outgoing batches in DESC order. func (k Keeper) IterateOutgoingTxBatches(ctx sdk.Context, evmChainPrefix string, cb func(key []byte, batch types.InternalOutgoingTxBatch) bool) { - prefixStore := prefix.NewStore(ctx.KVStore(k.storeKey), types.AppendChainPrefix(types.OutgoingTXBatchKey, evmChainPrefix)) + prefixStore := prefix.NewStore(ctx.KVStore(k.storeKey), types.AppendChainPrefix(types.OutgoingTxBatchKey, evmChainPrefix)) iter := prefixStore.ReverseIterator(nil, nil) defer iter.Close() for ; iter.Valid(); iter.Next() { diff --git a/module/x/gravity/keeper/batch_test.go b/module/x/gravity/keeper/batch_test.go index 16f374701..681df4d94 100644 --- a/module/x/gravity/keeper/batch_test.go +++ b/module/x/gravity/keeper/batch_test.go @@ -40,7 +40,7 @@ func TestBatches(t *testing.T) { // ================== // batch should not be created if there is no txs of the given token type in tx pool - noBatch, err := input.GravityKeeper.BuildOutgoingTXBatch(ctx, evmChain.EvmChainPrefix, *myTokenContractAddr, 2) + noBatch, err := input.GravityKeeper.BuildOutgoingTxBatch(ctx, evmChain.EvmChainPrefix, *myTokenContractAddr, 2) require.Nil(t, noBatch) require.Error(t, err) @@ -67,16 +67,16 @@ func TestBatches(t *testing.T) { ctx = ctx.WithBlockTime(now) input.GravityKeeper.SetLastObservedEvmChainBlockHeight(ctx, evmChain.EvmChainPrefix, 1234567) // maxElements must be greater then 0, otherwise the batch would not be created - noBatch, err = input.GravityKeeper.BuildOutgoingTXBatch(ctx, evmChain.EvmChainPrefix, *myTokenContractAddr, 0) + noBatch, err = input.GravityKeeper.BuildOutgoingTxBatch(ctx, evmChain.EvmChainPrefix, *myTokenContractAddr, 0) require.Nil(t, noBatch) require.Error(t, err) // tx batch size is 2, so that some of them stay behind - firstBatch, err := input.GravityKeeper.BuildOutgoingTXBatch(ctx, evmChain.EvmChainPrefix, *myTokenContractAddr, 2) + firstBatch, err := input.GravityKeeper.BuildOutgoingTxBatch(ctx, evmChain.EvmChainPrefix, *myTokenContractAddr, 2) require.NoError(t, err) // then batch is persisted - gotFirstBatch := input.GravityKeeper.GetOutgoingTXBatch(ctx, evmChain.EvmChainPrefix, firstBatch.TokenContract, firstBatch.BatchNonce) + gotFirstBatch := input.GravityKeeper.GetOutgoingTxBatch(ctx, evmChain.EvmChainPrefix, firstBatch.TokenContract, firstBatch.BatchNonce) require.NotNil(t, gotFirstBatch) // Should have txs 2: and 3: from above, as ties in fees are broken by transaction index ctx.Logger().Info(fmt.Sprintf("found batch %+v", gotFirstBatch)) @@ -161,7 +161,7 @@ func TestBatches(t *testing.T) { // ==================================== // first check that less profitable batch cannot be created - noBatch, err = input.GravityKeeper.BuildOutgoingTXBatch(ctx, evmChain.EvmChainPrefix, *myTokenContractAddr, 2) + noBatch, err = input.GravityKeeper.BuildOutgoingTxBatch(ctx, evmChain.EvmChainPrefix, *myTokenContractAddr, 2) require.Nil(t, noBatch) require.Error(t, err) @@ -184,7 +184,7 @@ func TestBatches(t *testing.T) { // create the more profitable batch ctx = ctx.WithBlockTime(now) // tx batch size is 2, so that some of them stay behind - secondBatch, err := input.GravityKeeper.BuildOutgoingTXBatch(ctx, evmChain.EvmChainPrefix, *myTokenContractAddr, 2) + secondBatch, err := input.GravityKeeper.BuildOutgoingTxBatch(ctx, evmChain.EvmChainPrefix, *myTokenContractAddr, 2) require.NoError(t, err) input.GravityKeeper.SetLastObservedEvmChainBlockHeight(ctx, evmChain.EvmChainPrefix, 1234567) @@ -252,11 +252,11 @@ func TestBatches(t *testing.T) { // Execute the batch fakeBlock := secondBatch.CosmosBlockCreated // A fake ethereum block used for testing only - msg := types.MsgBatchSendToEthClaim{BlockHeight: fakeBlock, BatchNonce: secondBatch.BatchNonce} + msg := types.MsgBatchSendToEthClaim{EthBlockHeight: fakeBlock, BatchNonce: secondBatch.BatchNonce} input.GravityKeeper.OutgoingTxBatchExecuted(ctx, evmChain.EvmChainPrefix, secondBatch.TokenContract, msg) // check batch has been deleted - gotSecondBatch := input.GravityKeeper.GetOutgoingTXBatch(ctx, evmChain.EvmChainPrefix, secondBatch.TokenContract, secondBatch.BatchNonce) + gotSecondBatch := input.GravityKeeper.GetOutgoingTxBatch(ctx, evmChain.EvmChainPrefix, secondBatch.TokenContract, secondBatch.BatchNonce) require.Nil(t, gotSecondBatch) // check batch confirmations have been deleted secondBatchConfirms = input.GravityKeeper.GetBatchConfirmByNonceAndTokenContract(ctx, evmChain.EvmChainPrefix, secondBatch.BatchNonce, secondBatch.TokenContract) @@ -300,7 +300,7 @@ func TestBatches(t *testing.T) { assert.Equal(t, expUnbatchedTx, gotUnbatchedTx) // check that first batch has been deleted - gotFirstBatch = input.GravityKeeper.GetOutgoingTXBatch(ctx, evmChain.EvmChainPrefix, firstBatch.TokenContract, firstBatch.BatchNonce) + gotFirstBatch = input.GravityKeeper.GetOutgoingTxBatch(ctx, evmChain.EvmChainPrefix, firstBatch.TokenContract, firstBatch.BatchNonce) require.Nil(t, gotFirstBatch) // check that first batch confirmations have been deleted firstBatchConfirms = input.GravityKeeper.GetBatchConfirmByNonceAndTokenContract(ctx, evmChain.EvmChainPrefix, firstBatch.BatchNonce, firstBatch.TokenContract) @@ -358,11 +358,11 @@ func TestBatchesFullCoins(t *testing.T) { ctx = ctx.WithBlockTime(now) // tx batch size is 2, so that some of them stay behind - firstBatch, err := input.GravityKeeper.BuildOutgoingTXBatch(ctx, evmChain.EvmChainPrefix, *tokenContract, 2) + firstBatch, err := input.GravityKeeper.BuildOutgoingTxBatch(ctx, evmChain.EvmChainPrefix, *tokenContract, 2) require.NoError(t, err) // then batch is persisted - gotFirstBatch := input.GravityKeeper.GetOutgoingTXBatch(ctx, evmChain.EvmChainPrefix, firstBatch.TokenContract, firstBatch.BatchNonce) + gotFirstBatch := input.GravityKeeper.GetOutgoingTxBatch(ctx, evmChain.EvmChainPrefix, firstBatch.TokenContract, firstBatch.BatchNonce) require.NotNil(t, gotFirstBatch) expFirstBatch := &types.OutgoingTxBatch{ @@ -438,7 +438,7 @@ func TestBatchesFullCoins(t *testing.T) { ctx = ctx.WithBlockTime(now) input.GravityKeeper.SetLastObservedEvmChainBlockHeight(ctx, evmChain.EvmChainPrefix, 1234567) // tx batch size is 2, so that some of them stay behind - secondBatch, err := input.GravityKeeper.BuildOutgoingTXBatch(ctx, evmChain.EvmChainPrefix, *tokenContract, 2) + secondBatch, err := input.GravityKeeper.BuildOutgoingTxBatch(ctx, evmChain.EvmChainPrefix, *tokenContract, 2) require.NoError(t, err) // check that the more profitable batch has the right txs in it @@ -479,11 +479,11 @@ func TestBatchesFullCoins(t *testing.T) { // Execute the batch fakeBlock := secondBatch.CosmosBlockCreated // A fake ethereum block used for testing only - msg := types.MsgBatchSendToEthClaim{BlockHeight: fakeBlock, BatchNonce: secondBatch.BatchNonce} + msg := types.MsgBatchSendToEthClaim{EthBlockHeight: fakeBlock, BatchNonce: secondBatch.BatchNonce} input.GravityKeeper.OutgoingTxBatchExecuted(ctx, evmChain.EvmChainPrefix, secondBatch.TokenContract, msg) // check batch has been deleted - gotSecondBatch := input.GravityKeeper.GetOutgoingTXBatch(ctx, evmChain.EvmChainPrefix, secondBatch.TokenContract, secondBatch.BatchNonce) + gotSecondBatch := input.GravityKeeper.GetOutgoingTxBatch(ctx, evmChain.EvmChainPrefix, secondBatch.TokenContract, secondBatch.BatchNonce) require.Nil(t, gotSecondBatch) // check that txs from first batch have been freed @@ -592,7 +592,7 @@ func TestManyBatches(t *testing.T) { require.NoError(t, err) // create batch after every 100 txs to be able to create more profitable batches if (v+1)%100 == 0 { - batch, err := input.GravityKeeper.BuildOutgoingTXBatch(ctx, evmChain.EvmChainPrefix, *contractAddr, 100) + batch, err := input.GravityKeeper.BuildOutgoingTxBatch(ctx, evmChain.EvmChainPrefix, *contractAddr, 100) require.NoError(t, err) batches = append(batches, batch.ToExternal()) } @@ -603,7 +603,7 @@ func TestManyBatches(t *testing.T) { // then batch is persisted contractAddr, err := types.NewEthAddress(batch.TokenContract) require.NoError(t, err) - gotBatch := input.GravityKeeper.GetOutgoingTXBatch(ctx, evmChain.EvmChainPrefix, *contractAddr, batch.BatchNonce) + gotBatch := input.GravityKeeper.GetOutgoingTxBatch(ctx, evmChain.EvmChainPrefix, *contractAddr, batch.BatchNonce) require.NotNil(t, gotBatch) } @@ -618,11 +618,11 @@ func TestManyBatches(t *testing.T) { for _, batch := range batches { contractAddr, err := types.NewEthAddress(batch.TokenContract) require.NoError(t, err) - gotBatch := input.GravityKeeper.GetOutgoingTXBatch(ctx, evmChain.EvmChainPrefix, *contractAddr, batch.BatchNonce) + gotBatch := input.GravityKeeper.GetOutgoingTxBatch(ctx, evmChain.EvmChainPrefix, *contractAddr, batch.BatchNonce) // we may have already deleted some of the batches in this list by executing later ones if gotBatch != nil { fakeBlock := batch.CosmosBlockCreated // A fake ethereum block used for testing only - msg := types.MsgBatchSendToEthClaim{BlockHeight: fakeBlock, BatchNonce: batch.BatchNonce} + msg := types.MsgBatchSendToEthClaim{EthBlockHeight: fakeBlock, BatchNonce: batch.BatchNonce} input.GravityKeeper.OutgoingTxBatchExecuted(ctx, evmChain.EvmChainPrefix, *contractAddr, msg) } } @@ -685,7 +685,7 @@ func TestPoolTxRefund(t *testing.T) { // tx batch size is 2, so that some of them stay behind // Should have 2: and 3: from above - _, err = input.GravityKeeper.BuildOutgoingTXBatch(ctx, evmChain.EvmChainPrefix, *contract, 2) + _, err = input.GravityKeeper.BuildOutgoingTxBatch(ctx, evmChain.EvmChainPrefix, *contract, 2) require.NoError(t, err) // try to refund a tx that's in a batch @@ -760,11 +760,11 @@ func TestBatchesNotCreatedWhenBridgePaused(t *testing.T) { ctx = ctx.WithBlockTime(now) // tx batch size is 2, so that some of them stay behind - _, err = input.GravityKeeper.BuildOutgoingTXBatch(ctx, evmChain.EvmChainPrefix, *myTokenContractAddr, 2) + _, err = input.GravityKeeper.BuildOutgoingTxBatch(ctx, evmChain.EvmChainPrefix, *myTokenContractAddr, 2) require.Error(t, err) // then batch is persisted - gotFirstBatch := input.GravityKeeper.GetOutgoingTXBatch(ctx, evmChain.EvmChainPrefix, *myTokenContractAddr, 1) + gotFirstBatch := input.GravityKeeper.GetOutgoingTxBatch(ctx, evmChain.EvmChainPrefix, *myTokenContractAddr, 1) require.Nil(t, gotFirstBatch) // resume the bridge @@ -775,11 +775,11 @@ func TestBatchesNotCreatedWhenBridgePaused(t *testing.T) { ctx = ctx.WithBlockTime(now) // tx batch size is 2, so that some of them stay behind - firstBatch, err := input.GravityKeeper.BuildOutgoingTXBatch(ctx, evmChain.EvmChainPrefix, *myTokenContractAddr, 2) + firstBatch, err := input.GravityKeeper.BuildOutgoingTxBatch(ctx, evmChain.EvmChainPrefix, *myTokenContractAddr, 2) require.NoError(t, err) // then batch is persisted - gotFirstBatch = input.GravityKeeper.GetOutgoingTXBatch(ctx, evmChain.EvmChainPrefix, firstBatch.TokenContract, firstBatch.BatchNonce) + gotFirstBatch = input.GravityKeeper.GetOutgoingTxBatch(ctx, evmChain.EvmChainPrefix, firstBatch.TokenContract, firstBatch.BatchNonce) require.NotNil(t, gotFirstBatch) } @@ -850,11 +850,11 @@ func TestEthereumBlacklistBatches(t *testing.T) { ctx = ctx.WithBlockTime(now) // tx batch size is 10 - firstBatch, err := input.GravityKeeper.BuildOutgoingTXBatch(ctx, evmChain.EvmChainPrefix, *myTokenContractAddr, 10) + firstBatch, err := input.GravityKeeper.BuildOutgoingTxBatch(ctx, evmChain.EvmChainPrefix, *myTokenContractAddr, 10) require.NoError(t, err) // then batch is persisted - gotFirstBatch := input.GravityKeeper.GetOutgoingTXBatch(ctx, evmChain.EvmChainPrefix, firstBatch.TokenContract, firstBatch.BatchNonce) + gotFirstBatch := input.GravityKeeper.GetOutgoingTxBatch(ctx, evmChain.EvmChainPrefix, firstBatch.TokenContract, firstBatch.BatchNonce) require.NotNil(t, gotFirstBatch) // Should have all from above except the banned dest ctx.Logger().Info(fmt.Sprintf("found batch %+v", gotFirstBatch)) @@ -947,7 +947,7 @@ func TestBatchConfirms(t *testing.T) { ctx.Logger().Info(fmt.Sprintf("Created transaction %v with amount %v and fee %v", i, amount, fee)) // create batch - _, err = input.GravityKeeper.BuildOutgoingTXBatch(ctx, evmChain.EvmChainPrefix, *myTokenContractAddr, 1) + _, err = input.GravityKeeper.BuildOutgoingTxBatch(ctx, evmChain.EvmChainPrefix, *myTokenContractAddr, 1) require.NoError(t, err) } diff --git a/module/x/gravity/keeper/evidence_test.go b/module/x/gravity/keeper/evidence_test.go index c2f70c75a..d26a1aa48 100644 --- a/module/x/gravity/keeper/evidence_test.go +++ b/module/x/gravity/keeper/evidence_test.go @@ -6,6 +6,7 @@ import ( "time" "bytes" + "github.com/Gravity-Bridge/Gravity-Bridge/module/x/gravity/types" codectypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" @@ -60,7 +61,7 @@ func TestSubmitBadSignatureEvidenceBatchExists(t *testing.T) { // when ctx = ctx.WithBlockTime(now) - goodBatch, err := input.GravityKeeper.BuildOutgoingTXBatch(ctx, evmChain.EvmChainPrefix, *tokenContract, 2) + goodBatch, err := input.GravityKeeper.BuildOutgoingTxBatch(ctx, evmChain.EvmChainPrefix, *tokenContract, 2) goodBatchExternal := goodBatch.ToExternal() require.NoError(t, err) diff --git a/module/x/gravity/keeper/genesis_test.go b/module/x/gravity/keeper/genesis_test.go index 27385b1a8..340dc1cad 100644 --- a/module/x/gravity/keeper/genesis_test.go +++ b/module/x/gravity/keeper/genesis_test.go @@ -132,7 +132,7 @@ func TestBatchAndTxImportExport(t *testing.T) { // with 100 tx in each batch, 1000 txs per contract, we want 5 batches per contract to batch 500 txs per contract batches := make([]*types.InternalOutgoingTxBatch, 5*len(contracts)) for i, v := range contracts { - batch, err := input.GravityKeeper.BuildOutgoingTXBatch(ctx, evmChain.EvmChainPrefix, *v, uint(batchSize)) + batch, err := input.GravityKeeper.BuildOutgoingTxBatch(ctx, evmChain.EvmChainPrefix, *v, uint(batchSize)) require.NoError(t, err) batches[i] = batch ctx.Logger().Info(fmt.Sprintf("Created batch %v for contract %v with %v transactions", i, v.GetAddress(), batchSize)) diff --git a/module/x/gravity/keeper/grpc_query.go b/module/x/gravity/keeper/grpc_query.go index a4829b508..f80866b8d 100644 --- a/module/x/gravity/keeper/grpc_query.go +++ b/module/x/gravity/keeper/grpc_query.go @@ -224,7 +224,7 @@ func (k Keeper) BatchRequestByNonce( return nil, sdkerrors.Wrap(sdkerrors.ErrUnknownRequest, err.Error()) } - foundBatch := k.GetOutgoingTXBatch(sdk.UnwrapSDKContext(c), EthChainPrefix, *addr, req.Nonce) + foundBatch := k.GetOutgoingTxBatch(sdk.UnwrapSDKContext(c), EthChainPrefix, *addr, req.Nonce) if foundBatch == nil { return nil, sdkerrors.Wrap(sdkerrors.ErrUnknownRequest, "cannot find tx batch") } @@ -314,7 +314,6 @@ func (k Keeper) ERC20ToDenom( // GetLastObservedEthBlock queries the LastObservedEthereumBlockHeight func (k Keeper) GetLastObservedEthBlock( c context.Context, - evmChainPrefix string, req *types.QueryLastObservedEthBlockRequest, ) (*types.QueryLastObservedEthBlockResponse, error) { ctx := sdk.UnwrapSDKContext(c) @@ -324,7 +323,7 @@ func (k Keeper) GetLastObservedEthBlock( if req.UseV1Key { ethHeight = k.GetOldLastObservedEthereumBlockHeight(ctx) } else { - ethHeight = k.GetLastObservedEvmChainBlockHeight(ctx, evmChainPrefix) + ethHeight = k.GetLastObservedEvmChainBlockHeight(ctx, req.EvmChainPrefix) } return &types.QueryLastObservedEthBlockResponse{Block: ethHeight.EthereumBlockHeight}, nil @@ -336,13 +335,13 @@ func (k Keeper) GetOldLastObservedEthereumBlockHeight(ctx sdk.Context) types.Las if len(bytes) == 0 { return types.LastObservedEthereumBlockHeight{ - CosmosEthBlockHeight: 0, - EthereumBlockHeight: 0, + CosmosBlockHeight: 0, + EthereumBlockHeight: 0, } } height := types.LastObservedEthereumBlockHeight{ - CosmosEthBlockHeight: 0, - EthereumBlockHeight: 0, + CosmosBlockHeight: 0, + EthereumBlockHeight: 0, } k.cdc.MustUnmarshal(bytes, &height) return height @@ -351,7 +350,6 @@ func (k Keeper) GetOldLastObservedEthereumBlockHeight(ctx sdk.Context) types.Las // GetLastObservedEthNonce queries the LastObservedEventNonce func (k Keeper) GetLastObservedEthNonce( c context.Context, - evmChainPrefix string, req *types.QueryLastObservedEthNonceRequest, ) (*types.QueryLastObservedEthNonceResponse, error) { ctx := sdk.UnwrapSDKContext(c) @@ -361,7 +359,7 @@ func (k Keeper) GetLastObservedEthNonce( if req.UseV1Key { nonce = k.GetOldLastObservedEventNonce(ctx) } else { - nonce = k.GetLastObservedEventNonce(ctx, evmChainPrefix) + nonce = k.GetLastObservedEventNonce(ctx, req.EvmChainPrefix) } return &types.QueryLastObservedEthNonceResponse{Nonce: nonce}, nil diff --git a/module/x/gravity/keeper/invariants.go b/module/x/gravity/keeper/invariants.go index 4095ef81c..97c5fd3fb 100644 --- a/module/x/gravity/keeper/invariants.go +++ b/module/x/gravity/keeper/invariants.go @@ -280,7 +280,7 @@ func ValidateStore(ctx sdk.Context, evmChainPrefix string, k Keeper) error { if err != nil { return err } - // OutgoingTXBatchKey + // OutgoingTxBatchKey k.IterateOutgoingTxBatches(ctx, evmChainPrefix, func(key []byte, batch types.InternalOutgoingTxBatch) (stop bool) { err = batch.ValidateBasic() if err != nil { diff --git a/module/x/gravity/keeper/invariants_test.go b/module/x/gravity/keeper/invariants_test.go index 2dd83296f..ef2da6eb7 100644 --- a/module/x/gravity/keeper/invariants_test.go +++ b/module/x/gravity/keeper/invariants_test.go @@ -142,10 +142,10 @@ func TestModuleBalanceBatchedTxs(t *testing.T) { // when ctx = ctx.WithBlockTime(now) // tx batch size is 3, so that some of them stay behind - batch, err := input.GravityKeeper.BuildOutgoingTXBatch(ctx, evmChain.EvmChainPrefix, tok.Contract, 3) + batch, err := input.GravityKeeper.BuildOutgoingTxBatch(ctx, evmChain.EvmChainPrefix, tok.Contract, 3) require.NoError(t, err) // then check the batch persists - gotBatch := input.GravityKeeper.GetOutgoingTXBatch(ctx, evmChain.EvmChainPrefix, batch.TokenContract, batch.BatchNonce) + gotBatch := input.GravityKeeper.GetOutgoingTxBatch(ctx, evmChain.EvmChainPrefix, batch.TokenContract, batch.BatchNonce) require.NotNil(t, gotBatch) batches[i] = gotBatch // The module should be balanced with the new unobserved batch + leftover unbatched txs diff --git a/module/x/gravity/keeper/keeper.go b/module/x/gravity/keeper/keeper.go index b585bd26d..0bcb94f26 100644 --- a/module/x/gravity/keeper/keeper.go +++ b/module/x/gravity/keeper/keeper.go @@ -231,7 +231,7 @@ func (k Keeper) UnpackAttestationClaim(att *types.Attestation) (types.EthereumCl // For the time being this will serve func (k Keeper) GetDelegateKeys(ctx sdk.Context) []types.MsgSetOrchestratorAddress { store := ctx.KVStore(k.storeKey) - prefix := types.EvmAddressByValidatorKey + prefix := types.EthAddressByValidatorKey iter := store.Iterator(prefixRange(prefix)) defer iter.Close() @@ -242,7 +242,7 @@ func (k Keeper) GetDelegateKeys(ctx sdk.Context) []types.MsgSetOrchestratorAddre // to cut off the starting bytes, if you don't do this a valid // cosmos key will be made out of EthAddressByValidatorKey + the starting bytes // of the actual key - key := iter.Key()[len(types.EvmAddressByValidatorKey):] + key := iter.Key()[len(types.EthAddressByValidatorKey):] value := iter.Value() evmAddress, err := types.NewEthAddressFromBytes(value) if err != nil { diff --git a/module/x/gravity/keeper/keeper_delegate_key.go b/module/x/gravity/keeper/keeper_delegate_key.go index 38c046537..fe3da318b 100644 --- a/module/x/gravity/keeper/keeper_delegate_key.go +++ b/module/x/gravity/keeper/keeper_delegate_key.go @@ -136,8 +136,8 @@ func (k Keeper) SetEvmAddressForValidator(ctx sdk.Context, validator sdk.ValAddr panic(sdkerrors.Wrap(err, "invalid validator address")) } store := ctx.KVStore(k.storeKey) - store.Set(types.GetEvmAddressByValidatorKey(validator), evmAddr.GetAddress().Bytes()) - store.Set(types.GetValidatorByEvmAddressKey(evmAddr), []byte(validator)) + store.Set(types.GetEthAddressByValidatorKey(validator), evmAddr.GetAddress().Bytes()) + store.Set(types.GetValidatorByEthAddressKey(evmAddr), []byte(validator)) } // GetEvmAddressByValidator returns the evm address for a given gravity validator @@ -146,7 +146,7 @@ func (k Keeper) GetEvmAddressByValidator(ctx sdk.Context, validator sdk.ValAddre panic(sdkerrors.Wrap(err, "invalid validator address")) } store := ctx.KVStore(k.storeKey) - evmAddr := store.Get(types.GetEvmAddressByValidatorKey(validator)) + evmAddr := store.Get(types.GetEthAddressByValidatorKey(validator)) if evmAddr == nil { return nil, false } @@ -161,7 +161,7 @@ func (k Keeper) GetEvmAddressByValidator(ctx sdk.Context, validator sdk.ValAddre // GetValidatorByEvmAddress returns the validator for a given evm address func (k Keeper) GetValidatorByEvmAddress(ctx sdk.Context, evmAddr types.EthAddress) (validator stakingtypes.Validator, found bool) { store := ctx.KVStore(k.storeKey) - valAddr := store.Get([]byte(types.GetValidatorByEvmAddressKey(evmAddr))) + valAddr := store.Get([]byte(types.GetValidatorByEthAddressKey(evmAddr))) if valAddr == nil { return stakingtypes.Validator{ OperatorAddress: "", diff --git a/module/x/gravity/keeper/keeper_test.go b/module/x/gravity/keeper/keeper_test.go index 906519dee..ad80f8391 100644 --- a/module/x/gravity/keeper/keeper_test.go +++ b/module/x/gravity/keeper/keeper_test.go @@ -149,8 +149,8 @@ func TestAttestationIterator(t *testing.T) { require.NoError(t, err) for _, cd := range input.GravityKeeper.GetEvmChains(ctx) { - input.GravityKeeper.SetAttestation(ctx, cd.EvmChainPrefix, dep1.EventNonce, hash1, att1) - input.GravityKeeper.SetAttestation(ctx, cd.EvmChainPrefix, dep2.EventNonce, hash2, att2) + input.GravityKeeper.SetAttestation(ctx, cd.EvmChainPrefix, claim1.EventNonce, hash1, att1) + input.GravityKeeper.SetAttestation(ctx, cd.EvmChainPrefix, claim2.EventNonce, hash2, att2) atts := []types.Attestation{} input.GravityKeeper.IterateAttestations(ctx, cd.EvmChainPrefix, false, func(_ []byte, att types.Attestation) bool { diff --git a/module/x/gravity/keeper/keeper_valset_test.go b/module/x/gravity/keeper/keeper_valset_test.go index 5ef836fe4..7c995124e 100644 --- a/module/x/gravity/keeper/keeper_valset_test.go +++ b/module/x/gravity/keeper/keeper_valset_test.go @@ -5,13 +5,14 @@ import ( "testing" "bytes" + "sort" + _ "github.com/Gravity-Bridge/Gravity-Bridge/module/config" "github.com/Gravity-Bridge/Gravity-Bridge/module/x/gravity/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "golang.org/x/exp/slices" - "sort" ) const ( @@ -111,67 +112,69 @@ func TestIterateValsetConfirms(t *testing.T) { input, ctx := SetupFiveValChain(t) k := input.GravityKeeper - // verify that no valsets exist in the begining - assert.Equal(t, 0, len(k.GetValsets(ctx))) + for _, cd := range k.GetEvmChains(ctx) { + // verify that no valsets exist in the begining + assert.Equal(t, 0, len(k.GetValsets(ctx, cd.EvmChainPrefix))) - valset, err := k.GetCurrentValset(ctx) - require.NoError(t, err) + valset, err := k.GetCurrentValset(ctx, cd.EvmChainPrefix) + require.NoError(t, err) - orchestrators := OrchAddrs - confirmsByNonce := make(map[uint64][]types.MsgValsetConfirm, 10) + orchestrators := OrchAddrs + confirmsByNonce := make(map[uint64][]types.MsgValsetConfirm, 10) - // insert 10 valsets into the store, sometimes adding confirms - for i := 1; i <= 10; i++ { - valset.Height = uint64(i) - valset.Nonce = uint64(i) - k.StoreValset(ctx, valset) - k.SetLatestValsetNonce(ctx, valset.Nonce) + // insert 10 valsets into the store, sometimes adding confirms + for i := 1; i <= 10; i++ { + valset.Height = uint64(i) + valset.Nonce = uint64(i) + k.StoreValset(ctx, cd.EvmChainPrefix, valset) + k.SetLatestValsetNonce(ctx, cd.EvmChainPrefix, valset.Nonce) - confirmers := orchestrators - if i%2 == 0 { // No claims for "even-nonce'd" valsets - continue - } - if i == 3 { - // Only claim with 2 orchestrators - confirmers = orchestrators[0:2] - } - if i == 5 { - // Create a large gap - continue - } + confirmers := orchestrators + if i%2 == 0 { // No claims for "even-nonce'd" valsets + continue + } + if i == 3 { + // Only claim with 2 orchestrators + confirmers = orchestrators[0:2] + } + if i == 5 { + // Create a large gap + continue + } - confirms := createConfirmsForValset(ctx, k, confirmers, valset) - confirmsByNonce[valset.Nonce] = append(confirmsByNonce[valset.Nonce], confirms...) - } + confirms := createConfirmsForValset(ctx, k, cd.EvmChainPrefix, confirmers, valset) + confirmsByNonce[valset.Nonce] = append(confirmsByNonce[valset.Nonce], confirms...) + } - // verify that N valsets exist in the store - valsets := k.GetValsets(ctx) - assert.Equal(t, 10, len(valsets)) + // verify that N valsets exist in the store + valsets := k.GetValsets(ctx, cd.EvmChainPrefix) + assert.Equal(t, 10, len(valsets)) - noncesToAvoid := []uint64{2, 4, 5, 6, 8, 10} - // verify that confirms appear in the IterateValsetClaims function - k.IterateValsetConfirms(ctx, func(key []byte, confirms []types.MsgValsetConfirm, nonce uint64) (stop bool) { - require.False(t, slices.Contains(noncesToAvoid, nonce), "IterateValsetConfirms returned confirms for a nonce which should not exist") + noncesToAvoid := []uint64{2, 4, 5, 6, 8, 10} + // verify that confirms appear in the IterateValsetClaims function + k.IterateValsetConfirms(ctx, func(key []byte, confirms []types.MsgValsetConfirm, nonce uint64) (stop bool) { + require.False(t, slices.Contains(noncesToAvoid, nonce), "IterateValsetConfirms returned confirms for a nonce which should not exist") - expectedConfirms := confirmsByNonce[nonce] - require.Equal(t, len(expectedConfirms), len(confirms)) + expectedConfirms := confirmsByNonce[nonce] + require.Equal(t, len(expectedConfirms), len(confirms)) - sort.Slice(expectedConfirms, func(i, j int) bool { - return expectedConfirms[i].Orchestrator < expectedConfirms[j].Orchestrator - }) - sort.Slice(confirms, func(i, j int) bool { - return confirms[i].Orchestrator < confirms[j].Orchestrator - }) + sort.Slice(expectedConfirms, func(i, j int) bool { + return expectedConfirms[i].Orchestrator < expectedConfirms[j].Orchestrator + }) + sort.Slice(confirms, func(i, j int) bool { + return confirms[i].Orchestrator < confirms[j].Orchestrator + }) - for i, expConf := range expectedConfirms { - require.Equal(t, expConf, confirms[i]) - } + for i, expConf := range expectedConfirms { + require.Equal(t, expConf, confirms[i]) + } - return false - }) + return false + }) + } } -func createConfirmsForValset(ctx sdk.Context, k Keeper, orchestrators []sdk.AccAddress, valset types.Valset) []types.MsgValsetConfirm { +func createConfirmsForValset(ctx sdk.Context, k Keeper, evmChainPrefix string, orchestrators []sdk.AccAddress, valset types.Valset) []types.MsgValsetConfirm { // Sort the orchestrators so that checking is easy sort.Slice(orchestrators, func(i, j int) bool { return bytes.Compare(orchestrators[i].Bytes(), orchestrators[j].Bytes()) < 0 @@ -188,7 +191,7 @@ func createConfirmsForValset(ctx sdk.Context, k Keeper, orchestrators []sdk.AccA Signature: "d34db33f", } - k.SetValsetConfirm(ctx, confirm) + k.SetValsetConfirm(ctx, evmChainPrefix, confirm) confirms[i] = confirm } diff --git a/module/x/gravity/keeper/migrations.go b/module/x/gravity/keeper/migrations.go index 930083443..d8db0c4fc 100644 --- a/module/x/gravity/keeper/migrations.go +++ b/module/x/gravity/keeper/migrations.go @@ -1,6 +1,7 @@ package keeper import ( + v2 "github.com/Gravity-Bridge/Gravity-Bridge/module/x/gravity/migrations/v2" v3 "github.com/Gravity-Bridge/Gravity-Bridge/module/x/gravity/migrations/v3" sdk "github.com/cosmos/cosmos-sdk/types" ) @@ -16,9 +17,9 @@ func NewMigrator(keeper Keeper) Migrator { } // Migrate1to2 migrates from consensus version 1 to 2. -func (m Migrator) Migrate2to3(ctx sdk.Context) error { - ctx.Logger().Info("Pleiades Upgrade: Enter Migrate2to3()") - return v3.MigrateStore(ctx, m.keeper.storeKey, m.keeper.cdc) +func (m Migrator) Migrate1to2(ctx sdk.Context) error { + ctx.Logger().Info("Mercury Upgrade: Enter Migrate1to2()") + return v2.MigrateStore(ctx, m.keeper.storeKey, m.keeper.cdc) } // Migrate2to3 migrates from consensus version 2 to 3. diff --git a/module/x/gravity/keeper/msg_server.go b/module/x/gravity/keeper/msg_server.go index 1227a41d0..b30d8b9eb 100644 --- a/module/x/gravity/keeper/msg_server.go +++ b/module/x/gravity/keeper/msg_server.go @@ -165,7 +165,7 @@ func (k msgServer) RequestBatch(c context.Context, msg *types.MsgRequestBatch) ( return nil, sdkerrors.Wrap(err, "Could not look up erc 20 denominator") } - batch, err := k.BuildOutgoingTXBatch(ctx, EthChainPrefix, *tokenContract, OutgoingTxBatchSize) + batch, err := k.BuildOutgoingTxBatch(ctx, EthChainPrefix, *tokenContract, OutgoingTxBatchSize) if err != nil { return nil, sdkerrors.Wrap(err, "Could not build outgoing tx batch") } @@ -193,7 +193,7 @@ func (k msgServer) ConfirmBatch(c context.Context, msg *types.MsgConfirmBatch) ( ctx := sdk.UnwrapSDKContext(c) // fetch the outgoing batch given the nonce - batch := k.GetOutgoingTXBatch(ctx, EthChainPrefix, *contract, msg.Nonce) + batch := k.GetOutgoingTxBatch(ctx, EthChainPrefix, *contract, msg.Nonce) if batch == nil { return nil, sdkerrors.Wrap(types.ErrInvalid, "couldn't find batch") } @@ -403,6 +403,7 @@ func (k msgServer) BatchSendToEthClaim(c context.Context, msg *types.MsgBatchSen /* Perform some additional checks on the input to determine if it is valid before allowing it on the chain Note that because of the gas meter we must avoid calls which consume gas, like fetching data from the keeper */ + additionalPatchChecks(ctx, k, msg) msgAny, err := codectypes.NewAnyWithValue(msg) @@ -427,7 +428,7 @@ func additionalPatchChecks(ctx sdk.Context, k msgServer, msg *types.MsgBatchSend } // Replicate the following but without using a gas meter: - b := k.GetOutgoingTXBatch(ctx, *contractAddress, msg.BatchNonce) + b := k.GetOutgoingTxBatch(ctx, msg.EvmChainPrefix, *contractAddress, msg.BatchNonce) if b == nil { // Batch deleted, just add the vote to the stored attestation return diff --git a/module/x/gravity/keeper/pool_test.go b/module/x/gravity/keeper/pool_test.go index ff7a2b7b5..e0ab36d0c 100644 --- a/module/x/gravity/keeper/pool_test.go +++ b/module/x/gravity/keeper/pool_test.go @@ -539,7 +539,7 @@ func checkRemovedTx(t *testing.T, input TestInput, ctx sdk.Context, id uint64, f currentBal := input.BankKeeper.GetBalance(ctx, mySender, myTokenDenom).Amount.Uint64() require.Equal(t, currentBal, originalBal-*feesAndAmounts) expectedKey := myTokenContractAddr + fmt.Sprint(fee) + fmt.Sprint(id) - input.GravityKeeper.IterateUnbatchedTransactions(ctx, types.AppendChainPrefix(types.OutgoingTXPoolKey, evmChainPrefix), func(key []byte, tx *types.InternalOutgoingTransferTx) bool { + input.GravityKeeper.filterAndIterateUnbatchedTransactions(ctx, types.AppendChainPrefix(types.OutgoingTXPoolKey, evmChainPrefix), func(key []byte, tx *types.InternalOutgoingTransferTx) bool { require.NotEqual(t, []byte(expectedKey), key) found := id == tx.Id && fee == tx.Erc20Fee.Amount.Uint64() && @@ -921,7 +921,7 @@ func TestIterateUnbatchedTransactions(t *testing.T) { } // filterAndIterateUnbatchedTransactions anotherFoundMap := make(map[uint64]bool) - input.GravityKeeper.IterateUnbatchedTransactions(ctx, types.AppendChainPrefix(types.OutgoingTXPoolKey, evmChain.EvmChainPrefix), func(key []byte, tx *types.InternalOutgoingTransferTx) bool { + input.GravityKeeper.filterAndIterateUnbatchedTransactions(ctx, types.AppendChainPrefix(types.OutgoingTXPoolKey, evmChain.EvmChainPrefix), func(key []byte, tx *types.InternalOutgoingTransferTx) bool { require.NotNil(t, tx) fTx := idToTxMap[tx.Id] require.NotNil(t, fTx) diff --git a/module/x/gravity/keeper/querier_test.go b/module/x/gravity/keeper/querier_test.go index 498eb8fdc..bdf2faa0d 100644 --- a/module/x/gravity/keeper/querier_test.go +++ b/module/x/gravity/keeper/querier_test.go @@ -597,7 +597,7 @@ func createTestBatch(t *testing.T, input TestInput, maxTxElements uint, evmChain input.Context = input.Context.WithBlockTime(now) // tx batch size is 2, so that some of them stay behind - _, err = input.GravityKeeper.BuildOutgoingTXBatch(input.Context, evmChainPrefix, *tokenContract, maxTxElements) + _, err = input.GravityKeeper.BuildOutgoingTxBatch(input.Context, evmChainPrefix, *tokenContract, maxTxElements) require.NoError(t, err) // Should have 2 and 3 from above // 1 and 4 should be unbatched @@ -1091,7 +1091,7 @@ func TestQueryPendingSendToEth(t *testing.T) { // tx batch size is 2, so that some of them stay behind // Should contain 2 and 3 from above - _, err = input.GravityKeeper.BuildOutgoingTXBatch(sdkCtx, evmChain.EvmChainPrefix, *tokenContract, 2) + _, err = input.GravityKeeper.BuildOutgoingTxBatch(sdkCtx, evmChain.EvmChainPrefix, *tokenContract, 2) require.NoError(t, err) // Should receive 1 and 4 unbatched, 2 and 3 batched in response diff --git a/module/x/gravity/keeper/test_common.go b/module/x/gravity/keeper/test_common.go index 08e0312d2..336b27f5d 100644 --- a/module/x/gravity/keeper/test_common.go +++ b/module/x/gravity/keeper/test_common.go @@ -666,7 +666,7 @@ func (t TestInput) AssertInvariants() { bankInvariantFunc := bankkeeper.AllInvariants(t.BankKeeper) govInvariantFunc := govkeeper.AllInvariants(t.GovKeeper, t.BankKeeper) stakeInvariantFunc := stakingkeeper.AllInvariants(t.StakingKeeper) - gravInvariantFunc := AllInvariants(t.GravityKeeper) + gravInvariantFunc := AllInvariants(t.GravityKeeper, EthChainPrefix) invariantStr, invariantViolated := distrInvariantFunc(t.Context) if invariantViolated { diff --git a/module/x/gravity/migrations/v1/key.go b/module/x/gravity/migrations/v1/key.go index 5bc9c3152..4510ec710 100644 --- a/module/x/gravity/migrations/v1/key.go +++ b/module/x/gravity/migrations/v1/key.go @@ -47,8 +47,8 @@ var ( // DenomiatorPrefix indexes token contract addresses from ETH on gravity DenomiatorPrefix = "DenomiatorPrefix" - // OutgoingTXBatchKey indexes outgoing tx batches under a nonce and token address - OutgoingTXBatchKey = "OutgoingTXBatchKey" + // OutgoingTxBatchKey indexes outgoing tx batches under a nonce and token address + OutgoingTxBatchKey = "OutgoingTxBatchKey" // BatchConfirmKey indexes validator confirmations by token contract address BatchConfirmKey = "BatchConfirmKey" @@ -181,7 +181,7 @@ func GetERC20ToDenomKey(erc20 types.EthAddress) string { // prefix eth-contract-address // [0xa][0xc783df8a850f42e7F7e57013759C285caa701eB6] func GetOutgoingTxBatchContractPrefix(tokenContract types.EthAddress) string { - return OutgoingTXBatchKey + tokenContract.GetAddress().String() + return OutgoingTxBatchKey + tokenContract.GetAddress().String() } // GetOutgoingTxBatchKey returns the following key format diff --git a/module/x/gravity/migrations/v2/key.go b/module/x/gravity/migrations/v2/key.go index 7d3e7d037..377d81025 100644 --- a/module/x/gravity/migrations/v2/key.go +++ b/module/x/gravity/migrations/v2/key.go @@ -65,9 +65,9 @@ var ( // [0x44f7816ec23d990ee39d9ed4609bbd4d] OutgoingTXPoolKey = HashString("OutgoingTXPoolKey") - // OutgoingTXBatchKey indexes outgoing tx batches under a nonce and token address + // OutgoingTxBatchKey indexes outgoing tx batches under a nonce and token address // [0x54e2db44755d8865b1ff4227402e204f] - OutgoingTXBatchKey = HashString("OutgoingTXBatchKey") + OutgoingTxBatchKey = HashString("OutgoingTxBatchKey") // BatchConfirmKey indexes validator confirmations by token contract address // [0x75b935a854d50880236724b9c4822daf] @@ -233,7 +233,7 @@ func GetOutgoingTxPoolKey(fee types.InternalERC20Token, id uint64) []byte { // prefix eth-contract-address // [0x0][0xc783df8a850f42e7F7e57013759C285caa701eB6] func GetOutgoingTxBatchContractPrefix(tokenContract types.EthAddress) []byte { - return AppendBytes(OutgoingTXBatchKey, tokenContract.GetAddress().Bytes()) + return AppendBytes(OutgoingTxBatchKey, tokenContract.GetAddress().Bytes()) } // GetOutgoingTxBatchKey returns the following key format diff --git a/module/x/gravity/migrations/v2/store.go b/module/x/gravity/migrations/v2/store.go index b192df331..e2d2e09a8 100644 --- a/module/x/gravity/migrations/v2/store.go +++ b/module/x/gravity/migrations/v2/store.go @@ -165,9 +165,9 @@ func migrateOutgoingTxs(store storetypes.KVStore) error { } func migrateOutgoingTxBatches(store storetypes.KVStore) error { - // OutgoingTXBatchKey + tokenContract.GetAddress() + ConvertByteArrToString(UInt64Bytes(nonce)) - // OutgoingTXBatchKey + string(tokenContract.GetAddress().Bytes()) + ConvertByteArrToString(UInt64Bytes(nonce)) - prefixStore := prefix.NewStore(store, []byte(v1.OutgoingTXBatchKey)) + // OutgoingTxBatchKey + tokenContract.GetAddress() + ConvertByteArrToString(UInt64Bytes(nonce)) + // OutgoingTxBatchKey + string(tokenContract.GetAddress().Bytes()) + ConvertByteArrToString(UInt64Bytes(nonce)) + prefixStore := prefix.NewStore(store, []byte(v1.OutgoingTxBatchKey)) iterator := prefixStore.Iterator(nil, nil) defer iterator.Close() @@ -189,7 +189,7 @@ func migrateOutgoingTxBatches(store storetypes.KVStore) error { // hash(string_prefix) | key_part1 | key_part2 ... func migrateKeys(store sdk.KVStore, cdc codec.BinaryCodec) error { fmt.Println("Mercury Upgrade: Enter migrateKeys") - if err := migrateKeysFromValues(store, cdc, v1.OutgoingTXBatchKey, convertBatchKey); err != nil { + if err := migrateKeysFromValues(store, cdc, v1.OutgoingTxBatchKey, convertBatchKey); err != nil { return err } if err := migrateKeysFromValues(store, cdc, v1.ValsetRequestKey, convertValsetKey); err != nil { diff --git a/module/x/gravity/migrations/v2/store_test.go b/module/x/gravity/migrations/v2/store_test.go index 1671aab7d..84284b9ff 100644 --- a/module/x/gravity/migrations/v2/store_test.go +++ b/module/x/gravity/migrations/v2/store_test.go @@ -58,7 +58,7 @@ func oldGetOutgoingTxPoolKey(fee types.InternalERC20Token, id uint64) string { } func oldGetOutgoingTxBatchKey(tokenContract string, nonce uint64) string { - return v1.OutgoingTXBatchKey + tokenContract + v1.ConvertByteArrToString(v2.UInt64Bytes(nonce)) + return v1.OutgoingTxBatchKey + tokenContract + v1.ConvertByteArrToString(v2.UInt64Bytes(nonce)) } func TestMigrateCosmosOriginatedDenomToERC20(t *testing.T) { @@ -647,13 +647,13 @@ func TestMigrateStoreKeysFromValues(t *testing.T) { value []byte }{ { - "OutgoingTXBatchKey", + "OutgoingTxBatchKey", v1.GetOutgoingTxBatchKey(*ethAddr, dummyOutgoingTxBatch.BatchNonce), v2.GetOutgoingTxBatchKey(*ethAddr, dummyOutgoingTxBatch.BatchNonce), marshaler.MustMarshal(&dummyOutgoingTxBatch), }, { - "OutgoingTXBatchKey - Bytes Corner case", + "OutgoingTxBatchKey - Bytes Corner case", v1.GetOutgoingTxBatchKey(*ethAddr, dummyCornerCaseBatch.BatchNonce), v2.GetOutgoingTxBatchKey(*ethAddr, dummyCornerCaseBatch.BatchNonce), marshaler.MustMarshal(&dummyCornerCaseBatch), @@ -754,8 +754,8 @@ func TestMigrateInvalidStore(t *testing.T) { value []byte }{ { - "OutgoingTXBatchKey - Invalid Ethereum address", - v1.OutgoingTXBatchKey + invalidEthAddress + v1.ConvertByteArrToString(v2.UInt64Bytes(dummyOutgoingTxBatch.BatchNonce)), + "OutgoingTxBatchKey - Invalid Ethereum address", + v1.OutgoingTxBatchKey + invalidEthAddress + v1.ConvertByteArrToString(v2.UInt64Bytes(dummyOutgoingTxBatch.BatchNonce)), marshaler.MustMarshal(&dummyOutgoingTxBatch), }, { diff --git a/module/x/gravity/migrations/v3/store.go b/module/x/gravity/migrations/v3/store.go index 3832aad22..0a66e1fe8 100644 --- a/module/x/gravity/migrations/v3/store.go +++ b/module/x/gravity/migrations/v3/store.go @@ -25,7 +25,7 @@ func MigrateStore(ctx sdk.Context, storeKey storetypes.StoreKey, cdc codec.Binar updateKeysWithEthPrefix(store, v2.ValsetConfirmKey) updateKeysWithEthPrefix(store, v2.OracleAttestationKey) updateKeysWithEthPrefix(store, v2.OutgoingTXPoolKey) - updateKeysWithEthPrefix(store, v2.OutgoingTXBatchKey) + updateKeysWithEthPrefix(store, v2.OutgoingTxBatchKey) updateKeysWithEthPrefix(store, v2.BatchConfirmKey) updateKeysWithEthPrefix(store, v2.LastEventNonceByValidatorKey) updateKeysWithEthPrefix(store, v2.LastObservedEventNonceKey) @@ -42,8 +42,8 @@ func MigrateStore(ctx sdk.Context, storeKey storetypes.StoreKey, cdc codec.Binar updateKeysWithEthPrefix(store, v2.LastObservedValsetKey) updateKeysPrefixToEvm(store, v2.PastEthSignatureCheckpointKey, types.PastEvmSignatureCheckpointKey) - updateKeysPrefixToEvmWithoutChain(store, v2.ValidatorByEthAddressKey, types.ValidatorByEvmAddressKey) - updateKeysPrefixToEvmWithoutChain(store, v2.EthAddressByValidatorKey, types.EvmAddressByValidatorKey) + updateKeysPrefixToEvmWithoutChain(store, v2.ValidatorByEthAddressKey, types.ValidatorByEthAddressKey) + updateKeysPrefixToEvmWithoutChain(store, v2.EthAddressByValidatorKey, types.EthAddressByValidatorKey) updateKeyPrefixToEvm(store, v2.LastObservedEthereumBlockHeightKey, types.AppendChainPrefix(types.LastObservedEvmBlockHeightKey, EthereumChainPrefix)) updateKeyPrefixToEvm(store, v2.LastEventNonceByValidatorKey, types.AppendChainPrefix(types.LastEventNonceByValidatorKey, EthereumChainPrefix)) diff --git a/module/x/gravity/migrations/v3/store_test.go b/module/x/gravity/migrations/v3/store_test.go index 9bb8ef789..fea46297e 100644 --- a/module/x/gravity/migrations/v3/store_test.go +++ b/module/x/gravity/migrations/v3/store_test.go @@ -210,7 +210,7 @@ func TestMigrateStoreKeys(t *testing.T) { { "ValidatorByEthAddressKey", v2.GetValidatorByEthAddressKey(*ethAddr), - types.GetValidatorByEvmAddressKey(*ethAddr), + types.GetValidatorByEthAddressKey(*ethAddr), validatorAddr.Bytes(), }, { @@ -240,7 +240,7 @@ func TestMigrateStoreKeys(t *testing.T) { { "EthAddressByValidatorKey", v2.GetEthAddressByValidatorKey(validatorAddr), - types.GetEvmAddressByValidatorKey(validatorAddr), + types.GetEthAddressByValidatorKey(validatorAddr), ethAddr.GetAddress().Bytes(), }, { @@ -250,7 +250,7 @@ func TestMigrateStoreKeys(t *testing.T) { ethAddr.GetAddress().Bytes(), }, { - "OutgoingTXBatchKey", + "OutgoingTxBatchKey", v2.GetOutgoingTxBatchKey(*ethAddr, dummyOutgoingTxBatch.BatchNonce), types.GetOutgoingTxBatchKey(v3.EthereumChainPrefix, *ethAddr, dummyOutgoingTxBatch.BatchNonce), marshaler.MustMarshal(&dummyOutgoingTxBatch), diff --git a/module/x/gravity/spec/03_state_transitions.md b/module/x/gravity/spec/03_state_transitions.md index dc417e2bc..534b320ba 100644 --- a/module/x/gravity/spec/03_state_transitions.md +++ b/module/x/gravity/spec/03_state_transitions.md @@ -60,7 +60,7 @@ Implemented in `AttestationHandler.Handle`. ## MsgWithdrawClaim -This event is fired when a `OutgoingTxBatch` is executed on Ethereum, sending the tokens in that `OutgoingTXBatch` to their destinations on Ethereum. +This event is fired when a `OutgoingTxBatch` is executed on Ethereum, sending the tokens in that `OutgoingTxBatch` to their destinations on Ethereum. ### On event observed: @@ -86,7 +86,7 @@ Implemented in `AttestationHandler.Handle`. ### Batch creation -Implemented in `Keeper.BuildOutgoingTXBatch` +Implemented in `Keeper.BuildOutgoingTxBatch` To create a new batch for a given token type: diff --git a/module/x/gravity/types/key.go b/module/x/gravity/types/key.go index afacc8c8c..332db35b3 100644 --- a/module/x/gravity/types/key.go +++ b/module/x/gravity/types/key.go @@ -22,15 +22,15 @@ const ( ) var ( - // EvmAddressByValidatorKey indexes cosmos validator account addresses + // EthAddressByValidatorKey indexes cosmos validator account addresses // i.e. gravity1ahx7f8wyertuus9r20284ej0asrs085ceqtfnm // [0xe1c9f604d2a57a4242caa326f86c192e] - EvmAddressByValidatorKey = HashString("EvmAddressValidatorKey") + EthAddressByValidatorKey = HashString("EvmAddressValidatorKey") - // ValidatorByEvmAddressKey indexes ethereum addresses + // ValidatorByEthAddressKey indexes ethereum addresses // i.e. 0xAb5801a7D398351b8bE11C439e05C5B3259aeC9B // [0xf0ff4297406d79f5a44a28503b68ca3e] - ValidatorByEvmAddressKey = HashString("ValidatorByEvmAddressKey") + ValidatorByEthAddressKey = HashString("ValidatorByEthAddressKey") // ValsetRequestKey indexes valset requests by nonce // [0xa318dca6c74494c2fac1841c9e2454fe] @@ -66,9 +66,9 @@ var ( // [0x44f7816ec23d990ee39d9ed4609bbd4d] OutgoingTXPoolKey = HashString("OutgoingTXPoolKey") - // OutgoingTXBatchKey indexes outgoing tx batches under a nonce and token address + // OutgoingTxBatchKey indexes outgoing tx batches under a nonce and token address // [0x54e2db44755d8865b1ff4227402e204f] - OutgoingTXBatchKey = HashString("OutgoingTXBatchKey") + OutgoingTxBatchKey = HashString("OutgoingTxBatchKey") // BatchConfirmKey indexes validator confirmations by token contract address // [0x75b935a854d50880236724b9c4822daf] @@ -176,21 +176,21 @@ func GetOrchestratorAddressKey(orc sdk.AccAddress) []byte { return AppendBytes(KeyOrchestratorAddress, orc.Bytes()) } -// GetEvmAddressByValidatorKey returns the following key format +// GetEthAddressByValidatorKey returns the following key format // prefix cosmos-validator // [0x0][gravityvaloper1ahx7f8wyertuus9r20284ej0asrs085ceqtfnm] -func GetEvmAddressByValidatorKey(validator sdk.ValAddress) []byte { +func GetEthAddressByValidatorKey(validator sdk.ValAddress) []byte { if err := sdk.VerifyAddressFormat(validator); err != nil { panic(sdkerrors.Wrap(err, "invalid validator address")) } - return AppendBytes(EvmAddressByValidatorKey, validator.Bytes()) + return AppendBytes(EthAddressByValidatorKey, validator.Bytes()) } -// GetValidatorByEvmAddressKey returns the following key format +// GetValidatorByEthAddressKey returns the following key format // prefix cosmos-validator // [0x0][0xAb5801a7D398351b8bE11C439e05C5B3259aeC9B] -func GetValidatorByEvmAddressKey(evmAddress EthAddress) []byte { - return AppendBytes(ValidatorByEvmAddressKey, evmAddress.GetAddress().Bytes()) +func GetValidatorByEthAddressKey(evmAddress EthAddress) []byte { + return AppendBytes(ValidatorByEthAddressKey, evmAddress.GetAddress().Bytes()) } // GetValsetKey returns the following key format @@ -250,7 +250,7 @@ func GetOutgoingTxPoolKey(evmChainPrefix string, fee InternalERC20Token, id uint // prefix chain evm-contract-address // [0x0][xyzchain][0xc783df8a850f42e7F7e57013759C285caa701eB6] func GetOutgoingTxBatchContractPrefix(evmChainPrefix string, tokenContract EthAddress) []byte { - return AppendBytes(OutgoingTXBatchKey, []byte(evmChainPrefix), tokenContract.GetAddress().Bytes()) + return AppendBytes(OutgoingTxBatchKey, []byte(evmChainPrefix), tokenContract.GetAddress().Bytes()) } // GetOutgoingTxBatchKey returns the following key format diff --git a/module/x/gravity/types/key_test.go b/module/x/gravity/types/key_test.go index 0d823ac1b..9d3986ba3 100644 --- a/module/x/gravity/types/key_test.go +++ b/module/x/gravity/types/key_test.go @@ -33,14 +33,14 @@ func getAllKeys() [][]byte { keys := make([][]byte, 47) - keys[i] = EvmAddressByValidatorKey - keys[*inc(&i)] = ValidatorByEvmAddressKey + keys[i] = EthAddressByValidatorKey + keys[*inc(&i)] = ValidatorByEthAddressKey keys[*inc(&i)] = ValsetRequestKey keys[*inc(&i)] = ValsetConfirmKey keys[*inc(&i)] = LEGACYOracleClaimKey keys[*inc(&i)] = OracleAttestationKey keys[*inc(&i)] = OutgoingTXPoolKey - keys[*inc(&i)] = OutgoingTXBatchKey + keys[*inc(&i)] = OutgoingTxBatchKey keys[*inc(&i)] = BatchConfirmKey keys[*inc(&i)] = LastEventNonceByValidatorKey keys[*inc(&i)] = LastObservedEventNonceKey @@ -78,8 +78,8 @@ func getAllKeys() [][]byte { dummyDenom := "footoken" keys[*inc(&i)] = GetOrchestratorAddressKey(dummyAddr) - keys[*inc(&i)] = GetEvmAddressByValidatorKey(dummyAddr) - keys[*inc(&i)] = GetValidatorByEvmAddressKey(dummyEthAddr) + keys[*inc(&i)] = GetEthAddressByValidatorKey(dummyAddr) + keys[*inc(&i)] = GetValidatorByEthAddressKey(dummyEthAddr) keys[*inc(&i)] = GetValsetKey(dummyPrefix, dummyNonce) keys[*inc(&i)] = GetValsetConfirmNoncePrefix(dummyPrefix, dummyNonce) keys[*inc(&i)] = GetValsetConfirmKey(dummyPrefix, dummyNonce, dummyAddr) diff --git a/module/x/gravity/types/msgs.pb.go b/module/x/gravity/types/msgs.pb.go index 1f89e0e62..02d52beb6 100644 --- a/module/x/gravity/types/msgs.pb.go +++ b/module/x/gravity/types/msgs.pb.go @@ -44,8 +44,8 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // The orchestrator field is a cosmos1... string (i.e. sdk.AccAddress) that // references the key that is being delegated to // ETH_ADDRESS -// This is a hex encoded 0x Ethereum public key that will be used by this validator -// on Ethereum +// This is a hex encoded 0x Ethereum public key that will be used by this +// validator on Ethereum type MsgSetOrchestratorAddress struct { Validator string `protobuf:"bytes,1,opt,name=validator,proto3" json:"validator,omitempty"` Orchestrator string `protobuf:"bytes,2,opt,name=orchestrator,proto3" json:"orchestrator,omitempty"` @@ -842,8 +842,9 @@ var xxx_messageInfo_MsgSendToCosmosClaimResponse proto.InternalMessageInfo // MsgExecuteIbcAutoForwards // Prompts the forwarding of Pending IBC Auto-Forwards in the queue -// The Pending forwards will be executed in order of their original SendToCosmos.EventNonce -// The funds in the queue will be sent to a local gravity-prefixed address if IBC transfer is not possible +// The Pending forwards will be executed in order of their original +// SendToCosmos.EventNonce The funds in the queue will be sent to a local +// gravity-prefixed address if IBC transfer is not possible type MsgExecuteIbcAutoForwards struct { ForwardsToClear uint64 `protobuf:"varint,1,opt,name=forwards_to_clear,json=forwardsToClear,proto3" json:"forwards_to_clear,omitempty"` Executor string `protobuf:"bytes,2,opt,name=executor,proto3" json:"executor,omitempty"` @@ -940,6 +941,7 @@ type MsgBatchSendToEthClaim struct { BatchNonce uint64 `protobuf:"varint,3,opt,name=batch_nonce,json=batchNonce,proto3" json:"batch_nonce,omitempty"` TokenContract string `protobuf:"bytes,4,opt,name=token_contract,json=tokenContract,proto3" json:"token_contract,omitempty"` Orchestrator string `protobuf:"bytes,5,opt,name=orchestrator,proto3" json:"orchestrator,omitempty"` + EvmChainPrefix string `protobuf:"bytes,6,opt,name=evm_chain_prefix,json=evmChainPrefix,proto3" json:"evm_chain_prefix,omitempty"` } func (m *MsgBatchSendToEthClaim) Reset() { *m = MsgBatchSendToEthClaim{} } @@ -1010,6 +1012,13 @@ func (m *MsgBatchSendToEthClaim) GetOrchestrator() string { return "" } +func (m *MsgBatchSendToEthClaim) GetEvmChainPrefix() string { + if m != nil { + return m.EvmChainPrefix + } + return "" +} + type MsgBatchSendToEthClaimResponse struct { } @@ -2352,134 +2361,136 @@ func init() { func init() { proto.RegisterFile("gravity/v1/msgs.proto", fileDescriptor_2f8523f2f6feb451) } var fileDescriptor_2f8523f2f6feb451 = []byte{ - // 2030 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x58, 0xcd, 0x6f, 0x1c, 0x49, - 0x15, 0x4f, 0xdb, 0xe3, 0x24, 0x7e, 0xfe, 0x8a, 0x3b, 0x8e, 0x33, 0xd3, 0xb1, 0xc7, 0x76, 0x67, - 0xfd, 0xb1, 0x59, 0x3c, 0x13, 0x9b, 0x03, 0x42, 0x2b, 0xb1, 0xf2, 0x4c, 0x1c, 0x76, 0x04, 0xce, - 0x4a, 0xe3, 0xb0, 0x12, 0x08, 0xa9, 0xd5, 0xd3, 0x5d, 0xe9, 0x69, 0xd2, 0xd3, 0x6d, 0xba, 0x6a, - 0x66, 0xed, 0xcb, 0x4a, 0x70, 0x43, 0xcb, 0x01, 0xc1, 0x05, 0xa4, 0x45, 0x42, 0x82, 0x2b, 0xe2, - 0xc2, 0x89, 0x3f, 0x00, 0xad, 0x38, 0xc0, 0x4a, 0x5c, 0x10, 0x87, 0x08, 0x25, 0xfc, 0x21, 0xa8, - 0x3e, 0xba, 0xa6, 0xba, 0xa7, 0x66, 0x3c, 0x42, 0xd9, 0xd3, 0x74, 0xbd, 0x7a, 0xf5, 0xde, 0xaf, - 0xde, 0x7b, 0xf5, 0x3e, 0x06, 0xee, 0x05, 0xa9, 0x3b, 0x08, 0xc9, 0x55, 0x7d, 0x70, 0x54, 0xef, - 0xe1, 0x00, 0xd7, 0x2e, 0xd2, 0x84, 0x24, 0x26, 0x08, 0x72, 0x6d, 0x70, 0x64, 0x55, 0xbd, 0x04, - 0xf7, 0x12, 0x5c, 0xef, 0xb8, 0x18, 0xd5, 0x07, 0x47, 0x1d, 0x44, 0xdc, 0xa3, 0xba, 0x97, 0x84, - 0x31, 0xe7, 0xb5, 0xd6, 0x82, 0x24, 0x48, 0xd8, 0x67, 0x9d, 0x7e, 0x09, 0xea, 0x46, 0x90, 0x24, - 0x41, 0x84, 0xea, 0xee, 0x45, 0x58, 0x77, 0xe3, 0x38, 0x21, 0x2e, 0x09, 0x93, 0x58, 0xc8, 0xb7, - 0xd6, 0x15, 0xb5, 0xe4, 0xea, 0x02, 0x65, 0xf4, 0x8a, 0x38, 0xc5, 0x56, 0x9d, 0xfe, 0x8b, 0xba, - 0x1b, 0x5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 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x58, 0xcd, 0x6f, 0x23, 0x49, + 0x15, 0x9f, 0x4e, 0x9c, 0x99, 0xc9, 0xcb, 0x87, 0x27, 0x3d, 0x99, 0x8c, 0xdd, 0x93, 0x38, 0x49, + 0xcf, 0xe6, 0x63, 0x67, 0x89, 0x3d, 0x09, 0x07, 0x84, 0x56, 0x62, 0x15, 0x7b, 0x32, 0xac, 0x05, + 0x99, 0x45, 0xce, 0xb0, 0x12, 0x08, 0xa9, 0xd5, 0xee, 0xae, 0xb4, 0x9b, 0xe9, 0x8f, 0xd0, 0x5d, + 0xf6, 0x26, 0x97, 0x95, 0xe0, 0x86, 0x96, 0x03, 0x82, 0x0b, 0x48, 0x8b, 0x84, 0x04, 0x57, 0xc4, + 0x85, 0x13, 0x7f, 0x00, 0x5a, 0x71, 0x40, 0x2b, 0x71, 0x41, 0x1c, 0x46, 0x68, 0x86, 0x7f, 0x82, + 0x1b, 0xaa, 0x8f, 0x2e, 0x57, 0xb7, 0xcb, 0x8e, 0x85, 0xc2, 0xc9, 0xae, 0x57, 0xaf, 0xde, 0xfb, + 0xd5, 0x7b, 0xaf, 0xde, 0x47, 0xc3, 0x03, 0x2f, 0xb1, 0x07, 0x3e, 0xbe, 0x6a, 0x0c, 0x0e, 0x1b, + 0x61, 0xea, 0xa5, 0xf5, 0x8b, 0x24, 0xc6, 0xb1, 0x0e, 0x9c, 0x5c, 0x1f, 0x1c, 0x1a, 0x35, 0x27, + 0x4e, 0xc3, 0x38, 0x6d, 0x74, 0xed, 0x14, 0x35, 0x06, 0x87, 0x5d, 0x84, 0xed, 0xc3, 0x86, 0x13, + 0xfb, 0x11, 0xe3, 0x35, 0x56, 0xbd, 0xd8, 0x8b, 0xe9, 0xdf, 0x06, 0xf9, 0xc7, 0xa9, 0xeb, 0x5e, + 0x1c, 0x7b, 0x01, 0x6a, 0x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80, 0x55, 0x49, 0xde, 0x34, 0x98, 0x9e, 0xc0, + 0x0a, 0x13, 0xe9, 0x30, 0x6e, 0x6b, 0x88, 0xb0, 0xdc, 0xcd, 0x4b, 0x31, 0x9f, 0x42, 0x65, 0x28, + 0xbd, 0x50, 0x60, 0x73, 0x7d, 0xf1, 0x3c, 0xef, 0x8b, 0xcd, 0x00, 0x80, 0x9e, 0x60, 0x3c, 0xe3, + 0x51, 0x6c, 0x00, 0x38, 0x84, 0xc5, 0xea, 0xd9, 0x69, 0x2f, 0xf3, 0x3d, 0xa5, 0x7c, 0x68, 0xa7, + 0x34, 0xb8, 0x6d, 0x8c, 0x51, 0x8a, 0x73, 0x49, 0x71, 0xbe, 0xb3, 0x24, 0x51, 0xdb, 0xae, 0xf9, + 0xb9, 0x06, 0x55, 0x0e, 0x50, 0x11, 0xa2, 0xd7, 0xd8, 0xc0, 0xb5, 0xb2, 0x76, 0x55, 0x0e, 0xc0, + 0x72, 0xd7, 0x76, 0x4f, 0x58, 0xd3, 0xca, 0xc2, 0xf0, 0xeb, 0x50, 0x1d, 0xe1, 0xb5, 0xb2, 0xd0, + 0x67, 0xa8, 0xd6, 0x0a, 0x67, 0xce, 0xd8, 0xae, 0x79, 0xc2, 0x03, 0x50, 0x51, 0x81, 0x57, 0x61, + 0x8e, 0x25, 0x0d, 0x6e, 0x3d, 0xba, 0x18, 0xda, 0x74, 0x46, 0xb6, 0x69, 0x83, 0x8b, 0x51, 0xa4, + 0x60, 0xb5, 0x13, 0x7e, 0xaf, 0x81, 0x41, 0x4f, 0x9c, 0xf6, 0x03, 0xec, 0xa7, 0xbe, 0xc7, 0xce, + 0xf0, 0x91, 0x87, 0x94, 0x1c, 0x3e, 0x99, 0x89, 0x82, 0xcc, 0x07, 0x00, 0x46, 0x16, 0x15, 0x79, + 0x77, 0xc8, 0x48, 0xfb, 0x11, 0xdf, 0xcd, 0xa6, 0x1c, 0xce, 0x48, 0xa8, 0x6d, 0x97, 0x44, 0x69, + 0xc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0x6f, 0x6b, 0xb7, 0xfe, 0xf1, 0xb6, 0x76, 0xeb, 0xfb, 0x1f, 0x48, 0x43, + 0xe6, 0x37, 0x99, 0xb8, 0x03, 0x36, 0xb6, 0x16, 0x97, 0x61, 0xec, 0xf6, 0x03, 0xd4, 0xb8, 0x14, + 0x5a, 0xe9, 0x04, 0xda, 0xbd, 0x4d, 0x27, 0xab, 0xaf, 0xfe, 0x37, 0x00, 0x00, 0xff, 0xff, 0xfb, + 0xdc, 0x4e, 0x90, 0xeb, 0x19, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -3639,6 +3650,13 @@ func (m *MsgBatchSendToEthClaim) MarshalToSizedBuffer(dAtA []byte) (int, error) _ = i var l int _ = l + if len(m.EvmChainPrefix) > 0 { + i -= len(m.EvmChainPrefix) + copy(dAtA[i:], m.EvmChainPrefix) + i = encodeVarintMsgs(dAtA, i, uint64(len(m.EvmChainPrefix))) + i-- + dAtA[i] = 0x32 + } if len(m.Orchestrator) > 0 { i -= len(m.Orchestrator) copy(dAtA[i:], m.Orchestrator) @@ -4883,6 +4901,10 @@ func (m *MsgBatchSendToEthClaim) Size() (n int) { if l > 0 { n += 1 + l + sovMsgs(uint64(l)) } + l = len(m.EvmChainPrefix) + if l > 0 { + n += 1 + l + sovMsgs(uint64(l)) + } return n } @@ -7210,6 +7232,38 @@ func (m *MsgBatchSendToEthClaim) Unmarshal(dAtA []byte) error { } m.Orchestrator = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field EvmChainPrefix", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMsgs + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMsgs + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMsgs + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.EvmChainPrefix = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipMsgs(dAtA[iNdEx:]) diff --git a/module/x/gravity/types/query.pb.go b/module/x/gravity/types/query.pb.go index 258ad00c6..7533f11fd 100644 --- a/module/x/gravity/types/query.pb.go +++ b/module/x/gravity/types/query.pb.go @@ -1633,14 +1633,17 @@ func (m *QueryDenomToERC20Response) GetCosmosOriginated() bool { return false } -// QueryLastObservedEthBlockRequest defines the request for getting the height of the -// last applied Ethereum Event on the bridge. This is expected to lag the actual -// Ethereum block height significantly due to 1. Ethereum Finality and +// QueryLastObservedEthBlockRequest defines the request for getting the height +// of the last applied Ethereum Event on the bridge. This is expected to lag the +// actual Ethereum block height significantly due to 1. Ethereum Finality and // 2. Consensus mirroring the state on Ethereum type QueryLastObservedEthBlockRequest struct { - // indicates whether to search for store data using the old Gravity v1 key "LastObservedEthereumBlockHeightKey" - // Note that queries before the Mercury upgrade at height 1282013 must set this to true + // indicates whether to search for store data using the old Gravity v1 key + // "LastObservedEthereumBlockHeightKey" Note that queries before the Mercury + // upgrade at height 1282013 must set this to true UseV1Key bool `protobuf:"varint,1,opt,name=use_v1_key,json=useV1Key,proto3" json:"use_v1_key,omitempty"` + // new version query by evm chain prefix + EvmChainPrefix string `protobuf:"bytes,2,opt,name=evm_chain_prefix,json=evmChainPrefix,proto3" json:"evm_chain_prefix,omitempty"` } func (m *QueryLastObservedEthBlockRequest) Reset() { *m = QueryLastObservedEthBlockRequest{} } @@ -1683,9 +1686,16 @@ func (m *QueryLastObservedEthBlockRequest) GetUseV1Key() bool { return false } +func (m *QueryLastObservedEthBlockRequest) GetEvmChainPrefix() string { + if m != nil { + return m.EvmChainPrefix + } + return "" +} + type QueryLastObservedEthBlockResponse struct { - // a response of 0 indicates that no Ethereum events have been observed, and thus - // the bridge is inactive + // a response of 0 indicates that no Ethereum events have been observed, and + // thus the bridge is inactive Block uint64 `protobuf:"varint,1,opt,name=block,proto3" json:"block,omitempty"` } @@ -1729,14 +1739,17 @@ func (m *QueryLastObservedEthBlockResponse) GetBlock() uint64 { return 0 } -// QueryLastObservedEthNonceRequest defines the request for getting the event nonce -// of the last applied Ethereum Event on the bridge. -// Note that this is likely to lag the last executed event a little -// due to 1. Ethereum Finality and 2. Consensus mirroring the Ethereum state +// QueryLastObservedEthNonceRequest defines the request for getting the event +// nonce of the last applied Ethereum Event on the bridge. Note that this is +// likely to lag the last executed event a little due to 1. Ethereum Finality +// and 2. Consensus mirroring the Ethereum state type QueryLastObservedEthNonceRequest struct { - // indicates whether to search for store data using the old Gravity v1 key "LastObservedEventNonceKey" - // Note that queries before the Mercury upgrade at height 1282013 must set this to true + // indicates whether to search for store data using the old Gravity v1 key + // "LastObservedEventNonceKey" Note that queries before the Mercury upgrade at + // height 1282013 must set this to true UseV1Key bool `protobuf:"varint,1,opt,name=use_v1_key,json=useV1Key,proto3" json:"use_v1_key,omitempty"` + // new version query by evm chain prefix + EvmChainPrefix string `protobuf:"bytes,2,opt,name=evm_chain_prefix,json=evmChainPrefix,proto3" json:"evm_chain_prefix,omitempty"` } func (m *QueryLastObservedEthNonceRequest) Reset() { *m = QueryLastObservedEthNonceRequest{} } @@ -1779,9 +1792,16 @@ func (m *QueryLastObservedEthNonceRequest) GetUseV1Key() bool { return false } +func (m *QueryLastObservedEthNonceRequest) GetEvmChainPrefix() string { + if m != nil { + return m.EvmChainPrefix + } + return "" +} + type QueryLastObservedEthNonceResponse struct { - // a response of 0 indicates that no Ethereum events have been observed, and thus - // the bridge is inactive + // a response of 0 indicates that no Ethereum events have been observed, and + // thus the bridge is inactive Nonce uint64 `protobuf:"varint,1,opt,name=nonce,proto3" json:"nonce,omitempty"` } @@ -1845,8 +1865,9 @@ type QueryAttestationsRequest struct { Nonce uint64 `protobuf:"varint,4,opt,name=nonce,proto3" json:"nonce,omitempty"` // height allows filtering attestations by Ethereum claim height. Height uint64 `protobuf:"varint,5,opt,name=height,proto3" json:"height,omitempty"` - // indicates whether to search for store data using the old Gravity v1 key "OracleAttestationKey" - // Note that queries before the Mercury upgrade at height 1282013 must set this to true + // indicates whether to search for store data using the old Gravity v1 key + // "OracleAttestationKey" Note that queries before the Mercury upgrade at + // height 1282013 must set this to true UseV1Key bool `protobuf:"varint,6,opt,name=use_v1_key,json=useV1Key,proto3" json:"use_v1_key,omitempty"` } @@ -2364,7 +2385,8 @@ func (m *QueryPendingSendToEthResponse) GetUnbatchedTransfers() []OutgoingTransf } type QueryPendingIbcAutoForwards struct { - // limit defines the number of pending forwards to return, in order of their SendToCosmos.EventNonce + // limit defines the number of pending forwards to return, in order of their + // SendToCosmos.EventNonce Limit uint64 `protobuf:"varint,1,opt,name=limit,proto3" json:"limit,omitempty"` } @@ -2510,143 +2532,145 @@ func init() { func init() { proto.RegisterFile("gravity/v1/query.proto", fileDescriptor_29a9d4192703013c) } var fileDescriptor_29a9d4192703013c = []byte{ - // 2176 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x9a, 0xcb, 0x6f, 0x1b, 0xc7, - 0x1d, 0xc7, 0xbd, 0x8a, 0x25, 0xcb, 0xbf, 0xd8, 0xb1, 0x3d, 0x92, 0x15, 0x6a, 0x65, 0x51, 0xd2, - 0x3a, 0xb2, 0x2d, 0xc9, 0xd2, 0x8a, 0x54, 0x6d, 0x37, 0x4e, 0x9b, 0x46, 0x74, 0x64, 0xd5, 0x70, - 0x1a, 0xa7, 0x8c, 0x62, 0xa0, 0x8d, 0xdb, 0xc5, 0x92, 0x3b, 0x22, 0x17, 0x26, 0x77, 0x98, 0xdd, - 0x21, 0x6b, 0x22, 0x48, 0x80, 0xb6, 0x40, 0x0b, 0xf4, 0x54, 0xa0, 0x8f, 0x43, 0x4f, 0xed, 0xa9, - 0xbd, 0xb4, 0xc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0xa8, 0x77, 0x18, 0x6a, 0x09, 0x99, 0xc3, 0x51, 0x33, 0x22, 0x43, 0xe5, - 0x7b, 0x5f, 0xbe, 0x28, 0x6a, 0xcf, 0x5f, 0x14, 0xb5, 0xff, 0xbc, 0x28, 0x6a, 0xbf, 0x7c, 0x59, - 0x3c, 0xf5, 0xfc, 0x65, 0xf1, 0xd4, 0xbf, 0x5e, 0x16, 0x4f, 0x7d, 0xff, 0x5b, 0x0d, 0x97, 0x36, - 0xbb, 0xb5, 0x9d, 0x3a, 0x69, 0x9b, 0x87, 0x3c, 0xe8, 0x76, 0xc5, 0x77, 0x9d, 0x06, 0x4e, 0x3f, - 0xb6, 0x89, 0xd3, 0x6d, 0x61, 0xf3, 0x59, 0x94, 0x9b, 0xfd, 0xd4, 0xa3, 0x36, 0xc3, 0x7e, 0x53, - 0xb1, 0xf7, 0xbf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x6a, 0x77, 0xc8, 0x91, 0x43, 0x22, 0x00, 0x00, + // 2204 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x9a, 0xcb, 0x6f, 0x1c, 0x49, + 0x1d, 0xc7, 0xd3, 0xde, 0xd8, 0x71, 0x7e, 0x9b, 0x67, 0xd9, 0xf1, 0x8e, 0xdb, 0xf1, 0xd8, 0xee, + 0xac, 0x13, 0x3f, 0x62, 0xb7, 0x67, 0x4c, 0x12, 0x36, 0x0b, 0x0b, 0x1e, 0xaf, 0x63, 0xa2, 0x2c, + 0xeb, 0x30, 0xeb, 0x8d, 0x04, 0x1b, 0x68, 0xf5, 0x74, 0x97, 0x67, 0x9a, 0xcc, 0x74, 0xcd, 0x76, + 0xd7, 0x0c, 0x1e, 0xad, 0x76, 0x25, 0x40, 0x02, 0x89, 0x13, 0x12, 0x8f, 0x03, 0x27, 0x38, 0xc1, + 0x05, 0x8e, 0x7b, 0xe5, 0xba, 0x02, 0x09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0xfa, 0x14, 0xfd, + 0x45, 0x81, 0xc5, 0x81, 0xa2, 0x05, 0xba, 0x33, 0x28, 0x7f, 0xae, 0x56, 0xa2, 0xde, 0x1d, 0xd7, + 0x4d, 0x50, 0xdf, 0x67, 0xd4, 0x5f, 0x42, 0xe5, 0x34, 0x35, 0xab, 0xb8, 0x0c, 0xda, 0x08, 0x6b, + 0xa1, 0x18, 0x7e, 0xa3, 0xd6, 0x63, 0x1f, 0x1b, 0xf4, 0x27, 0x05, 0xd4, 0x7c, 0x59, 0x03, 0x95, + 0x07, 0x21, 0xc9, 0x75, 0x14, 0x75, 0x77, 0x2c, 0x9f, 0x61, 0xcb, 0xa6, 0x19, 0x38, 0xe8, 0x9f, + 0x88, 0x2f, 0xe3, 0xa7, 0xe8, 0x0f, 0x0a, 0xcc, 0xca, 0xee, 0x64, 0xe8, 0xb6, 0x34, 0x6d, 0xce, + 0xc5, 0x4f, 0xdd, 0x1a, 0xd1, 0x5a, 0xe0, 0xed, 0x32, 0xbc, 0x2d, 0xb4, 0x99, 0xc6, 0x23, 0x9e, + 0x69, 0x35, 0xb1, 0xce, 0xae, 0x7c, 0x6c, 0xc7, 0xc5, 0x50, 0x7d, 0x38, 0x1f, 0xc9, 0x68, 0x68, + 0x39, 0x93, 0x30, 0x25, 0xd6, 0xa9, 0x2b, 0x03, 0x2c, 0x04, 0xc6, 0x0a, 0xc3, 0x58, 0x40, 0xf3, + 0xd2, 0x99, 0x3e, 0x09, 0xf2, 0xfc, 0x52, 0x81, 0xab, 0x19, 0x89, 0x08, 0xad, 0x67, 0x62, 0xe7, + 0xe9, 0x4c, 0xea, 0xc6, 0x28, 0xa6, 0xc3, 0xca, 0x10, 0x5f, 0x79, 0x44, 0x38, 0xd2, 0x53, 0xf4, + 0x1b, 0x05, 0x50, 0x56, 0x38, 0x42, 0xf9, 0xc9, 0x32, 0xfa, 0x93, 0xa4, 0x0c, 0xe5, 0x2b, 0x51, + 0xda, 0x26, 0x23, 0x5b, 0x45, 0x37, 0x06, 0x93, 0xb1, 0xd5, 0x15, 0x94, 0xf1, 0x19, 0x89, 0x26, + 0x84, 0x36, 0xe5, 0x33, 0x22, 0x55, 0xa7, 0xd4, 0xdb, 0xa3, 0x19, 0x0b, 0xbe, 0x6d, 0xc6, 0xb7, + 0x86, 0x6e, 0xca, 0xf9, 0x62, 0xdb, 0x94, 0xdf, 0xa9, 0x82, 0x4f, 0x5e, 0x42, 0xfb, 0x91, 0x7c, + 0xf2, 0x64, 0xca, 0x93, 0xe4, 0x93, 0x27, 0x95, 0x90, 0xf2, 0x3f, 0x79, 0x1c, 0x28, 0xfc, 0xae, + 0x30, 0x90, 0x84, 0x64, 0x23, 0x01, 0x91, 0xe9, 0x48, 0x12, 0x10, 0xa9, 0xf2, 0x93, 0x0f, 0xc2, + 0x2b, 0x41, 0x04, 0xf2, 0x2b, 0x05, 0x2e, 0xc4, 0x45, 0x12, 0xf4, 0x66, 0x26, 0x81, 0x44, 0x75, + 0x51, 0x57, 0x87, 0x58, 0x09, 0x8a, 0x2f, 0x33, 0x8a, 0x32, 0xda, 0xc9, 0x7e, 0x60, 0x53, 0xba, + 0x86, 0xce, 0x24, 0x0f, 0x83, 0x12, 0x83, 0xab, 0x31, 0x01, 0x57, 0x5c, 0x2a, 0x91, 0x70, 0x49, + 0xb4, 0x17, 0x09, 0x97, 0x4c, 0x6f, 0x19, 0x87, 0x8b, 0xe1, 0x04, 0x5c, 0x5c, 0x93, 0xf9, 0xa3, + 0x02, 0x6f, 0x1c, 0x62, 0x2a, 0x53, 0x3e, 0x72, 0x6a, 0x67, 0x8e, 0x18, 0x93, 0x53, 0x3b, 0xf3, + 0xe4, 0x14, 0xed, 0x0e, 0x43, 0xd6, 0xd1, 0x56, 0x1a, 0x99, 0xfd, 0x47, 0xaa, 0xc1, 0x3e, 0x4f, + 0x44, 0x38, 0x1b, 0xc1, 0x15, 0x8a, 0xe9, 0x2d, 0x39, 0xbc, 0x7c, 0x63, 0x0e, 0xe5, 0x4d,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70, 0x2b, 0x2f, 0x77, 0xca, 0x50, 0xd5, 0x47, 0x34, 0x8c, + 0x50, 0xef, 0x31, 0xd4, 0x12, 0xd2, 0x07, 0xa3, 0x66, 0x44, 0x86, 0xca, 0xb7, 0xbf, 0x78, 0x51, + 0x54, 0x9e, 0xbf, 0x28, 0x2a, 0xff, 0x7a, 0x51, 0x54, 0x7e, 0xfe, 0xb2, 0x78, 0xe6, 0xf9, 0xcb, + 0xe2, 0x99, 0x7f, 0xbc, 0x2c, 0x9e, 0xf9, 0xce, 0xd7, 0xea, 0x0e, 0x6d, 0x74, 0x6a, 0xdb, 0x16, + 0x69, 0xe9, 0x87, 0x3c, 0xe8, 0x56, 0xc5, 0x73, 0xec, 0x3a, 0x4e, 0x3f, 0xb6, 0x88, 0xdd, 0x69, + 0x62, 0xfd, 0x34, 0xca, 0xcd, 0x7e, 0x3e, 0x52, 0x9b, 0x62, 0xbf, 0xd3, 0xd8, 0xfd, 0x4f, 0x00, + 0x00, 0x00, 0xff, 0xff, 0x99, 0xe5, 0x56, 0x31, 0x97, 0x22, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -4812,6 +4836,13 @@ func (m *QueryLastObservedEthBlockRequest) MarshalToSizedBuffer(dAtA []byte) (in _ = i var l int _ = l + if len(m.EvmChainPrefix) > 0 { + i -= len(m.EvmChainPrefix) + copy(dAtA[i:], m.EvmChainPrefix) + i = encodeVarintQuery(dAtA, i, uint64(len(m.EvmChainPrefix))) + i-- + dAtA[i] = 0x12 + } if m.UseV1Key { i-- if m.UseV1Key { @@ -4873,6 +4904,13 @@ func (m *QueryLastObservedEthNonceRequest) MarshalToSizedBuffer(dAtA []byte) (in _ = i var l int _ = l + if len(m.EvmChainPrefix) > 0 { + i -= len(m.EvmChainPrefix) + copy(dAtA[i:], m.EvmChainPrefix) + i = encodeVarintQuery(dAtA, i, uint64(len(m.EvmChainPrefix))) + i-- + dAtA[i] = 0x12 + } if m.UseV1Key { i-- if m.UseV1Key { @@ -5853,6 +5891,10 @@ func (m *QueryLastObservedEthBlockRequest) Size() (n int) { if m.UseV1Key { n += 2 } + l = len(m.EvmChainPrefix) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } return n } @@ -5877,6 +5919,10 @@ func (m *QueryLastObservedEthNonceRequest) Size() (n int) { if m.UseV1Key { n += 2 } + l = len(m.EvmChainPrefix) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } return n } @@ -9012,6 +9058,38 @@ func (m *QueryLastObservedEthBlockRequest) Unmarshal(dAtA []byte) error { } } m.UseV1Key = bool(v != 0) + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field EvmChainPrefix", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.EvmChainPrefix = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:]) @@ -9151,6 +9229,38 @@ func (m *QueryLastObservedEthNonceRequest) Unmarshal(dAtA []byte) error { } } m.UseV1Key = bool(v != 0) + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field EvmChainPrefix", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.EvmChainPrefix = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:]) diff --git a/module/x/gravity/types/types_test.go b/module/x/gravity/types/types_test.go index f8a167590..0a60044f7 100644 --- a/module/x/gravity/types/types_test.go +++ b/module/x/gravity/types/types_test.go @@ -199,7 +199,7 @@ func TestValsetSort(t *testing.T) { func TestAppendBytes(t *testing.T) { // Prefix - prefix := EvmAddressByValidatorKey + prefix := EthAddressByValidatorKey // EthAddress ethAddrBytes := []byte("0xAb5801a7D398351b8bE11C439e05C5B3259aeC9B") // Nonce