DBC data

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
1 Like

Like this?

If that link doesn’t work, try this:

https://www.uploadlite.com/DsAX1gLoZldCWzP

1 Like

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 :slight_smile:

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
2 Likes

Seems like there is a genesis_dbc in the folder

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)

4 Likes

@19eddyjohn75 is correct that dbc should work.

safe wallet deposit [wallet url] < ~/path_to_dbc

4 Likes

safe wallet deposit --dbc dbc_file_path wallet_xor_address with the genesis_dbc doesn’t work?

1 Like

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.

Well that mostly proved that micropayments can be done and that a bash script is not the fastest way to do it :slight_smile:

Still until I get a lot better with rust or we get an API it will do for now.

7 Likes

I broke it — again

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?

7 Likes

there should never be an overflow in wallet code. This looks like a serious bug to me, and should be reported.

7 Likes

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.

2 Likes
3 Likes

Did this get dealt with and the issue should have been closed ??

1 Like

I think it needs tested yet.

2 Likes

I have been unable to reproduce this with later code

3 Likes