Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion config/bitcoin.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package config

import (
"github.com/babylonlabs-io/babylon/types"
"github.com/babylonlabs-io/babylon/v3/types"
"github.com/lightningnetwork/lnd/lnwallet/chainfee"
)

Expand Down
11 changes: 6 additions & 5 deletions container/container.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@ import (
"context"
"encoding/json"
"fmt"
"github.com/babylonlabs-io/babylon-benchmark/lib"
"github.com/docker/docker/api/types"
"regexp"
"strconv"
"time"

bbn "github.com/babylonlabs-io/babylon/types"
"github.com/babylonlabs-io/babylon-benchmark/lib"
"github.com/docker/docker/api/types"

bbn "github.com/babylonlabs-io/babylon/v3/types"
rawDc "github.com/docker/docker/client"

"github.com/btcsuite/btcd/btcec/v2"
Expand Down Expand Up @@ -229,7 +230,7 @@ func (m *Manager) RunBabylondResource(
"sed -i -e 's/iavl-cache-size = 0/iavl-cache-size = %d/' /home/node0/babylond/config/app.toml && "+
"sed -i -e 's/iavl-disable-fastnode = true/iavl-disable-fastnode = %s/' /home/node0/babylond/config/app.toml && "+
`sed -i -e 's/timeout_commit = "5s"/timeout_commit = "2s"/' /home/node0/babylond/config/config.toml &&`+
"babylond start --home=/home/node0/babylond --rpc.pprof_laddr=0.0.0.0:6060",
"export BABYLON_BLS_PASSWORD=password && babylond start --home=/home/node0/babylond --rpc.pprof_laddr=0.0.0.0:6060",
epochInterval, slashingPkScript, baseHeaderHex,
bbn.NewBIP340PubKeyFromBTCPK(CovenantPubKey).MarshalHex(),
iavlCacheSize,
Expand Down Expand Up @@ -287,7 +288,7 @@ func (m *Manager) RunBabylondResource(
"sed -i -e 's/iavl-cache-size = 0/iavl-cache-size = %d/' /home/node1/babylond/config/app.toml && "+
"sed -i -e 's/iavl-disable-fastnode = true/iavl-disable-fastnode = %s/' /home/node1/babylond/config/app.toml && "+
`sed -i -e 's/timeout_commit = "5s"/timeout_commit = "2s"/' /home/node1/babylond/config/config.toml &&`+
"babylond start --home=/home/node1/babylond --rpc.pprof_laddr=0.0.0.0:6060",
"export BABYLON_BLS_PASSWORD=password && babylond start --home=/home/node1/babylond --rpc.pprof_laddr=0.0.0.0:6060",
iavlCacheSize,
fmt.Sprintf("%t", iavlDisableFastnode),
),
Expand Down
2 changes: 2 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ services:
- SNAPSHOT_FILE=babylon.tar.gz
- RPC_URL=https://rpc.devnet.babylonlabs.io
- GENESIS_PATH=
- BABYLON_BLS_PASSWORD=password
volumes:
- ./scripts/init_master.sh:/scripts/init_master.sh
- ./snapshots:/snapshots
Expand Down Expand Up @@ -52,6 +53,7 @@ services:
environment:
- RPC_URL=https://rpc.devnet.babylonlabs.io
- GENESIS_PATH=
- BABYLON_BLS_PASSWORD=password
volumes:
- ./scripts/init_follower.sh:/scripts/init_follower.sh
- ./babylond_data_follower:/root/.babylond
Expand Down
293 changes: 174 additions & 119 deletions go.mod

Large diffs are not rendered by default.

1,399 changes: 1,121 additions & 278 deletions go.sum

Large diffs are not rendered by default.

19 changes: 10 additions & 9 deletions harness/babylonclient.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,20 @@ package harness
import (
"context"
"encoding/hex"
"github.com/avast/retry-go/v4"
"github.com/babylonlabs-io/babylon/app/params"
"github.com/babylonlabs-io/babylon/client/babylonclient"
"math/rand"
"sync"
"time"

bbn "github.com/babylonlabs-io/babylon/app"
"github.com/babylonlabs-io/babylon/client/config"
bncfg "github.com/babylonlabs-io/babylon/client/config"
"github.com/babylonlabs-io/babylon/client/query"
bbntypes "github.com/babylonlabs-io/babylon/types"
btclctypes "github.com/babylonlabs-io/babylon/x/btclightclient/types"
"github.com/avast/retry-go/v4"
"github.com/babylonlabs-io/babylon/v3/app/params"
"github.com/babylonlabs-io/babylon/v3/client/babylonclient"

bbn "github.com/babylonlabs-io/babylon/v3/app"
"github.com/babylonlabs-io/babylon/v3/client/config"
bncfg "github.com/babylonlabs-io/babylon/v3/client/config"
"github.com/babylonlabs-io/babylon/v3/client/query"
bbntypes "github.com/babylonlabs-io/babylon/v3/types"
btclctypes "github.com/babylonlabs-io/babylon/v3/x/btclightclient/types"
"github.com/btcsuite/btcd/wire"
rpchttp "github.com/cometbft/cometbft/rpc/client/http"
cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types"
Expand Down
14 changes: 7 additions & 7 deletions harness/btcstaker.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ import (
"sync/atomic"
"time"

staking "github.com/babylonlabs-io/babylon/btcstaking"
"github.com/babylonlabs-io/babylon/crypto/bip322"
bbn "github.com/babylonlabs-io/babylon/types"
bbntypes "github.com/babylonlabs-io/babylon/types"
btckpttypes "github.com/babylonlabs-io/babylon/x/btccheckpoint/types"
bstypes "github.com/babylonlabs-io/babylon/x/btcstaking/types"
btcstypes "github.com/babylonlabs-io/babylon/x/btcstaking/types"
staking "github.com/babylonlabs-io/babylon/v3/btcstaking"
"github.com/babylonlabs-io/babylon/v3/crypto/bip322"
bbn "github.com/babylonlabs-io/babylon/v3/types"
bbntypes "github.com/babylonlabs-io/babylon/v3/types"
btckpttypes "github.com/babylonlabs-io/babylon/v3/x/btccheckpoint/types"
bstypes "github.com/babylonlabs-io/babylon/v3/x/btcstaking/types"
btcstypes "github.com/babylonlabs-io/babylon/v3/x/btcstaking/types"
"github.com/btcsuite/btcd/btcec/v2"
"github.com/btcsuite/btcd/btcec/v2/schnorr"
"github.com/btcsuite/btcd/btcjson"
Expand Down
8 changes: 4 additions & 4 deletions harness/covenant.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ import (
"slices"
"time"

staking "github.com/babylonlabs-io/babylon/btcstaking"
asig "github.com/babylonlabs-io/babylon/crypto/schnorr-adaptor-signature"
bbntypes "github.com/babylonlabs-io/babylon/types"
bstypes "github.com/babylonlabs-io/babylon/x/btcstaking/types"
staking "github.com/babylonlabs-io/babylon/v3/btcstaking"
asig "github.com/babylonlabs-io/babylon/v3/crypto/schnorr-adaptor-signature"
bbntypes "github.com/babylonlabs-io/babylon/v3/types"
bstypes "github.com/babylonlabs-io/babylon/v3/x/btcstaking/types"
"github.com/btcsuite/btcd/btcec/v2"
"github.com/btcsuite/btcd/btcec/v2/schnorr"
"github.com/btcsuite/btcd/btcutil"
Expand Down
21 changes: 13 additions & 8 deletions harness/finalityprovider.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,19 @@

import (
"context"
sdkmath "cosmossdk.io/math"
"fmt"
"time"

sdkmath "cosmossdk.io/math"
"github.com/avast/retry-go/v4"
"github.com/babylonlabs-io/babylon-benchmark/lib"
"github.com/babylonlabs-io/babylon/testutil/datagen"
bbntypes "github.com/babylonlabs-io/babylon/types"
bstypes "github.com/babylonlabs-io/babylon/x/btcstaking/types"
ckpttypes "github.com/babylonlabs-io/babylon/x/checkpointing/types"
finalitytypes "github.com/babylonlabs-io/babylon/x/finality/types"
appparams "github.com/babylonlabs-io/babylon/v3/app/params"
"github.com/babylonlabs-io/babylon/v3/app/signingcontext"
"github.com/babylonlabs-io/babylon/v3/testutil/datagen"
bbntypes "github.com/babylonlabs-io/babylon/v3/types"
bstypes "github.com/babylonlabs-io/babylon/v3/x/btcstaking/types"
ckpttypes "github.com/babylonlabs-io/babylon/v3/x/checkpointing/types"
finalitytypes "github.com/babylonlabs-io/babylon/v3/x/finality/types"
"github.com/babylonlabs-io/finality-provider/eotsmanager"
"github.com/btcsuite/btcd/btcec/v2"
"github.com/btcsuite/btcd/btcec/v2/schnorr"
Expand All @@ -21,7 +25,6 @@
sdkquery "github.com/cosmos/cosmos-sdk/types/query"
stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types"
"go.uber.org/zap"
"time"
)

type BlockInfo struct {
Expand Down Expand Up @@ -104,7 +107,7 @@
return err
}

fpPK, err := eots.CreateKey(keyName) // todo(lazar): hdpath?

Check failure on line 110 in harness/finalityprovider.go

View workflow job for this annotation

GitHub Actions / lint_test / lint

not enough arguments in call to eots.CreateKey

Check failure on line 110 in harness/finalityprovider.go

View workflow job for this annotation

GitHub Actions / lint_test / lint

not enough arguments in call to eots.CreateKey

Check failure on line 110 in harness/finalityprovider.go

View workflow job for this annotation

GitHub Actions / lint_test / lint

not enough arguments in call to eots.CreateKey

Check failure on line 110 in harness/finalityprovider.go

View workflow job for this annotation

GitHub Actions / lint_test / integration-tests

not enough arguments in call to eots.CreateKey
if err != nil {
return err
}
Expand All @@ -118,7 +121,9 @@
return err
}

pop, err := datagen.NewPoPBTC(finalitySender.BabylonAddress, fpRecord.PrivKey)
// Create finality provider proof of possession signing context
fpPopContext := signingcontext.FpPopContextV0(chainId, appparams.AccBTCStaking.String())
pop, err := datagen.NewPoPBTC(fpPopContext, finalitySender.BabylonAddress, fpRecord.PrivKey)
if err != nil {
return err
}
Expand Down
17 changes: 9 additions & 8 deletions harness/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,21 @@ package harness
import (
"bytes"
"context"
"cosmossdk.io/errors"
"encoding/hex"
"encoding/json"
"fmt"
"os"
"path/filepath"
"slices"
"time"

"cosmossdk.io/errors"
benchcfg "github.com/babylonlabs-io/babylon-benchmark/config"
"github.com/babylonlabs-io/babylon-benchmark/container"
"github.com/babylonlabs-io/babylon-benchmark/lib"
bbnclient "github.com/babylonlabs-io/babylon/client/client"
bbncfg "github.com/babylonlabs-io/babylon/client/config"
finalitytypes "github.com/babylonlabs-io/babylon/x/finality/types"
bbnclient "github.com/babylonlabs-io/babylon/v3/client/client"
bbncfg "github.com/babylonlabs-io/babylon/v3/client/config"
finalitytypes "github.com/babylonlabs-io/babylon/v3/x/finality/types"
"github.com/btcsuite/btcd/btcec/v2"
"github.com/btcsuite/btcd/btcjson"
"github.com/btcsuite/btcd/btcutil"
Expand All @@ -25,10 +30,6 @@ import (
sdk "github.com/cosmos/cosmos-sdk/types"
banktypes "github.com/cosmos/cosmos-sdk/x/bank/types"
"golang.org/x/sync/errgroup"
"os"
"path/filepath"
"slices"
"time"
)

var (
Expand Down
4 changes: 2 additions & 2 deletions harness/proof.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package harness

import (
bbntypes "github.com/babylonlabs-io/babylon/types"
btcctypes "github.com/babylonlabs-io/babylon/x/btccheckpoint/types"
bbntypes "github.com/babylonlabs-io/babylon/v3/types"
btcctypes "github.com/babylonlabs-io/babylon/v3/x/btccheckpoint/types"
"github.com/btcsuite/btcd/wire"
)

Expand Down
8 changes: 4 additions & 4 deletions harness/subreporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ import (
"fmt"
"time"

"github.com/babylonlabs-io/babylon/btctxformatter"
bbntypes "github.com/babylonlabs-io/babylon/types"
btckpttypes "github.com/babylonlabs-io/babylon/x/btccheckpoint/types"
checkpointingtypes "github.com/babylonlabs-io/babylon/x/checkpointing/types"
"github.com/babylonlabs-io/babylon/v3/btctxformatter"
bbntypes "github.com/babylonlabs-io/babylon/v3/types"
btckpttypes "github.com/babylonlabs-io/babylon/v3/x/btccheckpoint/types"
checkpointingtypes "github.com/babylonlabs-io/babylon/v3/x/checkpointing/types"
"github.com/btcsuite/btcd/chaincfg/chainhash"
"github.com/btcsuite/btcd/txscript"
"github.com/btcsuite/btcd/wire"
Expand Down
5 changes: 3 additions & 2 deletions lib/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@ package lib

import (
"fmt"
"golang.org/x/mod/modfile"
"os"
"path/filepath"

"golang.org/x/mod/modfile"
)

// GetBabylonVersion returns babylond version from go.mod
Expand All @@ -29,7 +30,7 @@ func GetBabylonVersion() (string, error) {
return "", err
}

const modName = "github.com/babylonlabs-io/babylon"
const modName = "github.com/babylonlabs-io/babylon/v3"
for _, require := range modFile.Require {
if require.Mod.Path == modName {
return require.Mod.Version, nil
Expand Down
2 changes: 1 addition & 1 deletion submodules/babylon
Submodule babylon updated 859 files
Loading