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
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
Roman Khimov
6964d86347
circleci: fix make target name for Docker image
2019-08-29 15:48:05 +03:00
Roman Khimov
1871040de6
circleci: fix workflow version
...
Only version 2 is supported at the moment as per
https://circleci.com/docs/2.0/configuration-reference/#version-1
Not to confuse with top-level version which really can be 2.1.
2019-08-29 15:44:39 +03:00
Roman Khimov
c6d7ef2de4
Merge pull request #322 from nspcc-dev/drop-redundant-dev-code-part-3
...
Drop redundant dev code part 3, refs. #307 , #315 and #318 .
2019-08-29 15:04:05 +03:00
Roman Khimov
4f23117d32
payload: fix wrong useragent parsing in version
...
C# code reads is as a proper variable-length string, so it's not limited to
252 bytes.
2019-08-29 13:42:16 +03:00
Roman Khimov
7b46f9bb86
util: add error check to Read/WriteVarUint
...
Fixes possibility of bogus reads/writes. Suggested by @im-kulikov.
2019-08-29 13:26:03 +03:00
Vsevolod
27558c89f7
Merge pull request #323 from nspcc-dev/make-config-fixes
...
Make & config fixes
2019-08-29 13:23:09 +03:00
Roman Khimov
6647317680
config: drop BuildTime support, make builds reproducible
...
Nobody cares, really. But we care about build being reproducible, one source
tree corresponds to one binary with one checksum.
2019-08-28 22:09:36 +03:00
Roman Khimov
3dfb1189f2
Makefile: fix binary name to be consistent
...
And return back to using `neo-go` as the binary name because it's not just a
node implementation, neo-go is capable of much more functionality.
2019-08-28 22:05:55 +03:00
Roman Khimov
15311f202b
util: drop io, reuse its tests for binaryRW
2019-08-28 19:45:17 +03:00
Roman Khimov
eba83a0e31
smartcontract: use new binaryReader/Writer API from util
2019-08-28 19:45:17 +03:00
Roman Khimov
361724a33e
pkg/core: use util.binaryReader/Writer
...
Simplify error handling.
2019-08-28 19:45:17 +03:00
Roman Khimov
459542a978
pkg/network: convert to using binaryReader/Writer
2019-08-28 19:45:17 +03:00
Roman Khimov
07096a551b
util: move strange Read2000Uint256Hashes() into storage
...
It's the only user of it.
2019-08-28 14:38:57 +03:00
Roman Khimov
672668b9fb
util: use more consistent and explicit naming for BR/BW
2019-08-28 13:24:06 +03:00
Roman Khimov
ad2cd15c6c
_pkg.dev: drop the last wire/util code
...
SumSHA256() and ReaderToBuffer() are not used, CalculateHash() shouldn't be
used and BufferLength() is just to easy with only one user.
2019-08-28 13:09:03 +03:00
Roman Khimov
6409cc753c
util: move binaryReader/Writer from _pkg.dev
...
These are useful and nice.
2019-08-28 12:44:23 +03:00
Roman Khimov
a436e22ec1
pkg/network: sort messages
...
Just for convenience.
2019-08-27 20:12:01 +03:00
Roman Khimov
0f265a6a04
_pkg.dev: drop wire/command
...
Transferring some missing commands to pkg/network.
2019-08-27 20:08:48 +03:00
Roman Khimov
e89e78159b
_pkg.dev: drop wire/protocol package
...
Move service definitions from it into version (just to save them), but other
than that it's useless for master that has configs ruling the networks.
2019-08-27 19:56:12 +03:00
Roman Khimov
2cb9a4a251
Merge pull request #318 from nspcc-dev/drop-redundant-dev-code-part-2
...
Drop redundant dev code part 2, refs. #307 .
2019-08-27 17:50:16 +03:00
Roman Khimov
2a8e420608
nep2: fix comment, NEP-2 is about keys, not wallets
2019-08-27 17:47:07 +03:00
Roman Khimov
5836ae6873
keys: change Signature() and Address() to not return errors
...
As they never can return any real one.
2019-08-27 17:46:01 +03:00
Roman Khimov
483b875f4a
keys: simplify tests with assert package
2019-08-27 17:46:01 +03:00
Roman Khimov
b77e533d13
crypto/wallet: move public/private key into the new keys package
...
And drop associated _pkg.dev remnants (refs. #307 ).
Original `dev` branch had two separate packages for public and private keys,
but those are so intertwined (`TestHelper` subpackage is a proof) that it's
better unite them and all associated code (like WIF and NEP-2) in one
package. This patch also:
* creates internal `keytestcases` package to share things with wallet (maybe
it'll be changed in some future)
* ports some tests from `dev`
* ports Verify() method for public key from `dev`
* expands TestPrivateKey() with public key check
2019-08-27 17:45:51 +03:00
Roman Khimov
b19190b32f
_pkg.dev: drop crypto/elliptic
...
It's the same implementation that we have in pkg/crypto (based on
https://github.com/vsergeev/btckeygenie ) but with tests preserved. I don't see
any reason to port tests from it because even the pkg/crypto copy should go
away to fix #245 .
2019-08-27 17:09:24 +03:00
Roman Khimov
2275b9e4ad
_pkg.dev: drop address pkg, move test into crypto
...
address wrappers don't seem to fit well into master's code, so just drop 'em,
but pick the testing function with good known input/output pair.
2019-08-27 17:09:24 +03:00
Roman Khimov
d7701fe7db
_pkg.dev: drop util/ip package
...
It's an unneccessary kludge, master gets its IP from config and that's it.
2019-08-27 17:09:24 +03:00
Roman Khimov
5938ebb85b
_pkg.dev: drop util/io package
...
Unused.
2019-08-27 17:09:24 +03:00
Roman Khimov
10d5605166
_pkg.dev: drop Checksum package
...
Duplicates hash.Checksum slightly and doesn't seem to fit into master
well.
2019-08-27 17:09:24 +03:00