Commit graph

521 commits

Author SHA1 Message Date
Evgeniy Kulikov
f000b76879 [FIX] Formatting and code-style (#118)
* [FIX] Formatting and code-style

- gofmt
- import resort
- prealloc slices
- simplify code

* fix vet
2019-01-25 12:20:35 +01:00
dauTT
1360e1de68 Added rpc unit tests (#107)
* Fixed small incosistencies related to comments and variable name

* For testing purposes we have to move the method newBlockchain from the cli/server/server.go to  pkg/core/blockchain.go. In addition we have to rename it to NewBlockchainLevelDB in order to be able to export it and avoid naming conflicts. In future we still need to think how to switch between different blockchain implementation easily but for the time being this is not possible.

* Added unit tests for the rpc server

* Added unit_testnet chain fixture

* fixed port number

* Added errors handling

* move unit_testnet chain from 'cli/chains' to 'pkg/rpc/chains'
2019-01-22 13:14:52 +01:00
Sathvik Birudavolu
5b57a10250 Fix NEP2Encrypt add Unit Tests (#108)
* fix NEP2 add unit tests

* version update
2018-12-05 12:30:13 +01:00
dauTT
e2f42e92a0 Implemented rcp method GetAssetState (#103)
* Fix missing dot in configPath

* Add rpc GetAssetState method

* Update rpc README.md

* Update version to 0.45.10
2018-11-26 22:12:33 +01:00
suzumi49n
2bc023b7e0 Fix/args config path (#91)
* fix args config path

* update version
2018-07-22 08:46:49 +02:00
Anthony De Meulemeester
931388b687
Cross platform virtual machine implementation (#60)
* Virtual machine for the NEO blockhain.

* fixed big.Int numeric operation pointer issue.

* added appcall

* Added README for vm package.

* removed main.go

* started VM cli (prompt) integration

* added support for printing the stack.

* moved cli to vm package

* fixed vet errors

* updated readme

* added more test for VM and fixed some edge cases.

* bumped version -> 0.37.0
2018-03-30 18:15:06 +02:00
Anthony De Meulemeester
34bd9d31ac
Compiler arrays (#49)
* implemented operation and param flags in the cli invoke cmd.

* reverted prev changes and added debug flag for compiling.

* change transactionType variable to Type, for package convention

* index support for arrays.

* implemented builtin (len) for the compiler.

* bumped version -> 0.35.0

* updated compiler README and changed invoke to testinvoke.
2018-03-25 18:21:00 +02:00
Anthony De Meulemeester
94672cb9cc
Persistance (#53)
* added publish TX for backwards compat.

* lowered the prototick for faster block syncing

* print useragent on startup

* added createMultiRedeemScript for genesis block generation.

* building genesis block from scratch.

* implemented merkle tree.

* starting blockhain with generated genesis hash

* Fixed bug in unspent coin state.

* fixed broken tests after genesis block.

* removed log line.

* bumped version -> 0.34.0
2018-03-25 12:45:54 +02:00
Steven Jack
19a430b262 RCP server (#50)
* Adds basic RPC supporting files

* Adds interrupt handling and error chan

* Add getblock RPC method

* Update request structure

* Update names of nodes

* Allow bad addresses to be registered in discovery externally

* Small tidy up

* Few tweaks

* Check if error is close error in tcp transport

* Fix tests

* Fix priv port

* Small tweak to param name

* Comment fix

* Remove version from server

* Moves submitblock to TODO block

* Remove old field

* Bumps version and fix hex issues
2018-03-23 21:36:59 +01:00
Anthony De Meulemeester
a67728628e
Persist blockchain with leveldb on disk (#48)
* Created test_data folder with block json files for testing + create separate file for block base.

* Fixed bug in WriteVarUint + Trim logic + unit tests

* Refactored store and add more tests for it.

* restore headerList from chain file

* Fix tx decode bug + lots of housekeeping.

* Implemented Node restore state from chain file.

* Created standalone package for storage. Added couple more methods to Batch and Store interfaces.

* Block persisting + tests

* bumped version -> 0.31.0
2018-03-17 12:53:21 +01:00
Steven Jack
b41e14e0f0 Server configuration (#43)
* Adds struct for config settings

* Bumps version

* Move settings around

* Only push version tag up not whole branch as well

* Move config into own path and add test and main nets

* Update config for timeouts

* Convert to yaml
2018-03-15 21:45:37 +01:00
Anthony De Meulemeester
aa4bc1b6e8
Node improvements (#47)
* block partial persist

* replaced refactored files with old one.

* removed gokit/log from deps

* Tweaks to not overburden remote nodes with getheaders/getblocks

* Changed Transporter interface to not take the server as argument due to a cause of race warning from the compiler

* started server test suite

* more test + return errors from message handlers

* removed --race from build

* Little improvements.
2018-03-14 10:36:59 +01:00
Anthony De Meulemeester
4023661cf1
Refactor of the Go node (#44)
* added headersOp for safely processing headers

* Better handling of protocol messages.

* housekeeping + cleanup tests

* Added more blockchain logic + unit tests

* fixed unreachable error.

* added structured logging for all (node) components.

* added relay flag + bumped version
2018-03-09 16:55:25 +01:00
Anthony De Meulemeester
b2a5e34aac
RPC client (#42)
* Started RPC package to allow querying balances and sending raw transactions for sc's

* integrate invoke cmd in cli

* bumped version

* added sendrawtransaction to the rpc client.
2018-03-05 09:53:09 +01:00
Anthony De Meulemeester
f3f6662fc9
Base wallet implementation (#35)
* Initial draft of the neo-go wallet

* Cleanup + more test for util package

* integrated wallet into neo-cli partially

* base wallet implementation + smartcontract code.
2018-03-02 16:24:09 +01:00
Pawan Rawal
e93dfe8062 Better error messages (#24)
* Print proper error messages while using contract subcommands and also exit with status code 1.

* Make -in a flag, also remove dot from avm extension.

* Work on feedback by Anthony.

* Update README and VERSION
2018-02-24 10:10:45 +01:00
Anthony De Meulemeester
8fe079ec8e
Update compiler (#22)
* refactor to use ast.Walk for recursive converting
* added lots of test cases
* added a new way to handle jump labels
* function calls with multiple arguments
* binary expression (LOR LAND)
* struct types + method receives
* cleaner opcode dumps, side by side diff for debugging test cases
2018-02-19 10:24:28 +01:00
Anthony De Meulemeester
b257a06f3e
Compiler update (#21)
* added seperate folders for cmd packages.

* Fix netmodes in test + reverse bigint bytes

* glide get deps

* add, sub, mul, div

* booleans

* strings

* binary expressions

* if statements

* function calls

* composite literals (slice, array)

* Added lots of test cases and update readme.
2018-02-15 16:35:49 +01:00
Anthony De Meulemeester
f7d57e4e49
VM draft + cli setup (#20)
* updated readme

* added basic cmd.

* added seperate folders for cmd packages.

* Fix netmodes in test + reverse bigint bytes

* glide get deps
2018-02-09 17:08:50 +01:00
Charlie Revett
dd94086a22
CircleCI 2 & Releases (#9) 2018-02-01 10:54:23 -08:00
Charlie Revett
36335e587f
Simplify CLI build process (#7) 2018-02-01 10:06:17 -08:00