Skip to content

Releases: nspcc-dev/neo-go

Cotransduction

19 Feb 13:28
Compare
Choose a tag to compare

This is the first release than can successfully operate as a Testnet CN
bringing with it fixed voting system implementation, policying support and
other related fixes. It also contains RPC improvements and updates to the
compiler.

New features:

  • Go smart contracts can now use variables for struct fields initialization
    (#656)
  • for range loops support in the compiler (#658)
  • subslicing support for []byte type (#654)
  • block's storage changes dump support similar to NeoResearch's storage audit
    (#649)
  • gettxout RPC method support (#345)
  • getcontractstate RPC method support (#342)
  • getstorage RPC method support (#343)
  • GetChangeAddress function in the wallet (#682)
  • basic policying was implemented allowing to configure
    MaxTransactionsPerBlock, MaxFreeTransactionsPerBlock,
    MaxFreeTransactionSize and FeePerExtraByte (#682)

Behaviour changes:

  • consensus process now only start when server sees itself synchronized with
    the rest of the network (see (*Server).IsInSync method, #682)
  • default testnet and mainnet configurations now contain policer settings
    identical to default SimplePolicy C# plugin (#682), privnet is not changed

Improvements:

  • keys.PublicKey now has Cmp method available (#661)
  • core now exports UtilityTokenID and GoverningTokenID functions (#682)
  • miner transactions generated by consensus process now properly set outputs
    based on block's transactions fees (#682)
  • (*Blockchain).IsLowPriority now takes fee (Fixed8) as an input (#682)
  • mempool's GetVerifiedTransactions and TryGetValue now also return
    transaction's fee
  • DBFT logging was improved
  • keys package no longer has Signature methods, they were replaced with more
    useful GetScriptHash (#682)

Bugs fixed:

  • compiler produced wrong code if there was some data containing byte 0x62 in
    the program (#630)
  • answer to the getblock RPC method was not following the specification in
    multiple places (#659)
  • State transaction's descriptors were not encoded/decoded correctly (#661)
  • keys.PublicKeys slice was not decoded properly (#661)
  • 'Registered' descriptor of State transaction was not decoded correctly
    (#661)
  • voting processing and validators election was fixed to follow C#
    implementation (#661, #512, #664, #682)
  • deadlock in network subsystem on disconnect (#663)
  • RPC answers with transactions were not following the specification in fields
    names (#666)
  • segmentation fault when checking references of bad transactions (#671)
  • getassetstate and getrawtransaction RPC methods were not returning
    error properly when missing asset or transaction (#675)
  • consensus RecoveryMessage encoding/decoding wasn't correct (#679)
  • DBFT was not reinitialized after successful chain update with the new block
    received from other peers (#673)
  • DBFT timer was extended too much, not following the C# implementation (#682)

Confabulation

11 Feb 15:26
Compare
Choose a tag to compare

Bugfix and small refactoring release, though it's the first one to include
improved CHECKMULTISIG implementation that is ~20% faster.

Improvements:

  • parallel CHECKMULTISIG implementation improving this instruction speed by
    around 20% (#548)
  • bytecode emitting functions moved to separate package, avoiding old
    duplicate code and improving testing (#449, #534, #642)
  • AppCall interop now accepts variable number of arguments (#651)
  • more logging and info level from consensus subsystem, following neo-cli
    behaviour

Bugs fixed:

  • compiler-emitted integers were using wrong format (#642)
  • FreeGasLimit configuration set to zero was not really disabling gas limits
    (#652)
  • stale disconnected peers could cause networking subsystem deadlock (#653)
  • transaction reverification (on new block processing) could lead to
    blockchain deadlock for non-standard verification contracts (#655)

Contextualization

07 Feb 13:53
Compare
Choose a tag to compare

Exactly one bug fixed relative to the 0.72.0:

  • testnet synchronization failed at block 713985 because of wrong
    notification generated by the invocation transaction (#650)

Crystallization

06 Feb 18:39
Compare
Choose a tag to compare

Starting at the end of the year 2019 we've spent a lot of effort to
stress-test our node with transaction load and this allowed us to uncover
some problems in various parts of the system. This release addresses all of
them and brings with it updated networking, consensus and mempool components
that can handle quite substantial transaction traffic and successfully produce
new blocks while being stressed. There are also important updates in VM that
fix incompatibilities with C# node and interesting improvements in compiler
based on our experience porting neofs smart contract to Go.

New features:

  • dump command for wallet to dump it (replaced non-functional open
    command, #589)
  • support for single-node consensus setup (#595)
  • ping/pong P2P messages are now supported with PingInterval and PingTimeout
    configuration options (#430, #610, #627, #639)
  • VM now fully supports calculating GAS spent during execution (#424, #648)
  • Fixed8 type now supports YAML marshalling (#609)
  • RPC invoke* calls can now be GAS-limited with MaxGasInvoke configuration
    option (#609)
  • gas limit for free invocation transactions can now be configured with
    FreeGasLimit option which default to 10.0 for mainnet and testnet (#609)
  • new compiler interop VerifySignature to verify ECDSA signatures (#617)
  • compiler now supports loops with single condition (no init/post, #618)
  • memory pool size is now configurable with MemPoolSize option which defaults
    to 50000 for all configurations (#614)
  • support for variables in slice literals in the compiler (#619)
  • support for map literals in the compiler (#620)
  • AppCall interop function (#621)
  • string to []byte conversion was implemented in the compiler (#622)
  • Docker images now contain a dump of 1600 blocks for single-node setups and
    one can choose which dump to use for restore with ACC environment variable
    (#625)
  • switch statement support in the compiler (#626)
  • panic support in the compiler (#629)

Behaviour changes:

  • NEP2Decrypt function in keys package now returns a pointer to PrivateKey
    rather than a WIF-encoded string (#589)
  • DecryptAccount function in wallet package was moved to Decrypt method of
    Account (#589)
  • logging was moved from logrus to zap which changed messages format a little
    (#284, #598)
  • Block, BlockBase and Header structures were moved into their own block
    package (#597)
  • MemPool was moved into its own mempool package (#597)
  • Sign method of PrivateKey no longer returns an error (#604)
  • wallet is now compatible with C# node wallets (#603)
  • consensus service now gets its keys from the wallet file instead of
    plain-text WIF in the configuration (#588)
  • image Makefile target was updated to nspccdev repo (#625)
  • serializing invalid Transaction structures (that have no Data) is now
    forbidden (#640)
  • Item is no longer exposed by the mempool package (#647)

Improvements:

  • better testing of keys, wallet, compiler and mempool packages (#589, #568,
    #647)
  • smart use of previous proposal for block generation after dBFT's ChangeView
    (#591)
  • peer-server interaction refactored (#606)
  • peer message queues were introduced with different priorities reducing
    delays in consensus messages delivery and improving unicast communication
    (#590, #615, #639)
  • more efficient code generated by the compiler in some cases (#626, #629,
    #637)
  • mempool redesign leading to better performance (#647), it also doesn't
    store unverified transactions now

Bugs fixed:

  • consensus service was not really requesting transactions from peers when it
    was missing some locally (#602)
  • build failing with newer rfc6979 package (#592)
  • wrong integer serialization/deserialization in VM leading to
    inconsistencies in state with C# node (#501/#605)
  • consensus service was not processing node election results to
    enable/disable dBFT (#603)
  • in some cases peers were not unregistered after disconnect (#606)
  • different execution results with C# node because of missing invocation fee
    calculations (#607)
  • RPC server now properly returns the amount of gas spent during execution
    for invoke* calls (#609)
  • FromAddress interop was translated improperly by the compiler (#621)
  • compiler emitting wrong integers (#624)
  • EOF errors on recovery consensus messages decoding (#632)
  • wrong handling of assignments to underscore variable in the compiler (#631)
  • wrong answers to getunspents/getaccountstate RPC requests for unknown
    addresses (#633)
  • multiple dBFT issues leading to consensus stalls, attempts to add wrong
    block to the chain, message processing using wrong height and other
    problems (#635, #641)
  • duplicate connections were not detected before the handshake completion
    which can happen too late (#639)
  • attempts to connect to peer that has already connected to node (#639)
  • unregistration of connected addresses (#639)
  • ArrayReverse function was not copying arrays of size 1 (#644)
  • race in transaction verification/addition to the mempool leading to
    potential double spends (#647)
  • wrong concurrent attempts to add new block to the chain (#647)
  • blocks were not relayed properly by non-consensus nodes (#647)
  • mempool memory leak (#647)
  • missing reverification after block acceptance for transactions in mempool
    (#647)

Celebration

30 Dec 15:24
Compare
Choose a tag to compare

Version 0.71.0 ends the year 2019 of neo-go development with a solid release
that adds support for pprof, implements all missing interoperability
functions, improves performance and as usual fixes some bugs. This is also the
first release with a test coverage of more than 60% which is a significant
milestone in our trend to improve code quality and testing. Back in August
2019 when NSPCC had started neo-go developement the project only had a
coverage of 45% and even though a lot of code has been added since we're
improving this metrics with every release.

New features:

  • pprof support (disabled by default, #536)
  • compiler now supports assignments to an element of slice using variable
    index (#564)
  • hashed 4-byte IDs support for SYSCALL instruction (#565)
  • remainder ('%') operator support in compiler (#563)
  • Neo.Witness.GetVerificationScript and Neo.InvocationTransaction.GetScript
    interop functions (#421)
  • Neo.Iterator., Neo.Enumerator. and Neo.Storage.Find interops (#422)
  • tuple return support in compiler (#562)
  • getblocks P2P command implementation (#577)

Behaviour changes:

  • db dump command now also writes the block number zero by default to
    comply with ImportBlocks format (#582)
  • skip parameter was renamed to start in the db dump command (#582)
  • db restore now skips the genesis block in the dump if starting to import
    into the new DB and if this block matches the one generated on blockchain
    init (#582)

Improvements:

  • VM optimizations (#558, #559, #565, #572)
  • top block caching in core to improve dApps performance (#572)
  • transaction's TXType can now be JSON-unmarshalled (#575)
  • crypto package no longer exports AES functions (#579)
  • merkle tree functions and structures were moved into the hash package
    (#579)
  • base58 functionality was moved into its own package from crypto (#579)
  • Uint160DecodeAddress and AddressFromUint160 functions were moved out of
    crypto into their own package (#579)
  • address package now can be configured to use different prefixes (#579)

Bugs fixed:

  • wrong INVERT instruction behaviour for converted values (#561)
  • wrong DUP behaviour when the next instruction doesn't convert the value
    (#561)
  • OVER and PICK implementations didn't properly duplicate stack items (#561)
  • PICKITEM instruction failed to duplicate picked items (#561)
  • getblock RPC call was not answering with full hex-encoded block (#575)
  • base58.CheckDecode was decoding values with leading zeroes in a wrong way
    (#579)
  • decoding wrong public key could succeed (#579)
  • consensus payload verification was inconsistent with other verification
    code (#555)
  • DB dump was using wrong format in release 0.70.1 (#582)
  • DB restorer was not properly counting skipped blocks which could lead to
    bogus error being reported (#582)
  • the DB was not closed properly on error during DB restore (#582)
  • NPE in consensus (#583)

Centrifugation

16 Dec 09:37
Compare
Choose a tag to compare

Release 0.70.1 brings no new functionality focusing on internal node
improvements instead. Some bugs were fixed, refactoring was done and
performance was improved substantially.

Behaviour changes:

  • as with the previous release, this one changes the database format, so you
    need to resynchronize your nodes
  • code testing will fail if you're not to checkout submodules (we have one
    with neo-vm tests, #543)

Improvements:

  • "inv" command handling was changed to not ask peers of the items we already
    have (#533)
  • numerous optimizations across the whole system (#535, #546, #547, #545,
    #549, #550, #553, #554, #556, #557)
  • compiler no longer outputs errors by itself, passing them programmatically
    instead via its API (#457)
  • VM opcodes were moved into their own package allowing wider reuse (#538)
  • compiler package was moved one level up from pkg/vm/compiler to
    pkg/compiler (#538)
  • proper script trigger constants were added (#509)
  • consensus payloads are now properly signed and this signature is being
    checked (#544)
  • Uint160/Uint256 types were made more consistent and having an explicit
    LE/BE suffix for conversion functions (#314)
  • a separate layer based on storage.Store with state item-specific functions
    was created (#517, #334)
  • ReadBytes/WriteBytes in io package were renamed into
    ReadVarBytes/WriteVarBytes to more accurately describe them and be more
    consistent with C# implementation (#545)
  • io package was refactored to add type-specific read/write methods to its
    structures and remove generic (slow) ReadLE/WriteLE (#553, #554)
  • a simple tx performance benchmark was added (#551)

Bugs fixed:

  • consensus could start and stall with not-yet-connected peers (#532)
  • nil pointer dereference in PrepareResponse and PrepareRequest messages
    handling (#532)
  • fatal error because of locking problems in mempool (#535)
  • missing error handling in compiler emitter functions (#297)
  • wallet opening command now hides the password printed into it (#539)
  • storage was updated improperly when several transactions in one block were
    touching the same keys, leading to subsequent transactions failures (#542)
  • application execution results were not saved in full (#517)
  • mempool transaction verification was wrong (#557)

Constellation

29 Nov 17:48
Compare
Choose a tag to compare

This is a long-awaited and exciting release implementing a full Neo
consensus node that you can run your own neo-go private net with! It also
brings with it serious improvements in contract handling, you can now not
only compile, but also deploy and invoke contracts with neo-go.

New features:

  • systemd unit file for deployment (#326)
  • claim transactions processing was added (#489)
  • Consensus payloads decoding/encoding (#431)
  • getunspents method is RPC server (#473)
  • updated docker-compose environment for privnet setup (#497, #529)
  • client-side getunspents RPC method support (#511)
  • contract deployment from the CLI (#474)
  • enrollment and state transactions processing (#508)
  • Neo.Blockchain.GetValidators interop support (#420)
  • invokefunction RPC method support in the server (#347)
  • testinvokefunction command in the CLI to do test invocations via
    invokefunction RPC method (#521)
  • consensus node support (#507, #525)
  • server-side invoke RPC method support (#346)
  • testinvoke CLI command to invoke contracts via invoke RPC method (#527)
  • getheaders P2P message processing (#529)
  • relaying was added for transactions coming from P2P network (#529)
  • invoke and invokefunction commands to invoke deployed script and send an
    invocation transaction to the network (#531)

Behavior changes:

  • db dump/restore format is now compatible with NGD chain dumps (#466)
  • smart contracts now have a new configuration format that is used to deploy
    them (#511)
  • testinvoke CLI command was renamed to testinvokescript (#521)

Improvements:

  • core.Blockchainer interface now has a Close method (#485)
  • util.Uint256Size is now public (#490)
  • io package now has generic functions for array
    serialization/deserialization (#490)
  • util.Uint256 now supports io.Serializable interface (#495)
  • smartcontract.ParamType type now supports io.Serializable interface
    (#495)
  • vm.ByteArrayItem now uses hex representation when being marshalled into
    JSON (#499)
  • io serialization/deserialization for arrays is now restricted in elements
    count (#503, #505)
  • core.AccountState now stores all UTXOs for the account (#504)
  • interop functions got some testing coverage (#492)
  • rpc client now implements CalculateInputs method via getunspents call
    for transaction building (#511)
  • transaction.NewInvocationTX now accepts a gas parameter for the
    corresponding transaction field (#511)
  • rpc.StackParamType now supports YAML marshaling/unmarshaling
  • rpc package now has more fine-grained methods for transaction building
    (#511, #531)
  • Blockchain now stores and updates validators list (#508)
  • blockchain state management refactored (#508)
  • rpc invocation parameter management reworked (#513)
  • util test coverage improved (#515)
  • invokescript tests were added to the rpc package (#521)
  • crypto/keys and crypto/hash packages test coverage improved (#516)

Bugs fixed:

  • blockchain not persisting the latest changes on exit (#485)
  • db dump/restore commands incorrectly handled skip parameter (#486)
  • vm failed to serialize duplicating non-reference elements (#496)
  • improper smartcontract notifications handling (#453)
  • nondeterministic GetReferences interop behaviour leading to contract
    failures (#454)
  • writing message to the peer could be interleaved with other messages
    leading to garbage being sent (#503, #506)
  • inability to process block with previously relayed transaction (#511)
  • decoding transaction with invalid type didn't return an error (#522)
  • attempts to reconnect to the node with the same ID (#507)
  • peer disconnects during handshake because of code race (#529)
  • useless header requests from peers with low height (#529)
  • wrong header hashes initialization from the DB in case there are 2000*N + 1
    blocks in the chain (#529)

Commotion

07 Nov 14:27
Compare
Choose a tag to compare

Release 0.62.0 finishes one very important work some pieces of which were
gradually rolled out in previous releases --- it integrates all neo-vm project
JSON-based tests for NEO 2.0 C# VM and runs them successfully against neo-go
VM. There are also important bug fixes based on mainnet nodes deployment
experience and additional configuration options.

New Features:

  • implemented Runtime.Serialize and Runtime.Deserialize syscalls (#419)
  • new configuration option -- AttemptConnPeers to set the number of
    connections that the node will try to establish when it goes below the
    MinPeers setting (#478)
  • LogPath configuration parameter to write logs into some file and not to
    stdout (#460), not enabled by default
  • Address configuration parameter to specify the address to bind to (#460),
    not enabled by default

Behavior changes:

  • mainnet configuration now has correct ports specified (#478)
  • multiple connections to the same peer are disallowed now (as they are in C#
    node (#478))
  • the default MaxPeers setting was increased to 100 for mainnet and testnet
    configurations and limited to 10 for privnet (#478)

Improvements:

  • implemented missing VM constraints: stack item number limitation (#462) and
    integer size checks (#484, #373)
  • added a framework to run JSON-based neo-vm tests for C# VM and fixed all
    remaining incompabitibilities (#196)
  • added wallet unit tests (#475)
  • network.Peer's NetAddr method was split into RemoteAddr and PeerAddr (#478)
  • MakeDirForFile function was added to the io package (#470)

Bugs fixed:

  • RPC service responded with block height to getblockcount request which
    differs from C# interpretation of getblockcount (#471)
  • getbestblockhash RPC method response was not adding leading 0x prefix
    to the hash, while C# node does it
  • inability to correctly handshake clients on the server side (#458, #480)
  • data race in Server structure fields access (#478)
  • MaxPeers configuration setting was not working properly (#478)
  • useless DB reads (that failed in some cases) on persist attempt that didn't
    persist anything (#481)
  • current header height was not stored in the DB when starting a new
    blockchain which lead to node failures on restart (#481)
  • crash on node restart if no header hashes were written into the DB (#481)

Cuspidation

01 Nov 11:40
Compare
Choose a tag to compare

New features:

  • Prometheus support for monitoring (#441)
  • neo-go contract invoke now accepts endpoint parameter (--endpoint or
    -e) to specify RPC node to be used for invocation (#363)
  • RPC server now supports invokescript method (#348)
  • minimum peers number can now be configured (#468)
  • configured CORS workaround implemented in the RPC package (#469)

Behavior changes:

  • neo-go contract inspect now expects avm files in input, but can also
    compile Go code with -c parameter (previously is was done by default),
    inspect subcommand was removed from neo-go vm (it dumped avm files in
    previous release) (#463)
  • the default minimum peers was reduced to 3 for privnet setups to avoid
    useless reconnections to only 4 available nodes
  • RPC service now has its own section in configuration, update your
    configurations (#469)

Improvements:

  • VM.Load() now clears the state properly, making VM reusable after the Run()
    (#463)
  • Compile() in compiler package no longer accepts Options, they were not used
    previously anyway (#463)
  • invocation stack depth is now limited in the VM (#461)
  • VM got new State() method to get textual state description (#463)
  • vm's Stack structure can now be marshalled into JSON (#463)

Bugs fixed:

  • race in discoverer part of the server (#445)
  • RPC server giving improper (not JSON) respons to unimplemented API requests
    (#463)

Cribration

25 Oct 15:34
Compare
Choose a tag to compare

Release 0.60.0 brings with it an implementation of all NEO 2.0 VM opcodes,
full support for transaction relaying, improved logging, a bunch of fixes and
an updated project logo.

New features:

  • blocks dumping from DB to file and restoring from file to DB (#436)
  • new logo (#444)
  • implemented getdata message handling (#448)
  • issue tx processing (#450)
  • CALL_I, CALL_E, CALL_ET, CALL_ED, CALL_EDT implementation in the VM (#192)

Internal improvements:

  • codestyle fixes (#439, #443)
  • removed spurious prints from all the code, now everything is passed/logged
    correctly (#247)

Bugs fixed:

  • missing max size limitation in CAT and PUSHDATA4 opcodes implementation
    (#435)
  • wrong interpretation of missing unspent coin state when checking for double
    spend (#439)
  • panic on successive node starts when no headers were saved in the DB (#440)
  • NEWARRAY/NEWSTRUCT opcodes didn't copy operands for array<->struct
    conversions
  • deadlock in MemPool on addition (#448)
  • transactions were not removed from the MemPool when processing new signed
    block (#446)
  • wrong contract property constants leading to storage usage failures (#450)