Commit graph

619 commits

Author SHA1 Message Date
Roman Khimov
c96be81229
Merge pull request #330 from nspcc-dev/drop-redundant-dev-code-part-5
Drop redundant dev code part 5. The next one in series of #315, #318, #322 and #328. Continuing with #307. Fixes #319 along the way.
2019-08-30 20:08:09 +03:00
Roman Khimov
973d39eceb _pkg.dev: drop wire
Nothing interesting left here, thanks. Refs. #307.
2019-08-30 19:45:39 +03:00
Roman Khimov
6767bb5446 transaction: move state test from dev 2019-08-30 19:35:57 +03:00
Roman Khimov
b8adc36e6a transaction: add missing alloc in state decoder
Fixes panic two lines below:
panic: runtime error: index out of range [recovered]
        panic: runtime error: index out of range
2019-08-30 19:34:26 +03:00
Roman Khimov
203aab6a7e transaction: add binary encoding for publish
And expand the test to check for it. Fixes #319.
2019-08-30 19:19:43 +03:00
Roman Khimov
af212f496e transaction: implement encoding for state 2019-08-30 19:13:19 +03:00
Roman Khimov
868c9d6e8c transaction: add miner tx test from dev 2019-08-30 18:53:26 +03:00
Roman Khimov
88a47aeeb4 transaction: move enrollment test from dev into the master 2019-08-30 18:28:12 +03:00
Roman Khimov
aa94ae70b6 transaction: move and adapt test from dev
Slightly increases coverage for transaction package.
2019-08-30 18:23:53 +03:00
Roman Khimov
d6686350ee transaction: auto-generate stringer interface for AttrUsage 2019-08-30 17:44:36 +03:00
Roman Khimov
fb65dd8848
Merge pull request #329 from nspcc-dev/circleci-enable-codecov
circleci: fix codecov integration
2019-08-30 17:27:28 +03:00
Roman Khimov
3495fecc65 transaction: fix DescriptionURL attribute handling
Both dev and master actually did it wrong.
2019-08-30 16:51:18 +03:00
Roman Khimov
383bececb8 circleci: add codecov integration 2019-08-30 16:44:51 +03:00
Roman Khimov
d0c39a561c
Merge pull request #328 from nspcc-dev/drop-redundant-dev-code-part-4
Drop redundant dev code part 4.

The next one in series of #315, #318 and #322. Continuing with #307. Fixes #173 along the way.
2019-08-30 15:43:18 +03:00
Roman Khimov
055616a18d _pkg.dev: drop zero-payload mmempool and mverack from payload, useless 2019-08-30 13:34:55 +03:00
Roman Khimov
a5566841fe _pkg.dev: drop useless mgetdata from payload 2019-08-30 13:15:20 +03:00
Roman Khimov
e72a8bbecd network: decode CMDGetData the same way as CMDInv
As they're the same wrt the payload.
2019-08-30 13:14:12 +03:00
Roman Khimov
db39149b3d _pkg.dev: drop mgetaddr "implementation"
It has no real payload, so all of this is just useless.
2019-08-30 11:46:39 +03:00
Roman Khimov
45d94ee8c6 _pkg.dev: drop mblock wrapper
No use for us.
2019-08-30 11:42:25 +03:00
Roman Khimov
17679c3b94 core: add block test from dev branch
And drop it from _pkg.dev. Adapted for master.
2019-08-30 11:41:10 +03:00
Roman Khimov
683424cce8 transaction: implement proper Size() everywhere
Will be needed for the block test from `dev`.
2019-08-30 11:41:10 +03:00
Roman Khimov
200cce9f02 transaction: fix Size() calculation for attribute
It wasn't accounting for attr.Data length properly.
2019-08-30 11:41:10 +03:00
Roman Khimov
8ececdc9a7 transaction: fix invocation decoding for different versions
Quick fix similar to abc5833853 + uncomment the
test case for it.

Closes #173.
2019-08-30 11:41:10 +03:00
Roman Khimov
2ef2c0b84c transaction: properly print number in attribute log msg 2019-08-30 11:41:10 +03:00
Roman Khimov
c093f070d3 core: add EncodeBinary() support for the block 2019-08-30 11:41:10 +03:00
Roman Khimov
0ff38e9645 _pkg.dev: drop blockbase from payload
Duplicated in core.
2019-08-30 11:41:10 +03:00
Roman Khimov
e03eac9dcc payload: move one test from dev for inventory
And drop it from the _pkg.dev.
2019-08-30 11:41:10 +03:00
Roman Khimov
6cf74e2d83 payload: fix wrong stringer impl for InventoryType 2019-08-30 11:41:10 +03:00
Roman Khimov
f636bb9b6e payload: extend headers test, add limit
... from _pkg.dev and drop headers parsing there.
2019-08-30 11:41:10 +03:00
Vsevolod
5979bcf4b6
Merge pull request #325 from nspcc-dev/origin/fix_config_cli
Fix config for neo go cli
2019-08-30 11:40:58 +03:00
Vsevolod Brekelov
b43b4497cc Fix config for RPC port and default configPath 2019-08-30 11:22:11 +03:00
Vsevolod Brekelov
223084925a Fix for node run in docker introduced in a3890910f2 2019-08-30 11:21:39 +03:00
Roman Khimov
01e2f32e47 _pkg.dev: drop mgetheaders from payload
Refs. #307.
2019-08-29 21:23:57 +03:00
Roman Khimov
2d94a1e337 network: add getblocks message parsing
It has identical structure to the `getheaders`.
2019-08-29 21:23:57 +03:00
Roman Khimov
b5813efb29 _pkg.dev: drop mgetblocks code 2019-08-29 21:23:57 +03:00
Roman Khimov
9d8024a9dd _pkg.dev: drop address payload implementation
Refs. #307.
2019-08-29 21:23:57 +03:00
Roman Khimov
01c96fbc50 payload: improve address test
Check that the structure has proper values stored.
2019-08-29 21:23:57 +03:00
Roman Khimov
26eee620ec _pkg.dev: drop version from payload
Nothing new for us here.
2019-08-29 21:23:57 +03:00
Roman Khimov
650a1d4bcc payload: expand version test with explicit data checks 2019-08-29 21:23:57 +03:00
Roman Khimov
2e3172f8a5 payload: fix tests to use asserts
Like in 483b875f4a.
2019-08-29 21:23:57 +03:00
Roman Khimov
c949d2ec53 payload: fix Size() calculation for version
UserAgent is variable-length-encoded. Fix associated test.
2019-08-29 21:23:57 +03:00
Roman Khimov
fac87c7b87
Merge pull request #320 from nspcc-dev/origin/fix_decodeTX_179
Fix Decode PublishTX bug, closes #179.
2019-08-29 19:18:19 +03:00
Vsevolod Brekelov
abc5833853 transaction: add version check for publish
-Version check done before reading NeedStorage flag
-Add testify according to review
2019-08-29 19:14:22 +03:00
Roman Khimov
0f4a6a7830
Merge pull request #327 from nspcc-dev/circleci-binary-artifact
circleci: add artifact store for the binary
2019-08-29 19:12:43 +03:00
Roman Khimov
1af46d6637 circleci: add artifact store for the binary 2019-08-29 18:51:27 +03:00
Roman Khimov
e93a2192b1
Merge pull request #324 from nspcc-dev/fix-circleci-workflow-version
Fix CircleCI workflows to work and Docker image to build in CircleCI.
2019-08-29 16:17:57 +03:00
Roman Khimov
ed6075e4ba Dockerfile: use gomod to fix build failures
---> Running in 0e7bb4ca4583
+ export 'GOGC=off'
+ export 'GO111MODULE=on'
+ export 'CGO_ENABLED=0'
+ export 'LDFLAGS=-X /config.Version=0.5.0-pre-40-gb8ad012'
+ go build -v '-mod=vendor' -ldflags '-X /config.Version=0.5.0-pre-40-gb8ad012' -o /go/bin/neo-go ./cli/main.go
build command-line-arguments: cannot load github.com/go-redis/redis: open /neo-go/vendor/github.com/go-redis/redis: no such file or directory
The command '/bin/sh -c set -x     && export GOGC=off     && export GO111MODULE=on     && export CGO_ENABLED=0     && export LDFLAGS="-X ${REPO}/config.Version=${VERSION}"     && go build -v -mod=vendor -ldflags "${LDFLAGS}" -o /go/bin/neo-go ./cli/main.go' returned a non-zero code: 1
make: *** [Makefile:19: image] Error 1
Exited with code 2
2019-08-29 16:13:32 +03:00
Roman Khimov
b8ad0125b6 Dockerfile: add GO111MODULE export
Maybe fixes this one:
 ---> Running in 3b964b007f22
+ export 'GOGC=off'
+ export 'CGO_ENABLED=0'
+ export 'LDFLAGS=-X /config.Version=0.5.0-pre-39-ga168f09'
+ go build -v '-mod=vendor' -ldflags '-X /config.Version=0.5.0-pre-39-ga168f09' -o /go/bin/neo-go ./cli/main.go
build command-line-arguments: cannot load github.com/go-redis/redis: open /neo-go/vendor/github.com/go-redis/redis: no such file or directory
The command '/bin/sh -c set -x     && export GOGC=off     && export CGO_ENABLED=0     && export LDFLAGS="-X ${REPO}/config.Version=${VERSION}"     && go build -v -mod=vendor -ldflags "${LDFLAGS}" -o /go/bin/neo-go ./cli/main.go' returned a non-zero code: 1
make: *** [Makefile:19: image] Error 1
2019-08-29 16:10:28 +03:00
Roman Khimov
a168f09ac4 Makefile: drop deps from image dependencies
Docker builds shouldn't run go here to avoid CircleCI failures like this:

make: go: Command not found
make: *** [Makefile:32: deps] Error 127
Exited with code 2
2019-08-29 16:07:33 +03:00
Roman Khimov
a3890910f2 Dockerfile: use neo-go for binary name
Be consistent with Makefile (see 3dfb1189f2).
2019-08-29 16:07:33 +03:00