snarkOS
snarkOS copied to clipboard
Confusing error message in the response to the createrawtransaction RPC
🐛 Bug Report
While making the following rpc request:
{
"jsonrpc":"2.0",
"id": "1",
"method": "createrawtransaction",
"params": [
{
"old_records": [
"ac4fc76cfc377565bd81488e5a1d9980946aba053d3366012ae63556b0820b0b0080d1f008000000000000000000000000000000000000000000000000000000000000000000000000304e7ae3ef9577877ddcef8f8c5d9b5e3bf544c78c50c51213857f35c33c3502df12f0fb72a0d7c56ccd31a87dada92b00304e7ae3ef9577877ddcef8f8c5d9b5e3bf544c78c50c51213857f35c33c3502df12f0fb72a0d7c56ccd31a87dada92b00cd9ad790e0d0fc4c4a5775242f1ca044f2c54354c9850b0039ae745490c94610af0768daad7b206bed8c0ef1c740184f3cf17a4edaa36dd40510e3ccb6a5d905d4f32f9e417157cd1af583377782b1989b78de51424d068c0b44972f4665f901"
],
"old_account_private_keys": [
"APrivateKey1uGUHJeUGBxBB85SruKgP75krMKo7X686LqsjSCZttLWANBo"
],
"recipients": [{
"address": "aleo1ppzppyj7md7c8s5tqwh5rmzxx30w839kjtwzfrcpvdrklg35pupsgclm77",
"amount": 1
}],
"network_id": 0
}
]
}
I get this confusing error in reply:
{
"jsonrpc": "2.0",
"error": {
"code": -32602,
"message": "missing inner snark proving parameters"
},
"id": "1"
}
It seems like the error might be triggered from here: https://github.com/AleoHQ/snarkOS/blob/master/dpc/src/base_dpc/mod.rs#L782
Steps to Reproduce
- Create an account, and mine some blocks for it.
- Create a second account to send to
- Get the latest record with a positive value for the first account
- Create a transaction with the second account as the recipient, using the raw decrypted record and the private key from the first account.
Expected Behavior
Create the transaction, or if I'm doing something wrong here, a more informative error message explaining how I can fix what I did wrong.
Your Environment
- snarkOS master
- Rust 1.47
- Archlinux
The issue is that your node is not being run as a miner and therefore not loading the required proving parameters to generate transactions. We currently do not have config functionality to run a non-miner node with full proving parameters.
Basically, this toggle needs to be updated with another flag instead of is_miner
- https://github.com/AleoHQ/snarkOS/blob/00fca6890039f8426fe04726975e3c79751c83c9/snarkos/main.rs#L140
Not applicable to testnet3.