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

Itest light node state hash #1512

Merged
merged 83 commits into from
Dec 28, 2024
Merged
Show file tree
Hide file tree
Changes from 82 commits
Commits
Show all changes
83 commits
Select commit Hold shift + click to select a range
c000f3c
Test fixture that starts one Go node added.
alexeykiselev Sep 30, 2024
c27d530
Genesis and key-block snapshot hashes generation added.
alexeykiselev Oct 3, 2024
54ba718
Added config options to configure preactivated featuers and absence p…
alexeykiselev Oct 3, 2024
350b071
Fix genesis block snapshot hash calculation.
alexeykiselev Oct 3, 2024
e797cac
Test refactoring.
alexeykiselev Oct 7, 2024
2daaf9d
Linter issues fixed.
alexeykiselev Oct 7, 2024
def62d4
Rename test suite.
alexeykiselev Oct 7, 2024
c10dfd0
Merge branch 'master' into itest-light-node-state-hash
alexeykiselev Oct 7, 2024
30bf02f
Merge branch 'master' into itest-light-node-state-hash
alexeykiselev Oct 8, 2024
dbec589
Merge branch 'master' into itest-light-node-state-hash
nickeskov Oct 18, 2024
77a4392
Merge branch 'master' into itest-light-node-state-hash
alexeykiselev Oct 21, 2024
fc8b25a
Better function naming.
alexeykiselev Oct 21, 2024
470cae5
TaskGroup goroutine manager added in pkg/execution package.
alexeykiselev Nov 14, 2024
561302a
Networking package with a new connection handler Session added.
alexeykiselev Nov 15, 2024
3d5e202
Logger interface removed from networking package. Standard slog packa…
alexeykiselev Nov 18, 2024
60d0178
WIP. Simple connection replaced with NetClient.
alexeykiselev Nov 25, 2024
eb14f66
Merge branch 'master' into new-network-connection
alexeykiselev Nov 25, 2024
948cc56
Fixed NetClient closing issue.
alexeykiselev Nov 25, 2024
67f4b85
Redundant log removed.
alexeykiselev Nov 25, 2024
d44fa7f
Move save int conversion to safecast lib.
alexeykiselev Nov 25, 2024
d139cb9
Merge branch 'master' into itest-light-node-state-hash
alexeykiselev Nov 27, 2024
19ef470
Accidentially added files removed.
alexeykiselev Nov 27, 2024
cc1f425
Merge branch 'master' into itest-light-node-state-hash
alexeykiselev Nov 27, 2024
65414fa
Merge branch 'master' into new-network-connection
alexeykiselev Nov 27, 2024
1b130f2
Merge branch 'new-network-connection' into itest-light-node-state-hash
alexeykiselev Nov 27, 2024
512a441
Fixed handshake issue for the single node test suite.
alexeykiselev Nov 27, 2024
643c9c4
Merge branch 'master' into itest-light-node-state-hash
alexeykiselev Nov 28, 2024
7bab250
Merge branch 'master' into new-network-connection
nickeskov Nov 28, 2024
df01e60
Fix data race error in 'networking_test' package
nickeskov Nov 28, 2024
0f3cd81
Refactofing of test containers shutdown. Explicit test containers rem…
alexeykiselev Nov 29, 2024
2af500b
Paralles start and shutdown of test nodes implemented.
alexeykiselev Nov 29, 2024
4f8b6b7
Add parallelizm to some Docker functions.
alexeykiselev Dec 3, 2024
9705342
Merge branch 'master' into new-network-connection
nickeskov Dec 3, 2024
5e753de
Merge branch 'new-network-connection' into itest-light-node-state-hash
alexeykiselev Dec 4, 2024
855acc9
Merge branch 'master' into itest-light-node-state-hash
alexeykiselev Dec 5, 2024
bd86c93
Support native itest container building for Gowaves node.
alexeykiselev Dec 6, 2024
d7217de
Merge branch 'master' into itest-light-node-state-hash
alexeykiselev Dec 6, 2024
41147b0
Fix linter issues.
alexeykiselev Dec 6, 2024
70a8c34
Merge branch 'master' into new-network-connection
alexeykiselev Dec 6, 2024
00a9ebe
Replace atomic.Uint32 with atomic.Bool and use CompareAndSwap there i…
alexeykiselev Dec 10, 2024
63a0305
Assertions added.
alexeykiselev Dec 10, 2024
5219227
Simplified closing and close logic in NetClient.
alexeykiselev Dec 11, 2024
9b63c35
Merge branch 'new-network-connection' into itest-light-node-state-hash
alexeykiselev Dec 11, 2024
ff41cf7
Prepare for new timer in Go 1.23
alexeykiselev Dec 11, 2024
e2f697f
Move constant into function were it used.
alexeykiselev Dec 12, 2024
edd942a
Merge branch 'master' into new-network-connection
alexeykiselev Dec 12, 2024
f832683
Better way to prevent from running multiple receiveLoops.
alexeykiselev Dec 13, 2024
c2ad101
Better data emptyness checks.
alexeykiselev Dec 13, 2024
3aa8a85
Better read error handling.
alexeykiselev Dec 13, 2024
c08bace
Use constructor.
alexeykiselev Dec 13, 2024
abced7f
Wrap heavy logging into log level checks.
alexeykiselev Dec 14, 2024
64bf7d9
Merge branch 'master' into new-network-connection
alexeykiselev Dec 14, 2024
294cf66
Merge branch 'master' into new-network-connection
alexeykiselev Dec 14, 2024
57b9ffb
Session configuration accepts slog handler to set up logging.
alexeykiselev Dec 16, 2024
fdd44ef
Merge branch 'new-network-connection' into itest-light-node-state-hash
alexeykiselev Dec 16, 2024
14420bc
Close error channel on sending data successfully.
alexeykiselev Dec 16, 2024
412377f
Better error handling while reading.
alexeykiselev Dec 16, 2024
52a893e
Fine error assertions.
alexeykiselev Dec 16, 2024
77633f3
Fix blinking test.
alexeykiselev Dec 16, 2024
125adb7
Merge branch 'new-network-connection' into itest-light-node-state-hash
alexeykiselev Dec 16, 2024
8747fc4
Merge branch 'master' into new-network-connection
alexeykiselev Dec 18, 2024
2f7bcc5
Merge branch 'new-network-connection' into itest-light-node-state-hash
alexeykiselev Dec 18, 2024
df77a57
Better configuration handling.
alexeykiselev Dec 19, 2024
dc78383
Merge branch 'master' into new-network-connection
alexeykiselev Dec 19, 2024
7b3fffb
Fixed blinking test TestCloseParentContext. Wait group added to wait …
alexeykiselev Dec 19, 2024
d2e2646
Better test workflow. Better wait group naming.
alexeykiselev Dec 19, 2024
3d8f38d
Merge branch 'master' into new-network-connection
alexeykiselev Dec 20, 2024
9599840
Fix deadlock in test by introducing wait group instead of sleep.
alexeykiselev Dec 20, 2024
275701e
Merge branch 'new-network-connection' into itest-light-node-state-hash
alexeykiselev Dec 20, 2024
044cab1
Function to disable IPv6 in itest docker containers added.
alexeykiselev Dec 24, 2024
b5d5173
Merge branch 'master' into new-network-connection
alexeykiselev Dec 24, 2024
0f4b79b
Merge branch 'new-network-connection' into itest-light-node-state-hash
alexeykiselev Dec 24, 2024
16a32cb
Merge branch 'master' into new-network-connection
alexeykiselev Dec 26, 2024
227698f
Merge branch 'new-network-connection' into itest-light-node-state-hash
alexeykiselev Dec 26, 2024
7a27d43
Functions to subscribe and wait for network messages of specifed type…
alexeykiselev Dec 26, 2024
897c3ff
Better error messages.
alexeykiselev Dec 27, 2024
63ade4e
Internal sendPacket reimplemented using io.Reader. Data restoration f…
alexeykiselev Dec 27, 2024
7a5d641
Merge branch 'new-network-connection' into itest-light-node-state-hash
alexeykiselev Dec 27, 2024
aa2bff0
Handler implementation updated.
alexeykiselev Dec 27, 2024
78579ca
Itest network client handler updated.
alexeykiselev Dec 27, 2024
d2b67d5
Merge branch 'new-network-connection' into itest-light-node-state-hash
alexeykiselev Dec 27, 2024
ca36923
Fix multiple containers removal issue.
alexeykiselev Dec 27, 2024
d5998c3
Merge branch 'master' into itest-light-node-state-hash
alexeykiselev Dec 28, 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
12 changes: 12 additions & 0 deletions .mockery.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
quiet: False
with-expecter: True
dir: "{{.InterfaceDir}}/mocks"
mockname: "Mock{{.InterfaceName}}"
filename: "{{.InterfaceName | snakecase}}.go"

packages:
github.com/wavesplatform/gowaves/pkg/networking:
interfaces:
Header:
Protocol:
Handler:
10 changes: 7 additions & 3 deletions Dockerfile.gowaves-it
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ COPY cmd cmd
COPY pkg pkg

ARG WITH_RACE_SUFFIX=""
RUN make build-node-linux-amd64${WITH_RACE_SUFFIX}
RUN make build-node-native${WITH_RACE_SUFFIX}

FROM alpine:3.21.0
ENV TZ=Etc/UTC \
APP_USER=gowaves

RUN apk add --no-cache bind-tools
RUN apk add --no-cache bind-tools curl

RUN addgroup -S $APP_USER \
&& adduser -S $APP_USER -G $APP_USER
Expand All @@ -34,7 +34,9 @@ ENV CONFIG_PATH=/home/gowaves/config/gowaves-it.json \

USER $APP_USER

COPY --from=builder /app/build/bin/linux-amd64/node /app/node
COPY --from=builder /app/build/bin/native/node /app/node

HEALTHCHECK CMD curl -f http://localhost:6869/node/status || exit 1

STOPSIGNAL SIGINT

Expand Down Expand Up @@ -64,3 +66,5 @@ CMD /app/node \
-microblock-interval 2s \
-blacklist-residence-time 0 \
-rate-limiter-opts="rps=100&burst=100" \
-min-peers-mining=2 \
-disable-miner=$DISABLE_MINER \
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,8 @@ dist-blockcmp: release-blockcmp

build-node-native:
@go build -o build/bin/native/node -ldflags="-X 'github.com/wavesplatform/gowaves/pkg/versioning.Version=$(VERSION)'" ./cmd/node
build-node-native-with-race:
@go build -race -o build/bin/native/node -ldflags="-X 'github.com/wavesplatform/gowaves/pkg/versioning.Version=$(VERSION)'" ./cmd/node
build-node-linux-amd64:
@CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o build/bin/linux-amd64/node -ldflags="-X 'github.com/wavesplatform/gowaves/pkg/versioning.Version=$(VERSION)'" ./cmd/node
build-node-linux-amd64-with-race:
Expand Down
4 changes: 4 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ require (
filippo.io/edwards25519 v1.1.0
github.com/beevik/ntp v1.4.3
github.com/btcsuite/btcd/btcec/v2 v2.3.4
github.com/ccoveille/go-safecast v1.2.0
github.com/cenkalti/backoff/v4 v4.3.0
github.com/cespare/xxhash/v2 v2.3.0
github.com/consensys/gnark v0.11.0
Expand All @@ -22,6 +23,7 @@ require (
github.com/influxdata/influxdb1-client v0.0.0-20200827194710-b269163b24ab
github.com/jinzhu/copier v0.4.0
github.com/mr-tron/base58 v1.2.0
github.com/neilotoole/slogt v1.1.0
github.com/ory/dockertest/v3 v3.11.0
github.com/phayes/freeport v0.0.0-20180830031419-95f893ade6f2
github.com/pkg/errors v0.9.1
Expand All @@ -42,6 +44,7 @@ require (
github.com/valyala/bytebufferpool v1.0.0
github.com/xenolf/lego v2.7.2+incompatible
go.uber.org/atomic v1.11.0
go.uber.org/goleak v1.3.0
go.uber.org/zap v1.27.0
golang.org/x/crypto v0.31.0
golang.org/x/exp v0.0.0-20240904232852-e7e105dedf7e
Expand Down Expand Up @@ -98,6 +101,7 @@ require (
github.com/rs/zerolog v1.33.0 // indirect
github.com/sirupsen/logrus v1.9.3 // indirect
github.com/steakknife/hamming v0.0.0-20180906055917-c99c65617cd3 // indirect
github.com/stretchr/objx v0.5.2 // indirect
github.com/tidwall/gjson v1.14.2 // indirect
github.com/tidwall/match v1.1.1 // indirect
github.com/tidwall/pretty v1.2.0 // indirect
Expand Down
6 changes: 6 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ github.com/btcsuite/btcd/btcec/v2 v2.3.4 h1:3EJjcN70HCu/mwqlUsGK8GcNVyLVxFDlWurT
github.com/btcsuite/btcd/btcec/v2 v2.3.4/go.mod h1:zYzJ8etWJQIv1Ogk7OzpWjowwOdXY1W/17j2MW85J04=
github.com/btcsuite/btcd/chaincfg/chainhash v1.1.0 h1:59Kx4K6lzOW5w6nFlA0v5+lk/6sjybR934QNHSJZPTQ=
github.com/btcsuite/btcd/chaincfg/chainhash v1.1.0/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc=
github.com/ccoveille/go-safecast v1.2.0 h1:H4X7aosepsU1Mfk+098CTdKpsDH0cfYJ2RmwXFjgvfc=
github.com/ccoveille/go-safecast v1.2.0/go.mod h1:QqwNjxQ7DAqY0C721OIO9InMk9zCwcsO7tnRuHytad8=
github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8=
github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE=
github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
Expand Down Expand Up @@ -199,6 +201,8 @@ github.com/mr-tron/base58 v1.2.0/go.mod h1:BinMc/sQntlIE1frQmRFPUoPA1Zkr8VRgBdjW
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA=
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ=
github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
github.com/neilotoole/slogt v1.1.0 h1:c7qE92sq+V0yvCuaxph+RQ2jOKL61c4hqS1Bv9W7FZE=
github.com/neilotoole/slogt v1.1.0/go.mod h1:RCrGXkPc/hYybNulqQrMHRtvlQ7F6NktNVLuLwk6V+w=
github.com/nxadm/tail v1.4.4 h1:DQuhQpB1tVlglWS2hLQ5OV6B5r8aGxSrPc5Qo6uTN78=
github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A=
github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
Expand Down Expand Up @@ -282,6 +286,8 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+
github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY=
github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA=
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
Expand Down
5 changes: 5 additions & 0 deletions itests/clients/grpc_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,11 @@ func (c *GRPCClient) GetAssetsInfo(t *testing.T, id []byte) *g.AssetInfoResponse
return assetInfo
}

func (c *GRPCClient) Close(t testing.TB) {
err := c.conn.Close()
assert.NoError(t, err, "failed to close GRPC connection to %s node", c.impl.String())
}

func (c *GRPCClient) getBalance(t *testing.T, req *g.BalancesRequest) *g.BalanceResponse {
ctx, cancel := context.WithTimeout(context.Background(), c.timeout)
defer cancel()
Expand Down
Loading
Loading