Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zoneconcierge: permissioned integration #291

Merged

Conversation

SebastianElvis
Copy link
Member

@SebastianElvis SebastianElvis commented Nov 22, 2024

Resolves https://github.com/babylonlabs-io/pm/issues/44

This PR implements the permissioned integration and generic consumer registry, including

  • generic consumer registry compatible with Cosmos/ETH L2 consumers
  • parameter for governance gating consumer addition
  • ensuring IBC channel creation only when the IBC light client is in consumer registry
  • removing the Cosmos consumer registration upon IBC handshake in Babylon
  • removing the Cosmos consumer registration upon IBC handshake in Babylon contract
  • fuzz tests for Cosmos integration
  • e2e tests for Cosmos integration

ADR: https://github.com/babylonlabs-io/pm/pull/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

Base automatically changed from f/consumer-reward-e2e to base/consumer-chain-support November 27, 2024 07:28
@SebastianElvis SebastianElvis marked this pull request as ready for review November 28, 2024 04:16
@SebastianElvis SebastianElvis requested a review from a team as a code owner November 28, 2024 04:16
SebastianElvis added a commit to babylonlabs-io/babylon-contract that referenced this pull request Nov 28, 2024
Accompanying with babylonlabs-io/babylon#291

This PR

- bumps contract against the latest Babylon base branch
- fixes all failed tests due to the bump
- implements the consumer side logic of permissioned integration, mostly
removing auto consumer registration
Copy link
Contributor

@maurolacy maurolacy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Partial review of the build targets / scripts and proto files.

Will review the code next.

.github/workflows/ci.yml Outdated Show resolved Hide resolved
Makefile Outdated Show resolved Hide resolved
Makefile Show resolved Hide resolved
contrib/images/ibcsim-bcd/Dockerfile Outdated Show resolved Hide resolved
proto/babylon/btcstaking/v1/packet.proto Show resolved Hide resolved
proto/babylon/btcstkconsumer/v1/btcstkconsumer.proto Outdated Show resolved Hide resolved
proto/babylon/btcstkconsumer/v1/params.proto Show resolved Hide resolved
proto/babylon/btcstkconsumer/v1/tx.proto Outdated Show resolved Hide resolved
proto/babylon/zoneconcierge/v1/packet.proto Show resolved Hide resolved
proto/babylon/zoneconcierge/v1/packet.proto Show resolved Hide resolved
@SebastianElvis
Copy link
Member Author

SebastianElvis commented Dec 2, 2024

Thanks @maurolacy for the comments! I have revised all of them and answered some questions. Please feel free to take a look again

TODO before merging

Copy link
Contributor

@maurolacy maurolacy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Still have to take a look at tests (and related PR, next), but approving to unblock.

test/e2e/bytecode/babylon_contract.wasm Outdated Show resolved Hide resolved
x/btcstaking/keeper/grpc_query.go Show resolved Hide resolved
x/btcstkconsumer/types/expected_keepers.go Outdated Show resolved Hide resolved
x/btcstkconsumer/types/params.go Show resolved Hide resolved
Makefile Show resolved Hide resolved
.github/workflows/ci.yml Show resolved Hide resolved
Copy link
Contributor

@maurolacy maurolacy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some more comments related to tests / general setup.

test/e2e/btc_staking_integration_e2e_test.go Outdated Show resolved Hide resolved
x/btcstkconsumer/keeper/msg_server.go Show resolved Hide resolved
x/btcstkconsumer/keeper/msg_server_test.go Show resolved Hide resolved
@maurolacy
Copy link
Contributor

E2e tests are failing in my local:

    --- PASS: TestBCDConsumerIntegrationTestSuite/Test1ChainStartup (2.04s)
    --- PASS: TestBCDConsumerIntegrationTestSuite/Test2RegisterAndIntegrateConsumer (129.87s)
    --- PASS: TestBCDConsumerIntegrationTestSuite/Test3CreateConsumerFinalityProvider (13.45s)
    --- PASS: TestBCDConsumerIntegrationTestSuite/Test4RestakeDelegationToMultipleFPs (123.90s)
    --- FAIL: TestBCDConsumerIntegrationTestSuite/Test5ActivateDelegation (45.31s)
    --- FAIL: TestBCDConsumerIntegrationTestSuite/Test6ConsumerFPRewardsGeneration (60.96s)
    --- PASS: TestBCDConsumerIntegrationTestSuite/Test7BabylonFPCascadedSlashing (21.50s)
    --- FAIL: TestBCDConsumerIntegrationTestSuite/Test8ConsumerFPCascadedSlashing (378.03s)

@maurolacy
Copy link
Contributor

maurolacy commented Dec 2, 2024

Retrying the tests with rebuilt docker images. The IBC transfer back timeout should be extended still by five seconds or so.

@SebastianElvis SebastianElvis merged commit 4898d8d into base/consumer-chain-support Dec 3, 2024
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants