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

feat: epoching to replace staking msg server #457

Merged
merged 8 commits into from
Feb 3, 2025

Conversation

RafilxTenfen and others added 3 commits January 23, 2025 10:50
Co-authored-by: Runchao Han <[email protected]>
Co-authored-by: Mauro Lacy <[email protected]>
Co-authored-by: Mauro Lacy <[email protected]>
Co-authored-by: Gurjot Singh <[email protected]>
Co-authored-by: hiepmai-babylonchain <[email protected]>
Co-authored-by: lesterli <[email protected]>
Co-authored-by: Cirrus Gai <[email protected]>
Co-authored-by: Runchao Han <[email protected]>
Co-authored-by: Mauro Lacy <[email protected]>
Co-authored-by: Filippos Malandrakis <[email protected]>
- Copy partial implementation from sdk
[gentx](https://github.com/cosmos/cosmos-sdk/blob/eba0b9e9c2b5da19ccb8b4b189c1f0747830a8fa/x/genutil/client/cli/gentx.go#L31)
but modified to generate `MsgWrappedCreateValidator` and create/add BLS
key if needed
- Removed commands: 
  - `babylond gen-helpers create-bls`
  - `babylond gen-helpers add-bls`
- Modified `x/checkpointing` msg server to call the `x/staking` msg
server on receiving `MsgWrappedCreateValidator` if the context block
height is zero (genutil) calls the handler

It partially helps to remove the `x/staking` msg server from the router
Co-authored-by: Runchao Han <[email protected]>
Co-authored-by: Mauro Lacy <[email protected]>
Co-authored-by: Mauro Lacy <[email protected]>
Co-authored-by: Gurjot Singh <[email protected]>
Co-authored-by: hiepmai-babylonchain <[email protected]>
Co-authored-by: lesterli <[email protected]>
Co-authored-by: Cirrus Gai <[email protected]>
Co-authored-by: Runchao Han <[email protected]>
Co-authored-by: Mauro Lacy <[email protected]>
Co-authored-by: Filippos Malandrakis <[email protected]>
Co-authored-by: Lazar <[email protected]>
Co-authored-by: KonradStaniec <[email protected]>
@RafilxTenfen RafilxTenfen self-assigned this Jan 28, 2025
Comment on lines 197 to 230
if: false
needs: [e2e-docker-build-babylon, e2e-docker-build-e2e-init-chain]
runs-on: ubuntu-22.04
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Download babylon artifact
uses: actions/download-artifact@v4
with:
name: babylond-${{ github.sha }}
path: /tmp
- name: Download init-chain artifact
uses: actions/download-artifact@v4
with:
name: init-chain
path: /tmp
- name: Docker load babylond
run: |
docker load < /tmp/docker-babylond.tar.gz

- name: Docker load init chain
run: |
docker load < /tmp/docker-init-chain.tar.gz

- name: Cache Go
uses: actions/setup-go@v5
with:
go-version: 1.23
- name: Run e2e TestSoftwareUpgradeV1TestnetTestSuite
run: |
sudo make test-e2e-cache-upgrade-v1
- name: Dump docker logs on failure
if: failure()
uses: jwalton/gh-docker-logs@v2
uses: jwalton/gh-docker-logs@v2

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions Job or Workflow does not set permissions
Copy link
Member

Choose a reason for hiding this comment

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

Hmm how to get rid of these?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

not sure why it pop it up on this PR

sudo make test-e2e-cache-upgrade-v1
- name: Dump docker logs on failure
if: failure()
uses: jwalton/gh-docker-logs@v2
uses: jwalton/gh-docker-logs@v2

Check warning

Code scanning / CodeQL

Unpinned tag for a non-immutable Action in workflow Medium

Unpinned 3rd party Action 'ci' step
Uses Step
uses 'jwalton/gh-docker-logs' with ref 'v2', not a pinned commit hash
@RafilxTenfen RafilxTenfen added consensus breaking change modifies `appHash` of the application backport release/v1.x labels Jan 28, 2025
@KonradStaniec KonradStaniec added the api breaking breaks grpc api in non-compatible way label Jan 31, 2025
RafilxTenfen and others added 4 commits January 31, 2025 12:16
- Removed `x/staking` msgs from router
- Add msg server from `x/staking` to epoch keeper to call the necessary
functions directly instead of from the router
- Add `MsgWrappedEditValidator` and `MsgWrappedStakingUpdateParams` to
epoching txs so all the msgs from staking can be called even with the
router removed
- Removed `x/staking` tx subcommand

---------

Co-authored-by: Runchao Han <[email protected]>
Co-authored-by: Mauro Lacy <[email protected]>
Co-authored-by: Mauro Lacy <[email protected]>
Co-authored-by: Gurjot Singh <[email protected]>
Co-authored-by: hiepmai-babylonchain <[email protected]>
Co-authored-by: lesterli <[email protected]>
Co-authored-by: Cirrus Gai <[email protected]>
Co-authored-by: Runchao Han <[email protected]>
Co-authored-by: Mauro Lacy <[email protected]>
Co-authored-by: Filippos Malandrakis <[email protected]>
Co-authored-by: Lazar <[email protected]>
Co-authored-by: KonradStaniec <[email protected]>
Co-authored-by: Runchao Han <[email protected]>
Co-authored-by: Mauro Lacy <[email protected]>
Co-authored-by: Mauro Lacy <[email protected]>
Co-authored-by: Gurjot Singh <[email protected]>
Co-authored-by: hiepmai-babylonchain <[email protected]>
Co-authored-by: lesterli <[email protected]>
Co-authored-by: Cirrus Gai <[email protected]>
Co-authored-by: Runchao Han <[email protected]>
Co-authored-by: Mauro Lacy <[email protected]>
Co-authored-by: Filippos Malandrakis <[email protected]>
Co-authored-by: Lazar <[email protected]>
Co-authored-by: KonradStaniec <[email protected]>
@RafilxTenfen RafilxTenfen marked this pull request as ready for review January 31, 2025 16:02
Copy link
Collaborator

@KonradStaniec KonradStaniec left a comment

Choose a reason for hiding this comment

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

LGTM! great job driving it forward ! Lets wait also for @SebastianElvis approval on this one

@RafilxTenfen RafilxTenfen merged commit 68a6d44 into main Feb 3, 2025
24 checks passed
@RafilxTenfen RafilxTenfen deleted the feat/rmv-stk-msg-server branch February 3, 2025 12:42
RafilxTenfen added a commit that referenced this pull request Feb 4, 2025
RafilxTenfen added a commit that referenced this pull request Feb 4, 2025
- Backports #457 feature branch to v1

---------

Co-authored-by: Runchao Han <[email protected]>
Co-authored-by: Mauro Lacy <[email protected]>
Co-authored-by: Mauro Lacy <[email protected]>
Co-authored-by: Gurjot Singh <[email protected]>
Co-authored-by: hiepmai-babylonchain <[email protected]>
Co-authored-by: lesterli <[email protected]>
Co-authored-by: Cirrus Gai <[email protected]>
Co-authored-by: Runchao Han <[email protected]>
Co-authored-by: Mauro Lacy <[email protected]>
Co-authored-by: Filippos Malandrakis <[email protected]>
Co-authored-by: Lazar <[email protected]>
Co-authored-by: KonradStaniec <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api breaking breaks grpc api in non-compatible way backport release/v1.x consensus breaking change modifies `appHash` of the application
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants