Skip to content

Commit

Permalink
Bumps babylon to latest dev (#222)
Browse files Browse the repository at this point in the history
  • Loading branch information
KonradStaniec authored Jun 11, 2024
1 parent 2fa2ef7 commit 8507dab
Show file tree
Hide file tree
Showing 8 changed files with 367 additions and 312 deletions.
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ RUN if [ -n "${VERSION}" ]; then \
fi

# Cosmwasm - Download correct libwasmvm version
RUN WASMVM_VERSION=$(go list -m github.com/CosmWasm/wasmvm | cut -d ' ' -f 2) && \
RUN WASMVM_VERSION=$(go list -m github.com/CosmWasm/wasmvm/v2 | cut -d ' ' -f 2) && \
wget https://github.com/CosmWasm/wasmvm/releases/download/$WASMVM_VERSION/libwasmvm_muslc.$(uname -m).a \
-O /lib/libwasmvm_muslc.a && \
-O /lib/libwasmvm_muslc.$(uname -m).a && \
# verify checksum
wget https://github.com/CosmWasm/wasmvm/releases/download/$WASMVM_VERSION/checksums.txt -O /tmp/checksums.txt && \
sha256sum /lib/libwasmvm_muslc.a | grep $(cat /tmp/checksums.txt | grep libwasmvm_muslc.$(uname -m) | cut -d ' ' -f 1)
sha256sum /lib/libwasmvm_muslc.$(uname -m).a | grep $(cat /tmp/checksums.txt | grep libwasmvm_muslc.$(uname -m) | cut -d ' ' -f 1)

RUN CGO_LDFLAGS="$CGO_LDFLAGS -lstdc++ -lm -lsodium" \
CGO_ENABLED=1 \
Expand Down
9 changes: 9 additions & 0 deletions btcstaking-tracker/btcslasher/bootstrapping_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@ func FuzzSlasher_Bootstrapping(f *testing.F) {
covenantSks = append(covenantSks, covenantSk)
covenantPks = append(covenantPks, *bbn.NewBIP340PubKeyFromBTCPK(covenantSk.PubKey()))
}
var covPks []*btcec.PublicKey

for _, pk := range covenantPks {
covPks = append(covPks, pk.MustToBTCPK())
}

logger, err := config.NewRootLogger("auto", "debug")
require.NoError(t, err)
Expand Down Expand Up @@ -95,9 +100,11 @@ func FuzzSlasher_Bootstrapping(f *testing.F) {
activeBTCDel, err := datagen.GenRandomBTCDelegation(
r,
t,
net,
[]bbn.BIP340PubKey{*fpBTCPK},
delSK,
covenantSks,
covPks,
bsParams.Params.CovenantQuorum,
slashingAddr.String(),
100,
Expand All @@ -123,9 +130,11 @@ func FuzzSlasher_Bootstrapping(f *testing.F) {
activeBTCDel, err := datagen.GenRandomBTCDelegation(
r,
t,
net,
[]bbn.BIP340PubKey{*fpBTCPK},
delSK,
covenantSks,
covPks,
bsParams.Params.CovenantQuorum,
slashingAddr.String(),
100,
Expand Down
6 changes: 6 additions & 0 deletions btcstaking-tracker/btcslasher/slasher_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,11 @@ func FuzzSlasher(f *testing.F) {
expiredBTCDel, err := datagen.GenRandomBTCDelegation(
r,
t,
net,
[]bbn.BIP340PubKey{*fpBTCPK},
delSK,
covenantSks,
covenantBtcPks,
bsParams.Params.CovenantQuorum,
slashingAddr.String(),
100,
Expand All @@ -120,9 +122,11 @@ func FuzzSlasher(f *testing.F) {
activeBTCDel, err := datagen.GenRandomBTCDelegation(
r,
t,
net,
[]bbn.BIP340PubKey{*fpBTCPK},
delSK,
covenantSks,
covenantBtcPks,
bsParams.Params.CovenantQuorum,
slashingAddr.String(),
100,
Expand All @@ -145,9 +149,11 @@ func FuzzSlasher(f *testing.F) {
unbondingBTCDel, err := datagen.GenRandomBTCDelegation(
r,
t,
net,
[]bbn.BIP340PubKey{*fpBTCPK},
delSK,
covenantSks,
covenantBtcPks,
bsParams.Params.CovenantQuorum,
slashingAddr.String(),
100,
Expand Down
8 changes: 6 additions & 2 deletions e2etest/test_manager_btcstaking.go
Original file line number Diff line number Diff line change
Expand Up @@ -397,14 +397,16 @@ func (tm *TestManager) VoteAndEquivocate(t *testing.T, fpSK *btcec.PrivateKey) {
require.NoError(t, err)
msgToSign := append(sdk.Uint64ToBigEndian(activatedHeight), blockToVote.Block.AppHash...)
// generate EOTS signature
sig, err := eots.Sign(fpSK, srList[0], msgToSign)
sig, err := eots.Sign(fpSK, srList.SRList[0], msgToSign)
require.NoError(t, err)
eotsSig := bbn.NewSchnorrEOTSSigFromModNScalar(sig)
// submit finality signature
msgAddFinalitySig := &ftypes.MsgAddFinalitySig{
Signer: signerAddr,
FpBtcPk: btcFp.BtcPk,
BlockHeight: activatedHeight,
PubRand: &srList.PRList[0],
Proof: srList.ProofList[0].ToProto(),
BlockAppHash: blockToVote.Block.AppHash,
FinalitySig: eotsSig,
}
Expand All @@ -417,13 +419,15 @@ func (tm *TestManager) VoteAndEquivocate(t *testing.T, fpSK *btcec.PrivateKey) {
*/
invalidAppHash := datagen.GenRandomByteArray(r, 32)
invalidMsgToSign := append(sdk.Uint64ToBigEndian(activatedHeight), invalidAppHash...)
invalidSig, err := eots.Sign(fpSK, srList[0], invalidMsgToSign)
invalidSig, err := eots.Sign(fpSK, srList.SRList[0], invalidMsgToSign)
require.NoError(t, err)
invalidEotsSig := bbn.NewSchnorrEOTSSigFromModNScalar(invalidSig)
invalidMsgAddFinalitySig := &ftypes.MsgAddFinalitySig{
Signer: signerAddr,
FpBtcPk: btcFp.BtcPk,
BlockHeight: activatedHeight,
PubRand: &srList.PRList[0],
Proof: srList.ProofList[0].ToProto(),
BlockAppHash: invalidAppHash,
FinalitySig: invalidEotsSig,
}
Expand Down
109 changes: 55 additions & 54 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,17 @@ toolchain go1.21.4
require (
cosmossdk.io/errors v1.0.1
cosmossdk.io/log v1.3.1
cosmossdk.io/math v1.2.0
cosmossdk.io/math v1.3.0
github.com/avast/retry-go/v4 v4.5.1
github.com/babylonchain/babylon v0.8.6-0.20240403114330-1ee4d649d955
github.com/babylonchain/babylon v0.8.6-0.20240605064737-7be9d5c57afb
github.com/boljen/go-bitmap v0.0.0-20151001105940-23cd2fb0ce7d
github.com/btcsuite/btcd v0.24.0
github.com/btcsuite/btcd/btcec/v2 v2.3.2
github.com/btcsuite/btcd/btcutil v1.1.5
github.com/btcsuite/btcd/chaincfg/chainhash v1.1.0
github.com/btcsuite/btcwallet v0.16.10-0.20230621165747-9c21f464ce13
github.com/cometbft/cometbft v0.38.5
github.com/cosmos/cosmos-sdk v0.50.4-0.20240126152601-c4a2fe2b8987
github.com/cometbft/cometbft v0.38.6
github.com/cosmos/cosmos-sdk v0.50.6
github.com/cosmos/relayer/v2 v2.5.1
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0
github.com/gogo/protobuf v1.3.3
Expand All @@ -30,41 +30,41 @@ require (
github.com/lightningnetwork/lnd v0.16.4-beta.rc1
github.com/pebbe/zmq4 v1.2.9
github.com/pkg/errors v0.9.1
github.com/prometheus/client_golang v1.18.0
github.com/prometheus/client_golang v1.19.0
github.com/spf13/cobra v1.8.0
github.com/spf13/viper v1.18.2
github.com/stretchr/testify v1.8.4
github.com/stretchr/testify v1.9.0
go.uber.org/atomic v1.10.0
go.uber.org/zap v1.26.0
golang.org/x/net v0.21.0
google.golang.org/grpc v1.60.1
google.golang.org/protobuf v1.32.0
golang.org/x/net v0.24.0
google.golang.org/grpc v1.63.2
google.golang.org/protobuf v1.33.0
gopkg.in/yaml.v2 v2.4.0
)

require (
cloud.google.com/go v0.110.10 // indirect
cloud.google.com/go/compute v1.23.3 // indirect
cloud.google.com/go v0.112.0 // indirect
cloud.google.com/go/compute v1.24.0 // indirect
cloud.google.com/go/compute/metadata v0.2.3 // indirect
cloud.google.com/go/iam v1.1.5 // indirect
cloud.google.com/go/storage v1.35.1 // indirect
cosmossdk.io/api v0.7.3 // indirect
cloud.google.com/go/iam v1.1.6 // indirect
cloud.google.com/go/storage v1.36.0 // indirect
cosmossdk.io/api v0.7.4 // indirect
cosmossdk.io/client/v2 v2.0.0-beta.1 // indirect
cosmossdk.io/collections v0.4.0 // indirect
cosmossdk.io/core v0.11.0 // indirect
cosmossdk.io/depinject v1.0.0-alpha.4 // indirect
cosmossdk.io/store v1.0.2 // indirect
cosmossdk.io/tools/confix v0.1.0 // indirect
cosmossdk.io/store v1.1.0 // indirect
cosmossdk.io/tools/confix v0.1.1 // indirect
cosmossdk.io/x/circuit v0.1.0 // indirect
cosmossdk.io/x/evidence v0.1.0 // indirect
cosmossdk.io/x/feegrant v0.1.0 // indirect
cosmossdk.io/x/nft v0.1.0 // indirect
cosmossdk.io/x/tx v0.13.0 // indirect
cosmossdk.io/x/upgrade v0.1.0 // indirect
cosmossdk.io/x/tx v0.13.3 // indirect
cosmossdk.io/x/upgrade v0.1.1 // indirect
filippo.io/edwards25519 v1.0.0 // indirect
github.com/99designs/keyring v1.2.1 // indirect
github.com/CosmWasm/wasmd v0.50.0 // indirect
github.com/CosmWasm/wasmvm v1.5.2 // indirect
github.com/CosmWasm/wasmd v0.51.0 // indirect
github.com/CosmWasm/wasmvm/v2 v2.0.0 // indirect
github.com/DataDog/datadog-go v3.2.0+incompatible // indirect
github.com/DataDog/zstd v1.5.5 // indirect
github.com/aead/siphash v1.0.1 // indirect
Expand All @@ -82,7 +82,7 @@ require (
github.com/btcsuite/winsvc v1.0.0 // indirect
github.com/cenkalti/backoff/v4 v4.2.0 // indirect
github.com/cespare/xxhash v1.1.0 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/cespare/xxhash/v2 v2.3.0 // indirect
github.com/chzyer/readline v1.5.1 // indirect
github.com/cockroachdb/apd/v2 v2.0.2 // indirect
github.com/cockroachdb/errors v1.11.1 // indirect
Expand All @@ -96,12 +96,12 @@ require (
github.com/coreos/go-semver v0.3.0 // indirect
github.com/coreos/go-systemd/v22 v22.5.0 // indirect
github.com/cosmos/btcutil v1.0.5 // indirect
github.com/cosmos/cosmos-db v1.0.0 // indirect
github.com/cosmos/cosmos-proto v1.0.0-beta.4 // indirect
github.com/cosmos/cosmos-db v1.0.2 // indirect
github.com/cosmos/cosmos-proto v1.0.0-beta.5 // indirect
github.com/cosmos/go-bip39 v1.0.0 // indirect
github.com/cosmos/gogogateway v1.2.0 // indirect
github.com/cosmos/gogoproto v1.4.11 // indirect
github.com/cosmos/iavl v1.0.1 // indirect
github.com/cosmos/gogoproto v1.4.12 // indirect
github.com/cosmos/iavl v1.1.2 // indirect
github.com/cosmos/ibc-go/modules/capability v1.0.0 // indirect
github.com/cosmos/ibc-go/v8 v8.0.0 // indirect
github.com/cosmos/ics23/go v0.10.0 // indirect
Expand Down Expand Up @@ -133,21 +133,21 @@ require (
github.com/go-kit/kit v0.12.0 // indirect
github.com/go-kit/log v0.2.1 // indirect
github.com/go-logfmt/logfmt v0.6.0 // indirect
github.com/go-logr/logr v1.2.3 // indirect
github.com/go-logr/logr v1.4.1 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 // indirect
github.com/gogo/googleapis v1.4.1 // indirect
github.com/golang-jwt/jwt/v4 v4.5.0 // indirect
github.com/golang/glog v1.2.0 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/golang/protobuf v1.5.4 // indirect
github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb // indirect
github.com/google/btree v1.1.2 // indirect
github.com/google/go-cmp v0.6.0 // indirect
github.com/google/gofuzz v1.2.0 // indirect
github.com/google/orderedcode v0.0.1 // indirect
github.com/google/s2a-go v0.1.7 // indirect
github.com/google/uuid v1.4.0 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/googleapis/enterprise-certificate-proxy v0.3.2 // indirect
github.com/googleapis/gax-go/v2 v2.12.0 // indirect
github.com/gorilla/handlers v1.5.2 // indirect
Expand All @@ -157,10 +157,10 @@ require (
github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c // indirect
github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
github.com/hashicorp/go-getter v1.7.2 // indirect
github.com/hashicorp/go-getter v1.7.3 // indirect
github.com/hashicorp/go-hclog v1.5.0 // indirect
github.com/hashicorp/go-immutable-radix v1.3.1 // indirect
github.com/hashicorp/go-metrics v0.5.1 // indirect
github.com/hashicorp/go-metrics v0.5.3 // indirect
github.com/hashicorp/go-plugin v1.5.2 // indirect
github.com/hashicorp/go-safetemp v1.0.0 // indirect
github.com/hashicorp/go-version v1.6.0 // indirect
Expand Down Expand Up @@ -191,7 +191,7 @@ require (
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 // indirect
github.com/keybase/go-keychain v0.0.0-20190712205309-48d3d31d256d // indirect
github.com/kkdai/bstream v1.0.0 // indirect
github.com/klauspost/compress v1.17.6 // indirect
github.com/klauspost/compress v1.17.7 // indirect
github.com/klauspost/pgzip v1.2.5 // indirect
github.com/kr/pretty v0.3.1 // indirect
github.com/kr/text v0.2.0 // indirect
Expand All @@ -207,7 +207,7 @@ require (
github.com/lightningnetwork/lnd/ticker v1.1.0 // indirect
github.com/lightningnetwork/lnd/tlv v1.1.0 // indirect
github.com/lightningnetwork/lnd/tor v1.1.0 // indirect
github.com/linxGnu/grocksdb v1.8.12 // indirect
github.com/linxGnu/grocksdb v1.8.14 // indirect
github.com/magiconair/properties v1.8.7 // indirect
github.com/manifoldco/promptui v0.9.0 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
Expand All @@ -227,12 +227,12 @@ require (
github.com/oklog/run v1.1.0 // indirect
github.com/opencontainers/go-digest v1.0.0 // indirect
github.com/pelletier/go-toml/v2 v2.1.0 // indirect
github.com/petermattis/goid v0.0.0-20230904192822-1876fd5063bc // indirect
github.com/petermattis/goid v0.0.0-20231207134359-e60b3f734c67 // indirect
github.com/pierrec/lz4/v4 v4.1.8 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/prometheus/client_model v0.6.0 // indirect
github.com/prometheus/common v0.47.0 // indirect
github.com/prometheus/procfs v0.12.0 // indirect
github.com/prometheus/client_model v0.6.1 // indirect
github.com/prometheus/common v0.52.2 // indirect
github.com/prometheus/procfs v0.13.0 // indirect
github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect
github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0 // indirect
github.com/rivo/uniseg v0.4.4 // indirect
Expand Down Expand Up @@ -270,30 +270,31 @@ require (
go.etcd.io/etcd/raft/v3 v3.5.7 // indirect
go.etcd.io/etcd/server/v3 v3.5.7 // indirect
go.opencensus.io v0.24.0 // indirect
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.36.3 // indirect
go.opentelemetry.io/otel v1.14.0 // indirect
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.47.0 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.47.0 // indirect
go.opentelemetry.io/otel v1.22.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.0.1 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.0.1 // indirect
go.opentelemetry.io/otel/sdk v1.14.0 // indirect
go.opentelemetry.io/otel/trace v1.14.0 // indirect
go.opentelemetry.io/otel/metric v1.22.0 // indirect
go.opentelemetry.io/otel/sdk v1.21.0 // indirect
go.opentelemetry.io/otel/trace v1.22.0 // indirect
go.opentelemetry.io/proto/otlp v0.9.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
golang.org/x/crypto v0.19.0 // indirect
golang.org/x/exp v0.0.0-20240213143201-ec583247a57a // indirect
golang.org/x/mod v0.15.0 // indirect
golang.org/x/oauth2 v0.16.0 // indirect
golang.org/x/sync v0.6.0 // indirect
golang.org/x/sys v0.17.0 // indirect
golang.org/x/term v0.17.0 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/crypto v0.23.0 // indirect
golang.org/x/exp v0.0.0-20240404231335-c0f41cb1a7a0 // indirect
golang.org/x/mod v0.17.0 // indirect
golang.org/x/oauth2 v0.18.0 // indirect
golang.org/x/sync v0.7.0 // indirect
golang.org/x/sys v0.20.0 // indirect
golang.org/x/term v0.20.0 // indirect
golang.org/x/text v0.15.0 // indirect
golang.org/x/time v0.5.0 // indirect
golang.org/x/tools v0.18.0 // indirect
golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect
google.golang.org/api v0.153.0 // indirect
golang.org/x/tools v0.20.0 // indirect
google.golang.org/api v0.162.0 // indirect
google.golang.org/appengine v1.6.8 // indirect
google.golang.org/genproto v0.0.0-20231211222908-989df2bf70f3 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20231120223509-83a465c0220f // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20231212172506-995d672761c0 // indirect
google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/natefinch/lumberjack.v2 v2.0.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
Expand Down
Loading

0 comments on commit 8507dab

Please sign in to comment.