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
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
4e126df
deploy new pipeline
huynaism Nov 12, 2024
acfd7b8
add permission
huynaism Nov 12, 2024
85cccda
try hadolint_nofail
huynaism Nov 12, 2024
6f57b90
ok disable failing
huynaism Nov 12, 2024
82948de
hadolint #1836,#1840
huynaism Nov 12, 2024
64e5f64
hadolint #1834
huynaism Nov 12, 2024
c068865
hadolinit #1833, cleanup
huynaism Nov 12, 2024
5d4e119
hadolint #1837
huynaism Nov 12, 2024
12dbe32
hadolint # #1838
huynaism Nov 12, 2024
e946ab5
hadolint #1833
huynaism Nov 12, 2024
16d3c6b
hadolint 1833
huynaism Nov 12, 2024
9a93992
wrong version
huynaism Nov 12, 2024
d0fcba7
fix shell error
huynaism Nov 12, 2024
a6dc380
#1838 again
huynaism Nov 12, 2024
ca402cb
again
huynaism Nov 12, 2024
d4da954
cant use progress bar on alpine base
huynaism Nov 13, 2024
11c7332
Backport v0.16.1 changelog update (#276)
KonradStaniec Nov 18, 2024
48978b0
fix(client): Panic due to possible nil params response (#277)
gitferry Nov 19, 2024
4b17a1e
chore: Allow unbonding time to be min unbonding value (#278)
gitferry Nov 20, 2024
b627a67
remove bloat
huynaism Nov 20, 2024
b2754d8
add changelog
huynaism Nov 20, 2024
d204d98
feat(adr-032): Add ResumeFinalityProposal and handler (#242)
gitferry Nov 20, 2024
d4dceb1
chore(gomod): update cosmos math (#284)
Lazar955 Nov 20, 2024
f138195
Bump comet bft version (#285)
KonradStaniec Nov 21, 2024
007fd20
Merge branch 'main' into devops/add-docker-sec
huynaism Nov 21, 2024
4c70a72
Merge pull request #264 from babylonlabs-io/devops/add-docker-sec
huynaism Nov 21, 2024
530bd85
Backport v17 changelog (#288)
KonradStaniec Nov 21, 2024
07dc0d1
hotfix: Invalid minUnbondingTime for verifying inclusion proof (#289)
gitferry Nov 22, 2024
2aa26d5
Backport v0.17.1 changelog (#293)
gitferry Nov 22, 2024
9c4d7d6
chore: gh sync workflow from main to base/consumer branch (#299)
gusin13 Nov 25, 2024
457909d
ADR-034: Add highest voted height to finality provider (#304)
gitferry Nov 28, 2024
1809466
chore: add more logs to VerifyInclusionProofAndGetHeight (#305)
RafilxTenfen Nov 28, 2024
6f77345
Enforce that unbonding tx always has version 2 (#311)
KonradStaniec Dec 2, 2024
92b8f3a
feat(ADR-036): custom withdrawal address (#309)
Lazar955 Dec 3, 2024
4fb3741
adr-37 parameters for btc light client ranges (#310)
KonradStaniec Dec 3, 2024
8b35d80
backport v0.17.2 changelog (#315)
KonradStaniec Dec 3, 2024
925fca6
require exact amount of blocks for unbonding timelock (#314)
KonradStaniec Dec 3, 2024
99d1037
Enforce correct parameters version when verifing EOI (#317)
KonradStaniec Dec 4, 2024
aa32cd4
fix getStatus call on BTCDelegation (#318)
KonradStaniec Dec 4, 2024
bee9f30
fix build (#319)
KonradStaniec Dec 4, 2024
08903f1
backport changelog (#323)
KonradStaniec Dec 5, 2024
213b1ae
fix: Decrementing jailed fp counter (#324)
gitferry Dec 5, 2024
43b3008
docs: btcstaking: Update btcstaking module docs to include EOI (#326)
vitsalis Dec 6, 2024
ff75124
fix genesis state validation (#328)
KonradStaniec Dec 9, 2024
cfc59bc
Konradstaniec/fix linter config (#329)
KonradStaniec Dec 9, 2024
e819a3b
backport/changelog updae (#332)
KonradStaniec Dec 9, 2024
b8a2d25
enable more linters from golanci-lint (#333)
KonradStaniec Dec 9, 2024
bf31f69
chore: add testnet upgrade data (#316)
RafilxTenfen Dec 9, 2024
ef667f7
Add scaffold to test replaying the block of the app (#337)
KonradStaniec Dec 10, 2024
5ae51dc
chore: add print bip 340 to debug pubkey-raw (#338)
RafilxTenfen Dec 11, 2024
ee74454
Konradstaniec/add sending tx to replay tests (#340)
KonradStaniec Dec 12, 2024
93954e8
select params for pre approval flow based on BTC LC tip (#341)
KonradStaniec Dec 12, 2024
41a9aed
add btc staking relevant replay test (#343)
KonradStaniec Dec 13, 2024
ccc00b7
fix: Non-determinism while jailing (#342)
gitferry Dec 13, 2024
a56b247
[backport] Update changelog (#347)
gitferry Dec 13, 2024
3cd871c
andomnes commit replay test (#344)
KonradStaniec Dec 16, 2024
b3da9cb
chore: refactory (#348)
RafilxTenfen Dec 16, 2024
af3fc80
`EndBlocker` -> `BeginBlocker` in BeginBlocker section
OrfeasLitos Dec 16, 2024
cd0bbcd
Konradstaniec/enable more lin (#350)
KonradStaniec Dec 16, 2024
d0f9092
fix: withdrawal cli for rewards (#352)
samricotta Dec 17, 2024
f1ae78e
docs: Add stake transition documentation (#351)
vitsalis Dec 17, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,16 @@ jobs:
run-lint: true

docker_pipeline:
uses: babylonlabs-io/.github/.github/workflows/reusable_docker_pipeline.yml@v0.7.0
uses: babylonlabs-io/.github/.github/workflows/reusable_docker_pipeline.yml@v0.10.2
needs: ["lint_test"]
secrets: inherit
permissions:
# required for all workflows
security-events: write
# required to fetch internal or private CodeQL packs
packages: read
with:
publish: true
dockerfile: ./contrib/images/babylond/Dockerfile
repoName: babylond
docker_scan: true
17 changes: 17 additions & 0 deletions .github/workflows/sync_pr_main_to_base.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Create Sync PR from main to base/consumer-chain-support

on:
schedule:
- cron: "0 0 * * *"

permissions:
pull-requests: write

jobs:
call_sync_branch:
uses: babylonlabs-io/.github/.github/workflows/[email protected]
with:
base_branch: "main"
target_branch: "base/consumer-chain-support"
reviewers: "SebastianElvis,maurolacy,gusin13"
secrets: inherit
90 changes: 32 additions & 58 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,103 +1,77 @@
run:
timeout: 5m
# TODO: enable all linters
linters:
disable-all: true
enable:
- asasalint
- asciicheck
- bidichk
- bodyclose
- containedctx
- contextcheck
- cyclop
# - bodyclose
# - containedctx
# - contextcheck
- decorder
- depguard
- dogsled
- dupl
# - dogsled
- durationcheck
- errcheck
- errchkjson
- errname
- errorlint
- execinquery
- exhaustive
- exhaustivestruct
- exhaustruct
- exportloopref
# - errorlint
# - exhaustive
- forbidigo
- forcetypeassert
- funlen
- gci
- gochecknoglobals
- gochecknoinits
- gocognit
# - forcetypeassert
- goconst
- gocritic
- gocyclo
- godot
- godox
- goerr113
- gofumpt
# - gocyclo
- goheader
- golint
- gomnd
- gomoddirectives
- gomodguard
- goprintffuncname
- gosec
- gosimple
- govet
- grouper
- ifshort
- importas
- ineffassign
- interfacebloat
- interfacer
- ireturn
- lll
- loggercheck
- maintidx
# - maintidx
- makezero
- maligned
- misspell
- nakedret
- nestif
- nilerr
- nilnil
- nlreturn
# - nlreturn
- noctx
- nolintlint
- nonamedreturns
- nosnakecase
- nosprintfhostport
- paralleltest
- prealloc
- predeclared
- promlinter
# - paralleltest
- reassign
- revive
# - revive
- rowserrcheck
- scopelint
- sqlclosecheck
- staticcheck
- structcheck
- stylecheck
- tagliatelle
# - stylecheck
- tenv
- testableexamples
- testpackage
- thelper
- tparallel
# - tparallel
- typecheck
- unconvert
- unparam
- unused
- usestdlibvars
- varcheck
- varnamelen
- unused
- wastedassign
- whitespace
- wrapcheck
- wsl
# - wrapcheck

issues:
max-same-issues: 0
# Default: https://golangci-lint.run/usage/false-positives/#default-exclusions
exclude-dirs:
- e2etest
exclude-rules:
# Exclude some linters from running on tests files.
- path: _test\.go
linters:
- gocyclo
- errcheck
- dupl
- gosec
- path-except: _test\.go
linters:
- forbidigo
87 changes: 87 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,19 +37,106 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)

## Unreleased

### Improvements

- [#338](https://github.com/babylonlabs-io/babylon/pull/338) Add print BIP-340 in
`debug pubkey-raw` subcommand
- [#316](https://github.com/babylonlabs-io/babylon/pull/316) Add testnet upgrade data
- [#326](https://github.com/babylonlabs-io/babylon/pull/326) docs: btcstaking:
Update btcstaking module docs to include EOI
- [#348](https://github.com/babylonlabs-io/babylon/pull/348) refactory `PrivateSigner`
and module account vars in appparams
- [#351](https://github.com/babylonlabs-io/babylon/pull/351) docs: Add state
transition docs.

### Bug fixes

- [#324](https://github.com/babylonlabs-io/babylon/pull/324) Fix decrementing
jailed fp counter
- [#352](https://github.com/babylonlabs-io/babylon/pull/352) Fix: withdrawal cli
for rewards

### State Machine Breaking

- [#341](https://github.com/babylonlabs-io/babylon/pull/341) Select parameters
for pre-approval flow based on BTC LC tip height

## v0.18.2

### Bug fixes

- [#342](https://github.com/babylonlabs-io/babylon/pull/342) Fix non-determinism while jailing

## v0.18.1

- [#328](https://github.com/babylonlabs-io/babylon/pull/328) Fix btc activation height validation in genesis

## v0.18.0

### Improvements

- [#309](https://github.com/babylonlabs-io/babylon/pull/309) feat(adr-036): custom withdrawal address
- [#305](https://github.com/babylonlabs-io/babylon/pull/305) chore: add more error logs to `VerifyInclusionProofAndGetHeight`
- [#304](https://github.com/babylonlabs-io/babylon/pull/304) Add highest voted height to finality provider
- [#314](https://github.com/babylonlabs-io/babylon/pull/314) Require exact unbonding time in delegation
- [#317](https://github.com/babylonlabs-io/babylon/pull/317) Enforce that EOI
delegations using correct parameters version

### State Machine Breaking

- [#310](https://github.com/babylonlabs-io/babylon/pull/310) implement adr-37 -
making params valid for btc light client ranges

### Bug fixes

- [#318](https://github.com/babylonlabs-io/babylon/pull/318) Fix BTC delegation status check
to relay on UnbondingTime in delegation

## v0.17.2

### Improvements
- [#311](https://github.com/babylonlabs-io/babylon/pull/311) Enforce version 2
for unbonding transactions

## v0.17.1

### Bug fixes

- [#289](https://github.com/babylonlabs-io/babylon/pull/289) hotfix: Invalid minUnbondingTime for verifying inclusion proof

## v0.17.0

### State Breaking

- [278](https://github.com/babylonlabs-io/babylon/pull/278) Allow unbonding time to be min unbonding value

### Improvements

- [#264](https://github.com/babylonlabs-io/babylon/pull/264) bump docker workflow
version to 0.10.2, fix some Dockerfile issues
- [#284](https://github.com/babylonlabs-io/babylon/pull/284) Update cosmos sdk math dependency
- [#285](https://github.com/babylonlabs-io/babylon/pull/285) Update cometbft dependency
version

### Bug fixes

- [#270](https://github.com/babylonlabs-io/babylon/pull/270) Validate there is only
one finality provider key in the staking request
- [#270](https://github.com/babylonlabs-io/babylon/pull/277) Panic due to possible
nil params response

## v0.16.1

### API Breaking

- [#273](https://github.com/babylonlabs-io/babylon/pull/273) Add full staking tx to BTC delegation creation event

## v0.16.0

### Improvements

* [#242](https://github.com/babylonlabs-io/babylon/pull/242) Add
ResumeFinalityProposal and handler
* [#258](https://github.com/babylonlabs-io/babylon/pull/258) fix go releaser
and trigger by github action
* [#252](https://github.com/babylonlabs-io/babylon/pull/252) Fix
Expand Down
1 change: 0 additions & 1 deletion app/ante/ante_btc_validation_decorator.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ func NewBtcValidationDecorator(
}

func (bvd BtcValidationDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate bool, next sdk.AnteHandler) (newCtx sdk.Context, err error) {

// only do this validation when handling mempool addition. During DeliverTx they
// should be performed by btclightclient and btccheckpoint modules
if ctx.IsCheckTx() || ctx.IsReCheckTx() {
Expand Down
15 changes: 8 additions & 7 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ import (
"github.com/CosmWasm/wasmd/x/wasm"
wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper"
wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types"
"github.com/babylonlabs-io/babylon/x/mint"
minttypes "github.com/babylonlabs-io/babylon/x/mint/types"
abci "github.com/cometbft/cometbft/abci/types"
cmtos "github.com/cometbft/cometbft/libs/os"
cmtproto "github.com/cometbft/cometbft/proto/tendermint/types"
Expand Down Expand Up @@ -91,13 +89,16 @@ import (
ibctm "github.com/cosmos/ibc-go/v8/modules/light-clients/07-tendermint"
"github.com/spf13/cast"

"github.com/babylonlabs-io/babylon/app/ante"
"github.com/babylonlabs-io/babylon/app/upgrades"
bbn "github.com/babylonlabs-io/babylon/types"
"github.com/babylonlabs-io/babylon/x/mint"
minttypes "github.com/babylonlabs-io/babylon/x/mint/types"

"github.com/babylonlabs-io/babylon/app/ante"
appkeepers "github.com/babylonlabs-io/babylon/app/keepers"
appparams "github.com/babylonlabs-io/babylon/app/params"
"github.com/babylonlabs-io/babylon/app/signer"
"github.com/babylonlabs-io/babylon/app/upgrades"
"github.com/babylonlabs-io/babylon/client/docs"
bbn "github.com/babylonlabs-io/babylon/types"
"github.com/babylonlabs-io/babylon/x/btccheckpoint"
btccheckpointtypes "github.com/babylonlabs-io/babylon/x/btccheckpoint/types"
"github.com/babylonlabs-io/babylon/x/btclightclient"
Expand Down Expand Up @@ -206,7 +207,7 @@ func NewBabylonApp(
loadLatest bool,
skipUpgradeHeights map[int64]bool,
invCheckPeriod uint,
privSigner *appkeepers.PrivSigner,
privSigner *signer.PrivSigner,
appOpts servertypes.AppOptions,
wasmOpts []wasmkeeper.Option,
baseAppOptions ...func(*baseapp.BaseApp),
Expand Down Expand Up @@ -800,7 +801,7 @@ func BlockedAddresses() map[string]bool {
}

// allow the following addresses to receive funds
delete(modAccAddrs, authtypes.NewModuleAddress(govtypes.ModuleName).String())
delete(modAccAddrs, appparams.AccGov.String())

return modAccAddrs
}
5 changes: 3 additions & 2 deletions app/app_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"testing"

"cosmossdk.io/log"
"github.com/babylonlabs-io/babylon/testutil/signer"
abci "github.com/cometbft/cometbft/abci/types"
dbm "github.com/cosmos/cosmos-db"
sdk "github.com/cosmos/cosmos-sdk/types"
Expand All @@ -14,7 +15,7 @@ import (

func TestBabylonBlockedAddrs(t *testing.T) {
db := dbm.NewMemDB()
signer, _ := SetupTestPrivSigner()
signer, _ := signer.SetupTestPrivSigner()
logger := log.NewTestLogger(t)

app := NewBabylonAppWithCustomOptions(t, false, signer, SetupOptions{
Expand Down Expand Up @@ -71,7 +72,7 @@ func TestGetMaccPerms(t *testing.T) {

func TestUpgradeStateOnGenesis(t *testing.T) {
db := dbm.NewMemDB()
privSigner, err := SetupTestPrivSigner()
privSigner, err := signer.SetupTestPrivSigner()
require.NoError(t, err)
logger := log.NewTestLogger(t)

Expand Down
3 changes: 2 additions & 1 deletion app/encoding.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (
simsutils "github.com/cosmos/cosmos-sdk/testutil/sims"

appparams "github.com/babylonlabs-io/babylon/app/params"
"github.com/babylonlabs-io/babylon/testutil/signer"
bbn "github.com/babylonlabs-io/babylon/types"
)

Expand All @@ -27,7 +28,7 @@ func TmpAppOptions() simsutils.AppOptionsMap {
}

func NewTmpBabylonApp() *BabylonApp {
signer, _ := SetupTestPrivSigner()
signer, _ := signer.SetupTestPrivSigner()
return NewBabylonApp(
log.NewNopLogger(),
dbm.NewMemDB(),
Expand Down
2 changes: 1 addition & 1 deletion app/include_upgrade_mainnet.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
// init is used to include v1 upgrade for mainnet data
func init() {
Upgrades = []upgrades.Upgrade{v1.CreateUpgrade(v1.UpgradeDataString{
BtcStakingParamStr: mainnet.BtcStakingParamStr,
BtcStakingParamsStr: mainnet.BtcStakingParamsStr,
FinalityParamStr: mainnet.FinalityParamStr,
IncentiveParamStr: mainnet.IncentiveParamStr,
CosmWasmParamStr: mainnet.CosmWasmParamStr,
Expand Down
2 changes: 1 addition & 1 deletion app/include_upgrade_testnet.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
// it is also used for e2e testing
func init() {
Upgrades = []upgrades.Upgrade{v1.CreateUpgrade(v1.UpgradeDataString{
BtcStakingParamStr: testnet.BtcStakingParamStr,
BtcStakingParamsStr: testnet.BtcStakingParamsStr,
FinalityParamStr: testnet.FinalityParamStr,
IncentiveParamStr: testnet.IncentiveParamStr,
CosmWasmParamStr: testnet.CosmWasmParamStr,
Expand Down
Loading
Loading