Signing data transaction (continue)
@alexeykiselev
This is a continue of https://github.com/wavesplatform/Waves/issues/1255, as it was closed.
You've tried to do the latter, but you've provided the sender address for which there is on private key in node's wallet.
I do not entirely understand this. Then it should not also work for mainnet configuration. Besides, if I remember correctly, I use the addres, that was generated on first run.
I tryed now to remove existing wallet.dat file and all the data in data folder, and also information about seed in config. After launching node, it generates a new wallet.dat file, so default wallet is created. But there is no information about seed or adress in console output of node (although I remember it was on the very first start). And I need to set the adress and sender public key in transaction data. Where should I take this information from?
Everything you need is available in REST API. By default the API is available at port 6869.
To get the list of address in the built-in wallet call GET /addresses, the seed could be retrieved using GET /wallet/seed method.
@alexeykiselev
Well, I made a small step forward due to your answer, but still have a problem.
I obtained the seed using /wallet/seed request, and an adress using /addresses. Now if I try to create a data transaction using local node and testnet config, I get a response State check failed. Reason: ActivationError(DataTransaction transaction has not been activated yet). The same as on mainnet.
If I try to use remote node, say testnet1.wavesnodes.com, I receive a response Provided API key is not correct. I use default testnet api key: ridethewaves!
Please, check the height at that your node is. If it's lower than the DataTransaction activation height, the creation of DataTransaction is not available. Use API /blocks/height to get it. To check the local activation status use /activation/status.
The public testnet nodes are protected with different api-key and we keep it secret :)
@alexeykiselev
Ok, got it, thanks) Didn't know that height matters, so I was clearing data from time to time. The height was definitely lower.
@alexeykiselev
Now I have a new problem) I can not finish uploading testnet blockchain, to reach the height, where data transactions were activated. I uploaded it to about a height of 170.000, and now the node produces an error:
java.lang.OutOfMemoryError: Java heap space
at java.io.ByteArrayOutputStream.<init>(Unknown Source)
at scorex.transaction.TransactionsBlockField$.serTxs(TransactionsBlockField.scala:20)
at scorex.transaction.TransactionsBlockFieldVersion3.b(TransactionsBlockField.scala:49)
at scorex.block.BlockField.$anonfun$bytes$1(BlockField.scala:21)
at scorex.block.BlockField$$Lambda$347/1699578227.apply(Unknown Source)
at monix.eval.internal.LazyVal.compute(LazyVal.scala:56)
at monix.eval.internal.LazyVal.apply(LazyVal.scala:48)
at monix.eval.internal.LazyVal.apply(LazyVal.scala:38)
at monix.eval.internal.CoevalRunLoop$.start(CoevalRunLoop.scala:73)
at monix.eval.Coeval.apply(Coeval.scala:200)
at scorex.block.Block.$anonfun$bytes$1(Block.scala:133)
at scorex.block.Block$$Lambda$426/1043317832.apply(Unknown Source)
at monix.eval.internal.LazyVal.compute(LazyVal.scala:56)
at monix.eval.internal.LazyVal.apply(LazyVal.scala:48)
at monix.eval.internal.LazyVal.apply(LazyVal.scala:38)
at monix.eval.internal.CoevalRunLoop$.start(CoevalRunLoop.scala:73)
at monix.eval.Coeval.apply(Coeval.scala:200)
at scorex.block.Block.$anonfun$bytesWithoutSignature$1(Block.scala:153)
at scorex.block.Block$$Lambda$428/1485485458.apply(Unknown Source)
at monix.eval.internal.LazyVal.compute(LazyVal.scala:56)
at monix.eval.internal.LazyVal.apply(LazyVal.scala:48)
at monix.eval.internal.LazyVal.apply(LazyVal.scala:38)
at monix.eval.internal.CoevalRunLoop$.start(CoevalRunLoop.scala:73)
at monix.eval.Coeval.apply(Coeval.scala:200)
at scorex.block.Block.$anonfun$signatureValid$1(Block.scala:175)
at scorex.block.Block$$Lambda$432/1487230025.apply$mcZ$sp(Unknown Source)
at scala.runtime.java8.JFunction0$mcZ$sp.apply(JFunction0$mcZ$sp.java:12)
at monix.eval.internal.LazyVal.compute(LazyVal.scala:56)
at monix.eval.internal.LazyVal.apply(LazyVal.scala:48)
at monix.eval.internal.LazyVal.apply(LazyVal.scala:38)
at monix.eval.internal.CoevalRunLoop$.start(CoevalRunLoop.scala:73)
at monix.eval.Coeval.apply(Coeval.scala:200)
Node restart does not help.
Not enough memory, please, provide at least 2G of memory using -Xmx2g java option.
@Minstel Did you have a chance to check the Aleksey's comment?
@alexeykiselev @monroid Yes, it worked pretty well) Sorry, I forgot to inform you.