wavesplatform / gowaves Goto Github PK
View Code? Open in Web Editor NEWGo implementation of Waves node, libraries and tools for Waves blockchain
License: MIT License
Go implementation of Waves node, libraries and tools for Waves blockchain
License: MIT License
Аbstract
Allow the removal of data entries in account's state.
Specification
The 4th version of DataTransaction supports keys with empty data. If user puts a key without data into DataTransaction this keys should be removed from account's state along with existing data.
Specification
Reduce reissue transaction fee to enable cheap reissue of utility tokens.
Аbstract
Is your feature request related to a problem? Please describe.
Yes. wmd v0.3.0 cann't synchronize database from NODE REST API on local node,
and need to raise gRPC server there. What if I use old version of the node???
Also, synchronization is stopped at blocks 1610029 - 1610030.
See the details in this issue: #285
So, need to fix it, in the next versions of wmd.exe
Motivation and Purposes
A clear and concise description of what the problem is. Ex. I'm always frustrated when [I cann't downloading candles and trading history for all trading pairs].
** Specification**
A clear and concise description of what you want to happen.
Describe alternatives you've considered
I want to load candles and orders history for all trading pairs, to display this data in waves-lite client.
I want to do this from my local node, not from remote node, which can go offline at any time.
I want to do this up to end block, without see any errors at blocks 1610029 - 1610030.
Backwards Compatibility
Can your proposition affect any existing features?
No. Just fix this WMD.exe.
Examples and Implementation
Examples of implementation in other projects?
https://marketdata.wavesplatform.com this is working fine, but this is remote server.
Аbstract
Node currently connects to unlimited number of peers.
Motivation and Purposes
Even limited number of connections is enough for node to function securely.
Specification
New config option that specifies the limit of connections should be introduced.
Backwards Compatibility
Backward compatible.
Аbstract
The interpretation of RIDE scripts is slow. The idea is to transpile scripts those already in blockchain into a native Go functions and use them while importing blockchain or while validation of all scripts known at the moment of release.
Motivation and Purposes
To speedup the import and validation of blocks, to reduce the memory footprint of the node.
Specification
Backwards Compatibility
In case of impossibility to transpile a script the existing interpretation will be used.
Specification
Implement new RIDE V4 function to check validity of Merkle root:
createMerkleRoot(merkleProofs: List[Bytes], valueBytes: ByteVector, index: Int): ByteVector
Specification
Implement RIDE function SponsorFee(assetId: ByteVector, minSponsoredAssetFee: Int|Unit)
to produce a Sponsorship action as a result of script invocation. The effect of the action is the same as for Sponsorship transaction.
Parameter | Type | Description |
---|---|---|
assetId | ByteVector | ID of an asset |
minSponsoredAssetFee | Int|Unit | Minimal fee in Waves |
Specification
Minimal fee for Sponsorship transactions should be reduced from 1 Waves to 0.001 Waves.
Аbstract
A gowaves
node knows IP addresses of seed nodes (initial nodes to connect to) from the built-in configuration. Also the initial nodes could be provided by the command line parameter -peers
. It seems better to replace or the built-in seed peers with the DNS record lookup.
Specification
Built-in configuration should support domain names along with seed nodes IP addresses. Those domain names should be resolved to underlying IP addresses and those addresses should be treated as usual seed nodes IP addresses.
The argument of -peers
command line parameter should be parsed the same way as built-in configuration.
Backwards Compatibility
Configuration and -peers
command line parameter should support IP addresses passing for backward compatibility.
Examples and Implementation
Bitcoin operates the same way.
https://github.com/btcsuite/btcd/blob/535f25593d47297f2c7f27fac7725c3b9b05727d/connmgr/seed.go#L33
Specification
In RIDE v4 function wavesBalance(Address|Alias): BalanceDetails
should return BalanceDetails
structure. BalanceDetails
structure consists of 4 fields:
regular
- amount of Wavesavailable
- amount of Waves that can be spent (except leased Waves)effective
- amount of Waves including leased Wavesgenerating
- minimal amount of effective
balance during 1000 last blocksАbstract
New transaction to update description of existing asset.
Motivation and Purposes
To allow users to change name and description of existing asset.
Specification
Transaction ID: 17.
Transaction Name: UpdateAssetInfo.
Protobuf schema: https://github.com/wavesplatform/protobuf-schemas/blob/master/proto/waves/transaction.proto.
Limits:
Describe the bug
There is no flag to disable gRPC server.
To Reproduce
Steps to reproduce the behavior:
./node -state-path /Users/alexeykiselev/gowaves/mainnet
ERROR grpcServer.Run(): net.Listen: listen tcp 127.0.0.1:7475: bind: address already in use
Expected behaviour
The gRPC server should not start without flag.
How should I receive SecretKey & PublicKey, if i have a seed? I'm using the following function:
sk, pk := crypto.GenerateKeyPair([]byte("gospel rule red grit faculty clog happy client concert final weird plastic"))
But sk and pk are not as expected. How can I receive correct sk and pk in this way?
Motivation and Purposes
Now the network scheme from settings is used everywhere. In order to support interoperability with side-chains we have to restore scheme from binary transaction representation.
Аbstract
Add MerkleRootHash of block's transactions.
Motivation and Purposes
Block generator signs only block header which in turn contains a root hash of Merkle tree of all block's transactions. This change allows to verify block without downloading all block's transactions and will be used to develop sidechains.
Specification
The Merkle tree should be build as follows:
hash (hash (hash(L1) + hash(L2)) + hash (hash(L3) + hash(L3))) = Root Hash
Notes:
Specification
Block's TransactionRoot field should be accessible from RIDE scripts.
Аbstract
Now it's validated that the first order in an exchange transaction have to be a BUY order and the second is SELL. Protobuf version of Exchange transactions should support any order of orders in transaction.
gRPC API has many uses, but the most important is to provide API compatibility with Scala
integration tests infrastructure.
In future this will help us to fix problems detected by these integration tests.
RPCs are described in pkg/grpc/proto/*.proto
files.
Generated code is is pkg/grpc
. Server RPCs implementation is in pkg/grpc/server
.
RPCs call node state to retrieve required information (refer pkg/state/api.go
).
github.com/wavesplatform/gowaves/pkg/crypto/internal/groth16/bls12381
....\github.com\wavesplatform\gowaves\pkg\crypto\internal\groth16\bls12381\verifier.go:16:94: cannot use inputs[i] (type *big.Int) as type *bls123
81.Fr in argument to PointG1.MulScalar
Specification
New user function to create Issue
should be implemented in addition to existing Issue
constructor. This new simplified function does not have parameters compiledScript
and nonce
. They a filled with default values Unit
and 0
accordingly.
Issue(name: String, description: String, quantity: Int, decimals: Int, isReissuable: Boolean)
.
New function ID should be introduced:
1090
for simplified function1091
for detailed constructorID Issue
for constructor should not be used.
Specification
Function assetInfo(ByteVector): Аsset|Unit
should return name
and description
fields of an asset.
Аbstract
In order to simplify support and integration use Protobuf as internal data serialisation me framework.
Specification
Use protobuf schemas from protobuf-schemas project to implement BlockV5 and 4th versions of all transactions.
Backwards Compatibility
For backward compatibility implement a new network messages to request and send BlockV5.
Аbstract
Currently the block signature is used as a block ID to reference to. It should be replaced with hash digest of block's header.
** Specification**
Specification
Groth16Verify - a function which can receive {verification key, proof, inputs} as a compressed data and check zk-SNARK by groth16 protocol on the bn254 (bn256) and bls12-381 curves.
Examples and Implementation
Rust implementation:
https://github.com/wavesplatform/zwaves/blob/master/zwaves_jni/src/lib.rs#L39
Specification
Data limits:
Functions:
Naming limits:
Аbstract
To simplify the usage of node's gRPC API enable built-in gRPC reflection server following the instructions.
Motivation and Purposes
For now, the node's gRPC API could be discovered only by downloading and embedding Protobuf schemes in a client application.
Examples and implementations
The examples are available at known implementations page.
Write section about how to setup gowaves
node for mining. How to create and use wallet file.
Аbstract
For more information see WEP9.
Transactions with failed scripts should be stored in blockchain. All transactions with valid sender signature should be stored on blockchain even if it's script execution leads to failure. Fee for storing such transactions should be paid by sender.
Motivation and Purposes
Users of Waves blockchain can do non valid transactions without paying for it. Script execution is resource consuming operation, so transactions with failed scripts should be paid.
Specification
Transaction application should work as follows:
Changes to existing procedure:
Only Invoke and Exchange transactions should be stored if failed.
Backwards Compatibility
The ability to pay fee for DApp execution with funds received in attached payment will be broken.
c,err:=NewClient()
require.NoError(t, err)
block,_,err:=c.Blocks.Last(context.Background())
require.NoError(t, err)
Error: Received unexpected
failed to decode Attachment from JSON Value: zero length string
Specification
Implement new function transferTransactionFromProtoBytes(b: ByteVector): TransferTransaction|Unit
. That should parse Protobuf binary representation of Transfer transaction to its object representation.
Аbstract
Is your feature request related to a problem? Please describe.
Yes. Blockchain too large.
Motivation and Purposes
A clear and concise description of what the problem is. Ex. I'm always frustrated when [I need to download large files and lost the limited traffic].
Specification
A clear and concise description of what you want to happen. Describe alternatives you've considered
I just don't see the option to import the existing blockchain, or read the data inside the blocks from the already runned node. Why I need to download the binary file, to import this, when I already have synchronized blockchain???
Backwards Compatibility
Can your proposition affect any existing features?
I think, WMD can loading the blocks from the runned node, by requests on the NODE REST API,
or read the .ldb
-files in the existing directory of the node, without downloading and store again the binary-file, with full blockchain (33GB).
Examples and Implementation
Examples of implementation in other projects?
https://github.com/PyWaves/WavesDataFeed make the requests on the runned node, to parse data inside the blocks, which are existing there.
Specification
FairPoS implementation limits minimal block interval to 5 seconds, this parameter must be increased to 15 seconds.
Specification
For OrderV4 the price should be calculated as follows:
spendAmount = amountOrderV4 * priceOrderV4 * 10^(priceAssetDecimals - amountAssetDecimals - 8)
Where,
price_asset_id
fieldamount_asset_id
fieldFor Protobuf:
ExchangeTransactionData.amount() * ExchangeTransactionData.price() * 10^(ExchangeTransactionData.Order.AssetPair.price_asset_id().decimals() - ExchangeTransactionData.Order.AssetPair.amount_asset_id().decimals() - 8)
Specification
Implement those functions:
indexOf(list: List[T], element: T): Int|Unit
lastIndexOf(list: List[T], element: T): Int|Unit
containsElement(list: List[T], element: T): Boolean
min(list: List[Int]): Int
max(list: List[Int]): Int
Describe the bug
Executing Node binary on test- or stagenet causes an error.
To Reproduce
Steps to reproduce the behavior:
./node -blockchain-type testnet
Error Message
ERROR failed to open genesis file: open /Users/alexeykiselev/go/src/github.com/wavesplatform/gowaves/pkg/state/genesis/stagenet.json: no such file or directory
Аbstract
Implement the secure, detachable wallet that will be used by node during new blocks generation.
Motivation and Purposes
To enable block generation on node we need a built-in wallet that holds private keys that can be used by miner for block generation. The wallet should have a storage in form of encrypted file.
Specification
Examples and Implementation
Ergo has a detachable wallet that could be created, opened and closed using it's API.
Аbstract
In order to reduce complexity of some heavy RIDE functions make the size limited versions of such functions with various complexity depending on size of arguments.
Specification
Introduce the limited versions of following functions:
Function | Argument Size | Complexity |
---|---|---|
blake2b256_16Kb | 16 KB | 10 |
blake2b256_32Kb | 32 KB | 25 |
blake2b256_64Kb | 64 KB | 50 |
blake2b256_128Kb | 128 KB | 100 |
blake2b256 | Unlimited (150 KB) | 200 |
keccak256_16Kb | 16 KB | 10 |
keccak256_32Kb | 32 KB | 25 |
keccak256_64Kb | 64 KB | 50 |
keccak256_128Kb | 128 KB | 100 |
keccak256 | Unlimited (150 KB) | 200 |
sha256_16Kb | 16 KB | 10 |
sha256_32Kb | 32 KB | 25 |
sha256_64Kb | 64 KB | 50 |
sha256_128Kb | 128 KB | 100 |
sha256 | Unlimited (150 KB) | 200 |
rsaVerify_16Kb | 16 KB | 500 |
rsaVerify_32Kb | 32 KB | 550 |
rsaVerify_64Kb | 64 KB | 625 |
rsaVerify_128Kb | 128 KB | 750 |
rsaVerify | Unlimited (150 KB) | 1000 |
sigVerify_16Kb | 16 KB | 100 |
sigVerify_32Kb | 32 KB | 110 |
sigVerify_64Kb | 64 KB | 125 |
sigVerify_128Kb | 128 KB | 150 |
sigVerify | Unlimited (150 KB) | 200 |
groth16Verify_1input | 1*32B | 1900 |
groth16Verify_2inputs | 2*32B | 2000 |
groth16Verify_3inputs | 3*32B | 2150 |
groth16Verify_4inputs | 4*32B | 2300 |
groth16Verify_5inputs | 5*32B | 2450 |
groth16Verify_6inputs | 6*32B | 2550 |
groth16Verify_7inputs | 7*32B | 2700 |
groth16Verify_8inputs | 8*32B | 2900 |
groth16Verify_9inputs | 9*32B | 3000 |
groth16Verify_10inputs | 10*32B | 3150 |
groth16Verify_11inputs | 11*32B | 3250 |
groth16Verify_12inputs | 12*32B | 3400 |
groth16Verify_13inputs | 13*32B | 3500 |
groth16Verify_14inputs | 14*32B | 3650 |
groth16Verify_15inputs | 15*32B | 3750 |
groth16Verify | 512B | 3900 |
Specification
Implement features of RIDE V4.
Describe the bug
Sometimes, the current time is set to a moment in very far future. Possibly NTP synchronisation produces the value that overflows uint64
.
The issue prevents from synchronisation of a node with the network.
StateSync: Error: block timestamp validation failed: block from future error: block's timestamp is too far in the future, current timestamp 18446742403992908309, received 1584064795750, maxTimeDrift 100, delta 3253781439057
In this example the current time was set to Sunday, 21 July 2554 23:06:43.992
.
Specification
Implement function ecrecover(msg: ByteVector, signature: ByteVector): ByteVector
for verification of ECDSA signatures.
Parameter | Type | Description |
---|---|---|
msg | ByteVector | encrypted message |
signature | ByteVector | proof of signing |
one pair keys generated via func GenerateKeyPair
sk,pk
YoLY4iripseWvtMt29sc89oJnjxzodDgQ9REmEPFHkK 3qTkgmBYFjdSEtib9C4b3yHiEexyJ59A5ZVjSvXsg569
when I started with this 3qTkgmBYFjdSEtib9C4b3yHiEexyJ59A5ZVjSvXsg569
then
java.lang.Exception: InvalidAddress(Wrong address string length: max=36, actual: 44)
they are really different with recipient of devnet.conf
3FgScYB6MNdnN8m4xXddQe1Bjkwmd3U7YtM
3qTkgmBYFjdSEtib9C4b3yHiEexyJ59A5ZVjSvXsg569 (generated)
anybody could tell me why?
Аbstract
Add support for VRF generation signature as described in WEP8.
Аbstract
Node should have an ability to vote for features and block reward while generating a new block.
Motivation and Purposes
Now miner doesn't support voting at all, so gowaves nodes will be mute during the voting periods.
Specification
We have to add a command line parameters to give node owner the ability to select desired features to support and set the desired block reward. Later on the given parameters should be passed to miner and miner should put them in the block.
Node should not allow to vote for not implemented or already approved feature.
Specification
Function assetBalance(addressOrAlias: Address|Alias, assetId: ByteVector): Int
should fail in case of Unit is passed as assetId
.
Аbstract
Should use the link and rewrite the existing build using dh tools with correctly scripts and checks.
Motivation and Purposes
Packages will be correctly removed, there will be no conflicts between mainnet and testnet
Аbstract
Now in tests used a mixture of MainNet and TestNet schemes. Better to stick to TestNet. Some tests that checks real objects from MainNet should use scheme accordingly.
Motivation and Purposes
Simplifying the decision which scheme to use while testing.
Describe the bug
Unable to get extra fee on scripted account because field name that contains it's value is incorrect.
Field has JSON name extra_fee
should be extraFee
.
gowaves/pkg/client/addresses.go
Line 85 in 50989c6
Аbstract
Now WMD requests blocks one-by-one using waves.node.grpc.BlocksApi/GetBlock
method, in cases then it's clear that WMD have to request range of blocks better use waves.node.grpc.BlocksApi/GetBlockRange
gRPC API method.
Motivation and Purposes
This part is legacy of old HTTP API, we have to use all advantages of gRPC API.
Аbstract
With version 4 of RIDE assets can be issued, reissued or burnt by dApp. WMD needs full support of this new functionality.
Specification
Information about assets should be gathered not only by processing transactions, but also by processing script results of invoke transactions. We have to add support of Issue transaction and parsing of it results for assets creation and modification.
** Specification**
Node's gRPC API should be updated to version 1.2.4 of waves/protobuf-schemas.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.