-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
zoneconcierge: permissioned integration (#291)
Resolves babylonlabs-io/pm#44 This PR implements the permissioned integration and generic consumer registry, including - [x] generic consumer registry compatible with Cosmos/ETH L2 consumers - [x] parameter for governance gating consumer addition - [x] ensuring IBC channel creation only when the IBC light client is in consumer registry - [x] removing the Cosmos consumer registration upon IBC handshake in Babylon - [x] removing the Cosmos consumer registration upon IBC handshake in Babylon contract - [x] fuzz tests for Cosmos integration - [x] e2e tests for Cosmos integration ADR: babylonlabs-io/pm#121 Accompanying PR in the contract side: babylonlabs-io/babylon-contract#87 There are two TODOs that will be addressed in subsequent PRs: - msg for removing registered consumer - fuzz/e2e test for ETH L2 integrations --------- Co-authored-by: Mauro Lacy <[email protected]>
- Loading branch information
1 parent
ad3e100
commit 4898d8d
Showing
55 changed files
with
1,677 additions
and
959 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,47 @@ | ||
syntax = "proto3"; | ||
package babylon.btcstkconsumer.v1; | ||
|
||
import "gogoproto/gogo.proto"; | ||
import "cosmos_proto/cosmos.proto"; | ||
|
||
option go_package = "github.com/babylonlabs-io/babylon/x/btcstkconsumer/types"; | ||
|
||
// ConsumerType defines the type of consumer chain | ||
enum ConsumerType { | ||
// COSMOS represents a Cosmos SDK chain consumer | ||
COSMOS = 0; | ||
// ETH_L2 represents an Ethereum L2 chain consumer | ||
ETH_L2 = 1; | ||
} | ||
|
||
// ConsumerRegister is the registration information of a consumer | ||
message ConsumerRegister { | ||
// consumer_id is the ID of the consumer | ||
// - for Cosmos SDK chains, the consumer ID will be the IBC client ID | ||
// - for ETH L2 chains, the consumer ID will be the chain ID of the ETH L2 | ||
// chain | ||
string consumer_id = 1; | ||
// consumer_name is the name of the consumer | ||
string consumer_name = 2; | ||
// consumer_description is a description for the consumer (can be empty) | ||
string consumer_description = 3; | ||
} | ||
// consumer_metadata is necessary metadata of the consumer, and the data | ||
// depends on the type of integration | ||
oneof consumer_metadata { | ||
CosmosConsumerMetadata cosmos_consumer_metadata = 4; | ||
ETHL2ConsumerMetadata eth_l2_consumer_metadata = 5; | ||
}; | ||
} | ||
|
||
// CosmosConsumerMetadata is the metadata for the Cosmos integration | ||
message CosmosConsumerMetadata { | ||
// channel_id defines the IBC channel ID for the consumer chain | ||
string channel_id = 1; | ||
} | ||
|
||
// ETHL2ConsumerMetadata is the metadata for the ETH L2 integration | ||
message ETHL2ConsumerMetadata { | ||
// finality_contract_address is the address of the finality contract for | ||
// the ETH L2 integration | ||
string finality_contract_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.