Version 1.0 (Testnet & Mainnet)
@ismagin ismagin released this 1 hour ago · 44 commits to master since this release
Hooray! Waves finally reaches version 1.0.0!
Total 3 new features are added to Waves blockchain: Ride4Dapps, OrderV3 and NFT. Please read their descriptions and information on other Waves node updates below.
FEATURE: RIDE 4 DApps
In this release, we introduce RIDE4DApps: the RIDE language and blockchain update. This grants a way to assign programmable functions to an account, which operate state and tokens atomically. To initiate the call, use the new InvokeScriptTransaction. More on that in the More on that in the documentation.
RIDE Language Update
Defining custom functions:
func max(a: Int, b: Int) = if (a > b) then a else b
@Callable(inv) and @Verifier(tx) annotations:
@Callable

func record(x: Int) = {
WriteSet([DataEntry(toBase58String(i.caller.bytes), x])
}
@Verifier(tx)
func verify() = {
false
}
Postfix notation for function calls:
extract(i.payment) can be rewritten as i.payment.extract()
getInteger(account, key) can be simplified to account.getInteger(key)
Compiler now supports directives. These are recommended to be specified at the beginning of DAPP code:
{-# STDLIB_VERSION 3 #-}
{-# CONTENT_TYPE DAPP #-}
{-# SCRIPT_TYPE ACCOUNT #-}
# definitions, callable and verifier functions go here
{-# STDLIB_VERSION 3 #-} brings revamped version of RIDE language standard library. You can explore it in under RIDE section in documentation.
Monitoring tools for InvokeScriptTransaction
To debug results of InvokeScriptTransaction (transfers and state changes) with your node through REST APIs:
GET /debug/stateChanges/info/{transactionId}
GET /debug/stateChanges/address/{address}/limit/{limit}
ensure the following flags are set to true:
waves {
db {
store-transactions-by-address = true
store-invoke-script-results = true
}
}
FEATURE: Non-Fungible Tokens (NFT)
New blockchain feature (13) has been implemented. After activation, new transactions issuing non-reissuable assets with zero decimals and unit quantity will cost 0.001 Waves. There's also a new API endpoint which provides a list of NFTs owned by an address. See /assets/nft/{address}/limit/{limit} documentation in Swagger for mode info. Note that once this feature is activated, /assets/balance/{address} responses will no longer include NFTs.
FEATURE: OrderV3
Supports order fee not only in WAVES, but in assets too
Order now has a new field in JSON: "matcherFeeAssetId"
Node updates
Node Extensions
The new mechanism allows the developers to extend the node functionality by adding custom observers to the internal node state. Extensions are a simple JAR files which are added to the node classpath. Matcher and gRPC server have been refactored into an extension, and there's definitely more to come.
gRPC API
gRPC Server extension allows to access a Waves Node with gRPC instead of classic REST API, using the lang-agnostic protobuf schemes, reworked interfaces and gRPC built-in first-class streaming support. Most of the REST API has been implemented as gRPC services. Please note that gRPC interface is considered experimental, and may (and probably will) change in the future. Read more about gRPC here.
UTX Pool improvements
When a microblock (or a block) is discarded during the rollback, its transactions are returned back to UTX pool without validation. This will eliminate most problems with dependent transactions getting lost.
Miner now limits the amount of time it can take to retrieve (and validate) transactions from UTX pool when mining microblocks.
UTX pool will now pack at least one transaction into a microblock, even if it takes very long to validate. This will prevent miners from mining empty blocks under heavy load.
UTX cleanup will run just once when height changes, not every time a key block is received from multiple peers.
Default Waves directory
Default directory now follows os-specific guidelines:
macOS: $HOME/Library/Application Support/waves-mainnet
Linux: $XDG_DATA_HOME/waves or $HOME/.local/share/waves-mainnet
Windows: %APPDATA%/local/waves-mainnet
When Waves directory is not defined explicitly in a config file or via system property, default paths will include network-specific suffixes, e.g. waves-mainnet or waves-devnet. For custom networks, suffix contains base16-encoded network byte (e.g. waves-custom-FF).
New CLI
The node now comes with just one executable. Debian package installs waves (or waves-${network}) executable. Importer can be launched with the following command lines:
java -jar waves-all-1.0.0.jar import -h 1220000 -c waves.conf -i blockchain.bin
waves import -c waves.conf
Use waves --help for mainnet nodes installed from DEB package and java -jar waves-all.jar --help when running a fat jar. This change will help eliminating conflicts when installing Waves Node and some other third-party forked node.
Other notable changes
/addresses/data/{address} now accepts a regular expression in an optional matches parameter. When provided, the node will return only entries with keys matching the regex.
Logging configuration can now be extended or tweaked incrementally, it no longer requires a complete custom-written logback.xml.
Default setting for metrics have been tweaked, which should reduce memory footprint
Update Notes
No need to rebuild the node storage when updating mainnet node from version 0.16.2 (or 0.16.3). However, if you are updating a testnet node from a pre-RC2 version of 0.17 series, you will need to re-import blockchain.
Voting
RIDE4DAPPS is implemented as Feature 11
Order Version 3 is implemented as Feature 12
NFT is implemented as Feature 13
Please vote!