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

chore: pull main to feat 457 #465

Merged
merged 103 commits into from
Jan 31, 2025

Conversation

RafilxTenfen
Copy link
Contributor

No description provided.

SebastianElvis and others added 30 commits July 4, 2024 15:42
* Add chain register struct
* Add chain registry
* Add chain registry test
* Add chain registry queries
* Add chain registry queries tests
* Add register chain msg
* Add register chain msg routing / impl
* Update proto/babylon/zoneconcierge/v1/tx.proto
* Flatten chain register proto
* Remove authority from register chain msg
* Add chain not registered check
* Add chain already registered check
* Update / fix comment
* Add registry related queries to rpc server
* Fix indentation
* Fix: Add signer field to register chain msg
* Fix: Own / unique query param / response for list registry
* Move btcstkconsumer proto files under v1/ for consistency
* Move register chain protos from zoneconcierge to btcstkconsumer
* Refactor chain registry into btcstkconsumer
* Fix: proto / code lints
* Pass chain register pointer

Co-authored-by: Runchao Han <[email protected]>
* Register zoneconcierge msg codecs
* Register btcstkconsumer msg codecs
* Add chain id to finality provider
* Add finality provider registry
* Update fps per chain id registry
* Remove commented line
* FP registers only non-canonical chains
* Add FP registry test
* Add registered chain check
* Add registration check to fp registry test
* Remove optional from chain id
* Add own CZ chains FPs store
* Store CZ chains FPs in their own store
* Adjust names / tests
* Refactor fp consumer registry
* Adapt tests
* Rename for clarity
* Add FP CZ chains registry queries
* Add FP consumer query tests
* Adapt test
* Add chain id to fp query response
* Remove useless slash condition check
* Improve error msg
* Move type builder to types package
* Add chains per FP BTC PubKey store
* Ensure CZ chains FP does not already exist
* Fix: Return err explicitly instead of nil
* Fix typos
* Add register chain cli tx
* Add chain id to btcstaking create-finality-provider
* Add get finality provider by chain queries
* Add registered chains cli queries
* Add FZ FP chain id query type
* Add get CZ FP chain getter / query
* Add grpc query. Adjust grpc query paths
* Add CZ FP registered chain cli query cmd
* Fix: Add tx flags for register chain cmd
* Turn consumer chain id into a flag instead of a param
* Fix params module import
* Add hook to query consumer fps through btcstaking
* Rename consumer keys for clarity
* Rename btc staking consumer methods
* Rename consumer delegation private methods
* Move consumer delegations to btcstaking
* Refactor BTC delegations into one store
* Simplify logic
* Improve comments
* Add needed (for babylon as Consumer) staking capability
* Upgrade contracts from latest babylon-contract
* Support Mac arm64 arch in passing for copy local wasm
* Fix: FP fields protobuf sequence numbers
* Update contracts to latest
* Fix: make proto-gen
* Trim unused fields from new finality provider IBC msg
* Update protobuf gens
* Update code refs
SebastianElvis and others added 22 commits December 3, 2024 11:07
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]>
Part of babylonlabs-io/babylon-sdk#64

This PR removes all e2e tests related to BTC staking integration. These
tests will then be put in babylon-sdk repository
([PR](babylonlabs-io/babylon-sdk#68))
## Summary

This PR removes unused dependencies in `.proto` files, addressing the
protobuf generation issue outlined in
[babylon-contract/issues/101](babylonlabs-io/babylon-contract#101).


## Test Plan

```
make proto-lint
```
This PR fixes the comments to the base branch at
#402, including

- bumping relayer/grpc version in go.mod
- fixing proto
- using iterator and handler function to avoid saving all BTC
delegations in memory upon slashing
- removing unused code
- removing duplicated checks introduced due to rebase
- Migrates the minimal amount of code needed from the
[relayer](https://github.com/cosmos/relayer) repo
- Removes dependency for `cosmos/relayer`
- Removes dependency for `strangelove-ventures/cometbft-client`

~Todo:~
- ~As this is modified code from the
[relayer](https://github.com/cosmos/relayer), what license if any should
we include in the header of those files? I've also modified them
(deleted a bunch of stuff, and added more code quality improvements)~
- ~Is feegrant.go needed, feels like it can be removed and other parts
related to it~
- ~Future PRs can remove references to strangelove cometbft client, tho
we do have to satisfy the `CometRPC interface`, `ABCIClient interface`
etc. (not sure if it's worth the extra effort)~
- ~Decide on the name of the relayer package, the clients would
currently use `relayerclient.Whatever`~
 
 [Closes](babylonlabs-io/pm#149)
#441)

Fixes: #407

Reason of failure: Some times delegation was created below not-deep
enough below the tip to be sucessful accepted
All of our modules in proto have `/proto/babylon/<module-name>/v1/files`
but incentives does not have `v1` it is defined as
`/proto/babylon/incentive/files`

Future investigation to try to add `v1` to the incentive proto will be
done at #442
Fixes: babylonlabs-io/pm#159

We will reject BTC forks, if the first header is already known. 

This is consensus breaking change, but on our testnet it should be
non-breaking as our vigilante reporter always reports only new btc
headers prefix/
@RafilxTenfen RafilxTenfen self-assigned this Jan 31, 2025
@RafilxTenfen RafilxTenfen changed the title chore: backport main to feat 457 chore: pull main to feat 457 Jan 31, 2025
@RafilxTenfen RafilxTenfen merged commit e789f28 into feat/rmv-stk-msg-server Jan 31, 2025
22 of 23 checks passed
@RafilxTenfen RafilxTenfen deleted the rafilx/backport-main-to-feat-457 branch January 31, 2025 15:55
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.

10 participants