Can some kind person point me at some sample DBC data ?
Im failing with cut n paste echoed into new.dbc
willie@gagarin:~/.safe$ safe wallet deposit $MYWALLET --dbc ./new.dbc
Error:
0: Could not deserialize specified hex string to a DBC: deserialized bytes don't encode a group element
In vaguely related news it took 25 mins to create 1000 wallets and keys on a std baby-fleming with the latest code.
willie@gagarin:~/.safe$ time ~/projects/maidsafe/safe-telegram/populate.sh
real 25m25.917s
user 1m1.572s
sys 0m10.255s
Thank you.
However I’m failing here cos cutting and pasting DBC data wont work and I should have sussed that myself. Feeling a bit daft TBH.
willie@gagarin:~/.safe/accounts$ safe wallet deposit $MYWALLET --dbc ~/projects/maidsafe/new.dbc
Error:
0: DbcError: Invalid SpentProof Signature for PublicKey(187b..b6dd). Error: DBC validity verification failed: SpentProof key is an unknown section key: b454705aa62203846581641889c038b421f4edd106ec22d24cfeadcc762f2a16ec4a0cc6432c91da5e54578ad9f87d84
1: Invalid SpentProof Signature for PublicKey(187b..b6dd). Error: DBC validity verification failed: SpentProof key is an unknown section key: b454705aa62203846581641889c038b421f4edd106ec22d24cfeadcc762f2a16ec4a0cc6432c91da5e54578ad9f87d84
So how do I generate a valid DBC when running baby-fleming? @josh?
I now have 10k “accounts” made that are just waiting to get some micro-payments from the DBC that you lot are going to help me create
This loop has taken ~18hours to complete on a AMD Ryzen 5 3600 6-Core Processor
for i in {1..10000}
do
touch account_$i
$SAFE_BIN/safe keys create --json >> account_$i
$SAFE_BIN/safe wallet create --json >> account_$i
$SAFE_BIN/safe files put account_$i
done
This probably should be uploaded, hmmmmm thought that you could issue a dbc from cli
Still can’t wrap my head around how dbc’s work now, would be great to have some cli’s
The reward_secret_key in the open makes it easy for attackers (hackers)
It would have if I had remembered that genesis_dbc was hiding in ~/.safe/node/baby-fleming-nodes/sn-node-genesis.
illie@gagarin:~/.safe/node/baby-fleming-nodes/sn-node-genesis$ safe wallet deposit $MYWALLET --dbc genesis_dbc
Spendable DBC deposited (4525524120.000000000 safecoins) with name 'dbc-9e4fee4d' in wallet located at "safe://hyryynyofen8fwfiwg5ukh9qtthh96dmoo4qd9igyrwtodnc6qm6eoqu3ayb6o"
willie@gagarin:~/.safe/node/baby-fleming-nodes/sn-node-genesis$ safe wallet balance $MYWALLET
Wallet at "safe://hyryynyofen8fwfiwg5ukh9qtthh96dmoo4qd9igyrwtodnc6qm6eoqu3ayb6o" has a total balance of 4525524120.000000000 safecoins
So now its time to write some code to send a few safecoins to each of these 10k wallets.
Been out most of the day and left two scripts running - One sent 8.blah coins to each of 10k wallets and the other sent 1.blah to the same wallets. I stopped one script as it seemed unresponsive but I think it had just slowed to a crawl like the other one, After ~12 hrs, I think only 4-500 Tx out of 20k had been completed.
I went to check how much was left of the original DBC and this happened
willie@gagarin:~/.safe/accounts$ echo $STASH
safe://hyryynyofen8fwfiwg5ukh9qtthh96dmoo4qd9igyrwtodnc6qm6eoqu3ayb6o
willie@gagarin:~/.safe/accounts$ safe wallet balance $STASH
Error:
0: ContentError: Failed to calculate total balance due to overflow when adding 4525521320.878494766 to 18102085205.372274454
Location:
sn_cli/src/subcommands/wallet.rs:104
Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it.
Run with RUST_BACKTRACE=full to include source snippets.
I will do more testing to see if I can replicate this. Its a straightforward baby-fleming with 11 nodes
Not that having 10k wallets on one section is going to be a common use-case but it is certainly a possible use-case. It wont be done with a crappy bash script in the real world though so I am not sure just what I am proving here. “Things that can be done with bash but probably shouldn’t” perhaps?
Unfortunately I forgot to prepend with RUST_LOG=trace so I have no logs
I will try to recreate the problem
Funny thing was -after this error the network kept running and I could put get and send DBCs AND get the the correct balance for many “accounts”. Only the wallet that I had transferred the genesis DBC into was affected.