Nano-node: Wallet RPC action "receive" sets the wrong representative/ignores the wallet representative

Created on 27 Nov 2019  路  3Comments  路  Source: nanocurrency/nano-node

This issue has been present since V14 or so, it is the same as #1019 - but was missing an important detail which is why it was closed as un-reproducible

Description of bug:

When you use the rpc receive action on a node/development wallet then the representative is set to the account itself, rather than the wallet representative.

Example, if you have an account in the node wallet:

nano_1hmefcfq35td5f6rkh15hbpr4bkkhyyhmfhm7511jaka811bfp17xhkboyxo

And you do an RPC receive for any block, the representative for that account will become nano_1hmefcfq35td5f6rkh15hbpr4bkkhyyhmfhm7511jaka811bfp17xhkboyxo

This issue does not occur when transactions are auto-received, only when they are received using the RPC receive action.

Steps to reproduce the issue:

  1. Create a wallet via wallet_create with auto receive disabled
  2. Create an account on the wallet via account_create
  3. Use rpc receive to pocket the funds from the account
  4. The representative for that account is now set to itself

Describe the results you received:

Accounts in the node/developer wallet always set the representative field to themselves when using rpc receive

Describe the results you expected:

Accounts use the wallet representative

Additional information you deem important (e.g. issue happens only occasionally):

Issue happens consistently and is repeatable.

Environment:

  • Ubuntu 18.04
  • Nodes V14, V15, V16, V17, V18, V19, V20
bug documentation

Most helpful comment

Closest thing after a quick search over the documentation is wallet_representative_set

I presume the desired behavior is:

1) Only set representative for the open block
a) Use wallet representative, if it's set
b) Use one of the preconfigured_representatives in node config, if wallet representative isn't set

All 3 comments

Thanks for the detailed report! Validated that this is happening and will change to respect the wallet representative.

Did you find anywhere on the documentation implying the expected behavior?

Closest thing after a quick search over the documentation is wallet_representative_set

I presume the desired behavior is:

1) Only set representative for the open block
a) Use wallet representative, if it's set
b) Use one of the preconfigured_representatives in node config, if wallet representative isn't set

Should be good for V21, thanks again. Documentation was updated for RPC receive: https://docs.nano.org/commands/rpc-protocol/#receive

Was this page helpful?
0 / 5 - 0 ratings

Related issues

henry701 picture henry701  路  5Comments

starrynightglider picture starrynightglider  路  5Comments

cryptocode picture cryptocode  路  4Comments

paulmelis picture paulmelis  路  6Comments

hskang9 picture hskang9  路  4Comments