a3rk / remix

Remix Core
Other
1 stars 1 forks source link

sweep_all - unexpected results #15

Open ghost opened 5 years ago

ghost commented 5 years ago

Describe the bug remix command "sweep_all" is currently sending 1e-12 RMX to a supplied address while the remainder of the wallet funds are sent back to the sender

To Reproduce Steps to reproduce the behavior:

  1. Run "./remix-wallet-cli
  2. Attempt to send all funds using "sweep_all" to a second wallet
  3. Observe results

Expected behavior Entire wallet balance is expected to be transferred to supplied wallet address

Desktop (please complete the following information):

drparadoxical commented 5 years ago

This one's going to take some time to tease out. Finishing the first deep dive, it appears that the simplewallet/wallet2 implementations will need careful and surgical attention.

Following simple_wallet::sweep_main to wallet2::create_transactions_all, and then bouncing around wallet2 for a while, we see that the use_fork_rules() method and instances where transaction version branching logic and rct/bulletproof conditional logic allow for this particular issue to be caused by possibly more than just one, or one linearly sequenced, problem.

ghost commented 5 years ago

Fix is located in dev-patch-3 using commit e114ed670b1e1c14bfd7ea9f89660731cf3c5fa1

Leaving open until merged.