diff --git a/Dockerfile b/Dockerfile index e67573c6..7ad5178f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -85,5 +85,5 @@ COPY --from=builder /testground_dep_list / COPY --from=builder ${PLAN_DIR}/testplan.bin /testplan -EXPOSE 9090 26657 26656 1317 26658 26660 +EXPOSE 9090 26657 26656 1317 26658 26660 26659 ENTRYPOINT [ "/testplan"] diff --git a/compositions/cluster-k8s/pfd-400.toml b/compositions/cluster-k8s/pfd-400.toml index 1f787960..12394c5d 100644 --- a/compositions/cluster-k8s/pfd-400.toml +++ b/compositions/cluster-k8s/pfd-400.toml @@ -20,14 +20,14 @@ validator = "100" bridge = "100" light = "100" - submit-times = "12" + submit-times = "3" [[groups]] id = "seeds" builder = "docker:generic" [groups.resources] - memory = "4Gi" - cpu = "3" + memory = "2Gi" + cpu = "2" [groups.instances] count = 5 percentage = 0.0 @@ -85,7 +85,7 @@ artifact = "" [groups.run.test_params] bandwidth = "320Mib" - block-height = "40" + block-height = "20" latency = "0" role = "bridge" @@ -108,6 +108,6 @@ artifact = "" [groups.run.test_params] bandwidth = "100Mib" - block-height = "20" + block-height = "16" latency = "0" role = "light" diff --git a/go.mod b/go.mod index d6a97465..b1b4d7a6 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,6 @@ module github.com/celestiaorg/test-infra go 1.19 replace ( - github.com/celestiaorg/celestia-node => github.com/derrandz/celestia-node v0.7.0-rc1-blackbox-metrics github.com/celestiaorg/utils => github.com/celestiaorg/utils v0.0.0-20230111201732-2d8b5f8774ad // uses an unmerged PR, delete when celestiaorg/utils PR#5 is merged github.com/cosmos/cosmos-sdk => github.com/celestiaorg/cosmos-sdk v1.8.0-sdk-v0.46.7 github.com/filecoin-project/dagstore => github.com/celestiaorg/dagstore v0.0.0-20221014072825-395797efb659 @@ -25,7 +24,9 @@ require ( require ( cosmossdk.io/math v1.0.0-beta.3 - github.com/celestiaorg/celestia-node v0.6.2 + //please use replace directive to use a local version of celestia-node + //until we get sealing merged in upcoming releases + github.com/celestiaorg/celestia-node v0.7.0-rc1 github.com/celestiaorg/nmt v0.14.0 github.com/libp2p/go-libp2p v0.24.1 github.com/tendermint/tendermint v0.35.4 @@ -59,7 +60,6 @@ require ( github.com/celestiaorg/merkletree v0.0.0-20210714075610-a84dc3ddbbe4 // indirect github.com/celestiaorg/quantum-gravity-bridge v1.3.0 // indirect github.com/celestiaorg/rsmt2d v0.8.0 // indirect - github.com/celestiaorg/utils v0.0.0-00010101000000-000000000000 // 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 diff --git a/go.sum b/go.sum index 5025c22d..a4189fdf 100644 --- a/go.sum +++ b/go.sum @@ -212,6 +212,8 @@ github.com/celestiaorg/celestia-app v0.12.0-rc6 h1:MQ1Nb+awcnqK+EHpsH+NlBLT6F5Mp github.com/celestiaorg/celestia-app v0.12.0-rc6/go.mod h1:4qMJfFq0Yr9At8dpP271seswj1wav20vqNfrnBlFxmo= github.com/celestiaorg/celestia-core v1.14.0-tm-v0.34.23 h1:8zE523TUe5W33/nheJ9umHF2d1q6iHQlqJfMXMTPe3k= github.com/celestiaorg/celestia-core v1.14.0-tm-v0.34.23/go.mod h1:fGDSg7aw2OH/Uze1zymop0x0y1kAPEO9OII2A2cb99Q= +github.com/celestiaorg/celestia-node v0.7.0-rc1 h1:jpCXPD5tWpsc9XbEPzA4IsZmNnVmNl1s26c1toCoLus= +github.com/celestiaorg/celestia-node v0.7.0-rc1/go.mod h1:wsYzebFMNG/Vw3wmc3Pvgezfkw6c6pZ2EITdZ63w3+0= github.com/celestiaorg/cosmos-sdk v1.8.0-sdk-v0.46.7 h1:EADZy33ufskVIy6Rj6jbi3SOVCeYYo26zUi7iYx+QR0= github.com/celestiaorg/cosmos-sdk v1.8.0-sdk-v0.46.7/go.mod h1:vg3Eza9adJJ5Mdx6boz5MpZsZcTZyrfTVYZHyi2zLm4= github.com/celestiaorg/dagstore v0.0.0-20221014072825-395797efb659 h1:f3205vw3GYBtMiNoS+qB6IuHSs50Iwqsm9lNIikLTCk= @@ -228,8 +230,6 @@ github.com/celestiaorg/quantum-gravity-bridge v1.3.0 h1:9zPIp7w1FWfkPnn16y3S4FpF github.com/celestiaorg/quantum-gravity-bridge v1.3.0/go.mod h1:6WOajINTDEUXpSj5UZzod16UZ96ZVB/rFNKyM+Mt1gI= github.com/celestiaorg/rsmt2d v0.8.0 h1:ZUxTCELZCM9zMGKNF3cT+rUqMddXMeiuyleSJPZ3Wn4= github.com/celestiaorg/rsmt2d v0.8.0/go.mod h1:hhlsTi6G3+X5jOP/8Lb/d7i5y2XNFmnyMddYbFSmrgo= -github.com/celestiaorg/utils v0.0.0-20230111201732-2d8b5f8774ad h1:DHLh9QR6vWe47XsNFw5HNoKYXZBcrMgQtEDeoFo2dtY= -github.com/celestiaorg/utils v0.0.0-20230111201732-2d8b5f8774ad/go.mod h1:vQTh7MHnvpIeCQZ2/Ph+w7K1R2UerDheZbgJEJD2hSU= github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4= github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= github.com/cenkalti/backoff/v4 v4.1.1/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= @@ -364,8 +364,6 @@ github.com/decred/dcrd/dcrec/secp256k1/v4 v4.1.0/go.mod h1:DZGJHZMqrU4JJqFAWUS2U github.com/decred/dcrd/lru v1.0.0/go.mod h1:mxKOwFd7lFjN2GZYsiz/ecgqR6kkYAl+0pz0tEMk218= github.com/deepmap/oapi-codegen v1.6.0/go.mod h1:ryDa9AgbELGeB+YEXE1dR53yAjHwFvE9iAUlWl9Al3M= github.com/deepmap/oapi-codegen v1.8.2/go.mod h1:YLgSKSDv/bZQB7N4ws6luhozi3cEdRktEqrX88CvjIw= -github.com/derrandz/celestia-node v0.7.0-rc1-blackbox-metrics h1:EllRxOKC7fXNO7Js8hOmdxxYHfO3JehBCRrQ+P+Rwp0= -github.com/derrandz/celestia-node v0.7.0-rc1-blackbox-metrics/go.mod h1:JIg6wsZ/W2lZv22zfv5PkdOOFsu4bEBVlrPdIHWJjfM= github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f h1:U5y3Y5UE0w7amNe7Z5G/twsBW0KEalRQXZzf8ufSh9I= github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f/go.mod h1:xH/i4TFMt8koVQZ6WFms69WAsDWr2XsYL3Hkl7jkoLE= github.com/dgraph-io/badger v1.5.5-0.20190226225317-8115aed38f8f/go.mod h1:VZxzAIRPHRVNRKRo6AXrX9BJegn6il06VMTZVJYCIjQ= diff --git a/testkit/appkit/app.go b/testkit/appkit/app.go index 981a6e0e..ccd92e50 100644 --- a/testkit/appkit/app.go +++ b/testkit/appkit/app.go @@ -147,7 +147,6 @@ func (ak *AppKit) SignGenTx(accName, amount, krbackend, krpath string) (string, "gentx", accName, amount, - ak.AccountAddress, wrapFlag(flags.FlagEVMAddress), ethAddress.String(), wrapFlag(flags.FlagKeyringBackend), diff --git a/tests/helpers/common/data.go b/tests/helpers/common/data.go index b58ec697..45b3d5d4 100644 --- a/tests/helpers/common/data.go +++ b/tests/helpers/common/data.go @@ -8,6 +8,7 @@ import ( "github.com/celestiaorg/celestia-app/pkg/appconsts" "github.com/celestiaorg/celestia-node/header" "github.com/celestiaorg/celestia-node/nodebuilder" + "github.com/celestiaorg/celestia-node/state" "github.com/celestiaorg/nmt/namespace" tmrand "github.com/tendermint/tendermint/libs/rand" "github.com/testground/sdk-go/runtime" @@ -99,3 +100,16 @@ func VerifyDataInNamespace(ctx context.Context, nd *nodebuilder.Node, nid namesp } return nil } + +// CheckBalanceDeduction checks if the balance of a node has been deducted after a successful pfb +func CheckBalanceDeduction(ctx context.Context, nd *nodebuilder.Node, bal *state.Balance) error { + latestbal, err := nd.StateServ.Balance(ctx) + if err != nil { + return err + } + + if latestbal.IsGTE(*bal) { + return fmt.Errorf("no balance deducted from the %s node", nd.Type.String()) + } + return nil +} diff --git a/tests/helpers/fund-accs/run_bridge.go b/tests/helpers/fund-accs/run_bridge.go index 9af630b1..fd71e5ee 100644 --- a/tests/helpers/fund-accs/run_bridge.go +++ b/tests/helpers/fund-accs/run_bridge.go @@ -92,8 +92,6 @@ func RunBridgeNode(runenv *runtime.RunEnv, initCtx *run.InitContext) error { runenv.RecordFailure(fmt.Errorf("bridge node is still syncing the past")) } - // TODO(@Bidon15): Check in the cluster if we can reproduce this issue - // https://github.com/celestiaorg/celestia-node/issues/1219 bal, err := nd.StateServ.Balance(ctx) if err != nil { return err @@ -118,6 +116,11 @@ func RunBridgeNode(runenv *runtime.RunEnv, initCtx *run.InitContext) error { } } + err = common.CheckBalanceDeduction(ctx, nd, bal) + if err != nil { + return err + } + err = nd.Stop(ctx) if err != nil { return err diff --git a/tests/helpers/fund-accs/run_full.go b/tests/helpers/fund-accs/run_full.go index 1bacace5..7f159b5c 100644 --- a/tests/helpers/fund-accs/run_full.go +++ b/tests/helpers/fund-accs/run_full.go @@ -153,6 +153,11 @@ func RunFullNode(runenv *runtime.RunEnv, initCtx *run.InitContext) error { } } + err = common.CheckBalanceDeduction(ctx, nd, bal) + if err != nil { + return err + } + err = nd.Stop(ctx) if err != nil { return err diff --git a/tests/helpers/fund-accs/run_light.go b/tests/helpers/fund-accs/run_light.go index 1596f148..d0e182e2 100644 --- a/tests/helpers/fund-accs/run_light.go +++ b/tests/helpers/fund-accs/run_light.go @@ -157,10 +157,16 @@ func RunLightNode(runenv *runtime.RunEnv, initCtx *run.InitContext) error { } } + err = common.CheckBalanceDeduction(ctx, nd, bal) + if err != nil { + return err + } + err = nd.Stop(ctx) if err != nil { return err } + _, err = syncclient.SignalEntry(ctx, testkit.FinishState) if err != nil { return err