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

Sync from main to base/consumer-chain-support #303

Open
wants to merge 61 commits into
base: base/consumer-chain-support
Choose a base branch
from

Conversation

github-actions[bot]
Copy link

This PR synchronizes changes from main to base/consumer-chain-support.

huynaism and others added 30 commits November 12, 2024 17:46
Root cause of
babylonlabs-io/finality-provider#121. If
response is nil due to error, will cause panic
Closes #263. In particular,
- ensure `checkpointFinalizationTimeout` can never be changed in the
update params handler of the btccheckpoint module
- ensure `minUnbondingTime` can not be set to a value less than or equal
to `checkpointFinalizationTimeout` in the update params handler of the
btcstaking module
- allows `unbondingTime` of a delegation to be set to a value equals to
`minUnbondingTime`
This PR introduces the `ResumeFinalityProposal` and implements the
handler, which is part of
[ADR-32](babylonlabs-io/pm#95). This part is
quite independent and the algorithm of choosing finality providers to
jail can be implemented in the future
(docker)resolve Dockerfile issue & fix CVEs
The bug is caused due to setting `params.MinStakingTime` to the
btcstaking module's keeper method `VerifyInclusionProofAndGetHeight`
other than `params.MinUnbondingTime`. In the fix, we remove
`minUnbondingTime` from the parameter list of
`VerifyInclusionProofAndGetHeight` as it should retrieve the parameter
within the method.

This PR also added comprehensive tests for
`VerifyInclusionProofAndGetHeight`
RafilxTenfen and others added 30 commits November 28, 2024 08:23
- Enforces that unbonding tx always have version `2`
Adds the ability to specify custom address to separate operational and
rewards address

[References ADR-036](babylonlabs-io/pm#133)
- Changes `min_unbonding_time_blocks` parameter to exact
`unbonding_time` to be fully in line with phase-1 unbonding transactions
- EOI created delegations parameter version should be the some one for
given block range
With recent changes:
- enforcing that `min_unbonding_time` is always larger than
`checkpoint_finalization_timeout`
- changing `min_unbonding_time` to exact `unbonding_time`

`GetStatus` can now rely on `UnbondingTime` in delegation instead of
`checkpoint_finalization_timeout`
Closes #259. Using gauge is not easy to fix the issue as we don't know
the number of fps being jailed. Therefore, this PR fixed the issue by
adding a separate counter for unjailed fps.
- fixes genesis validation
- Fixes config linter config
- enables more linters from golang ci lint
- fixes some low hanging fruits
Adds initial scaffold for tests which enable full execution of the block
by comet-bft utilities:
- `BlockExecutor`

Those are test can be used in various scenarios:
- e2e application test asserting that after certain ordered operations,
we reached expected state
- deterministic execution tests i.e execute some random operations and
replay them and check that app hash matches
- early block execution tests (if we introduce other backends than
memdb)
- Helps to convert keys from pub key 

```shell
babylond debug pubkey-raw "A2h06lj/GAPW1RvJE3HU9yetMGCR9K7a+tcwwTYT8t7z"
Parsed key as secp256k1
Address: 3565AEBC1D0CF089A4C2B04500EFE5007701604E
JSON (base64): {"type":"tendermint/PubKeySecp256k1","value":"A2h06lj/GAPW1RvJE3HU9yetMGCR9K7a+tcwwTYT8t7z"}
Bech32 Acc: bbnpub1addwnpepqd58f6jcluvq84k4r0y3xuw57un66vrqj862akh66ucvzdsn7t00x5n57a8
Bech32 Validator Operator: bbnvaloperpub1addwnpepqd58f6jcluvq84k4r0y3xuw57un66vrqj862akh66ucvzdsn7t00x4p4spq
Bech32 Validator Consensus: 
BIP340 Hex: 036874ea58ff1803d6d51bc91371d4f727ad306091f4aedafad730c13613f2def3
```
Pr changes way how babylon choses parameters for pre-approval flow

- parameters will be chosen by BTC LC tip
- to avoid attacks in which somebody will first send tx to BTC and then
report it as EOI, additional validation during activation is added to
check that staking transaction is included after the BTC LC tip during
delegation creation.
Add determinism test for whole staking activation flow
pending/verified/active

Next steps:
- finalizing epochs
- finality provider voting and randomness registration
The voting power table is a map which causes random order of processing
jailing events. If more than one fps jailed at one block,
non-determinism could happen. The PR fixed this by introducing ordered
voting power table which retains the order from interating the
`votingPowerBbnBlockHeightStore`
- Add fuzzing test case for jailing being deterministc
- Move `PrivateSigner` to specific package
- Created vars for constant used Mod accounts in appparams
`EndBlocker` -> `BeginBlocker` in BeginBlocker section
There has been an issue relative to
babylonlabs-io/finality-provider#231 and this pr
adds `MsgSetWithdrawAddress` to the necessary codec file plus adds it to
`types/msg.go`
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.

9 participants