Can I play around with a safe network testnet?

OK, sorry to be dense. Where do I find safe-xorurl.txt?

It should be in $DEST_DIR /tmp/std-file-upload-tests-02

and its contents should be

hyfenrym6m19mkdjperroq88n14mkpbemyatwsxehwdrc6rhnqpcemeud3y
hyfenrykcrjmkk78txsiep9zzh9a6ah5jgccjuo8g9yeicjkimwsp8hc31o
hyfenryxon8oeymwyeeau8cgt3nj5u1g9psuzqojthz5n4pmz95jxxg93uh
1 Like

Ah yes - just two in mine, I guess for the 50MB and 100MB files I uploaded later
hyfenrypeas11rj15cf3bxd9wopek14kk175d6665yadjoy8gphe6utp5er
hyfenryk5iwnsajkkxnh8gqii7txkg5n394gem8dujpiy51nbagdkae196o

1 Like

Ah yes of course - I was looking at dump of an earlier run with just the tree smaller files

Gah - unfortunately downloading failed. I’ll try again with the smaller files tomorrow.

user@user:~/safe$ time safe cat safe://hyfenrypeas11rj15cf3bxd9wopek14kk175d6665yadjoy8gphe6utp5er > 50mb
[qp2p::connections] ERROR 2021-05-08T22:19:54.701968383 [/home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/qp2p-0.11.9/src/connections.rs:231] Failed reading from a uni-stream for peer 127.0.0.1:57069 with error: Failed to read expected number of message bytes: connection closed: timed out
1 Like

Ach never mind - I am very grateful for what you have done tonight.
It may be best to wait till Monday and let the devs sort out the messaging in v0.42.1 and whatever is wrong with auth no longer displaying the balances.
I m for leaving it till then and tomorrow I will probably look at that guide to static websites that got posted earlier today https://immutablewebapps.org/

that got sorted by me remembering to unlock the account - doh!
I can now get on wit making this script usable

GitHub - safenetwork-community/dedup-tester: Bash script which uploads a set of standard files to SAFE Network for performance profiling and investigation of deduplication behaviour is updated - sleep now

The new version fails straight away. I’m off out now but will have a look later if needed.

Summary

ser@user:~/safe$ ./southside
Error: ClientError: Serialisation error

Caused by:
0: Serialisation error
1: io error: failed to fill whole buffer
The Safe CLI had a problem and crashed. To help us diagnose the problem you can send us a crash report.

We have generated a report file at “/tmp/report-69017e13-1708-4163-9b7b-9d265145341f.toml”. Please submit an issue, including the report as an attachment, at https://github.com/maidsafe/sn_api.
Alternatively, you can report it on our dev forum at: https://forum.safedev.org.

In order to improve the software, we rely on people to submit reports.

Thank you kindly!

===============================================================

output files will be written to /tmp/std-file-upload-tests-04

This account has a balance of Checking balance of CLI’s assigned keypair…

cp: cannot stat ‘/home/user/tmp/testfiles/dedup-testfiles.zip’: No such file or directory
unzip: cannot find or open dedup-testfiles.zip, dedup-testfiles.zip.zip or dedup-testfiles.zip.ZIP.

processing a 5MB standard testfile

md5sum: 5MB.zip: No such file or directory
cmp: md5-5MB.txt: No such file or directory
Checksums did not match. Aborting!!

2 Likes

Now Thats interesting - I go the same error about the CLI crashing last night and submitted an issue but I was too tired to give much detail. THis may well be repeatable.

1 Like

Sorry you need to swap the “#” at lines 42 and 44

#----------------------save on AWS bandwith downloads----comment out the curl line and copy in from local disk
#curl --output dedup-testfiles.zip https://maidsafe-t5-dedup-testfiles.s3-eu-west-1.amazonaws.com/dedup-testfiles.zip

cp /home/$USER/tmp/testfiles/dedup-testfiles.zip  $DEST_DIR/
#-----------------------------------------------------------------------

That was a wee kludge I put in to stop dowloading the same files every time from my S3 bucket and save time and bandwidth - apologies

Having said that it should not AFAICS have caused the CLI crash - which i am also seeing. Please send that crash report to github or the Dev forum

1 Like

It happened just as I was leaving and turning off my PC so I didn’t save it unfortunately.

Got further this time, but hit an error. InvalidXorUrl. Possibly coincidentally, there is nothing in /tmp/std-file-upload-tests-04 - possibly because this was try #2 and I simply deleted the files out of the folder before trying again, rather than deleting the folder.

Summary

user@user:~/safe$ ./southside

output files will be written to /tmp/std-file-upload-tests-04

This account has a balance of Checking balance of CLI’s assigned keypair… 777.000000000

% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 385M 100 385M 0 0 3393k 0 0:01:56 0:01:56 --:–:-- 3961k

processing a 5MB standard testfile

real 0m59.649s
user 0m3.754s
sys 0m0.410s

processing a 10MB standard testfile

real 2m1.297s
user 0m10.936s
sys 0m0.977s

========================================================================================

./southside: line 69: Checking balance of CLI’s assigned keypair…
777.000000000-Checking balance of CLI’s assigned keypair…
776.932189848: syntax error: invalid arithmetic operator (error token is “'s assigned keypair…
777.000000000-Checking balance of CLI’s assigned keypair…
776.932189848”)

sleeping for 60 seconds
safe://hyryyrbeacsop4gq44m6cs7quty44wdbp3edz1fr8k6utgur4t15ashrh3cnra

  • 5MB.zip safe://hyfenrym6m19mkdjperroq88n14mkpbemyatwsxehwdrc6rhnqpcemeud3y
    safe://hyryyrbp6ghdh3sphxjd457d1fcda4bgc8m8fju1f4qwhh6mnhfkjzfd6kanra
  • 10MB.zip safe://hyfenrykcrjmkk78txsiep9zzh9a6ah5jgccjuo8g9yeicjkimwsp8hc31o
    Error: InvalidXorUrl: path contains empty component
    error: Found argument ‘safe://hyfenrym6m19mkdjperroq88n14mkpbemyatwsxehwdrc6rhnqpcemeud3y’ which wasn’t expected, or isn’t valid in this context

USAGE:
safe files get [FLAGS] [OPTIONS] [dest]

For more information try --help
Error: InvalidXorUrl: path contains empty component
error: Found argument ‘safe://hyfenrykcrjmkk78txsiep9zzh9a6ah5jgccjuo8g9yeicjkimwsp8hc31o’ which wasn’t expected, or isn’t valid in this context

USAGE:
safe files get [FLAGS] [OPTIONS] [dest]

For more information try --help
TODO thanks for using this tool - more to come

That’s All, Folks!!

1 Like

I just updated the script to save the Files Container to the safe-xorurl.txt file.
Im just away out myself now – back in an hour or two to carry on with this

Can you do me a favour and run safe keys balance|tail -n1|cut -f2 -d':'

and let me know if you simply get the numerical balance returned OR if that triggers another CLI crash.

I’ll pick up as soon as Im back in

Oh and I need to sort the bash arithmetic so we get the cost of the file storage correct - I cant see what Im doing wrong there, Im sure someone will point out the error soon :slight_smile:

1 Like

776.932189848

Clearing everything out and running it again

coincidentally, there is nothing in /tmp/std-file-upload-tests-04

I was wrong - using ls didn’t output anything but ls -l showed the files in there (maybe cos I’m not root?)

Edit - started again - same result

As far as I know the -l option for ls only means that you are shown the long listing format. It should not impact what files are shown.

1 Like

Yes - me too. Not sure what happened there. In fact I tried ls again and it shows the files now.

1 Like

If you turned off your PC the contents of /tmp will have been wiped. This desktop box I am using runs 24/7 so its not an issue for me. I will look at another less temporary temporary storage location :slight_smile:

2 Likes

Yeah, I ran the test twice though without turning it off. I’m thinking maybe I ls’d before the files got copied over. I dunno.

No the script checks to see if the directory /tmp/std-file-upload-tests exists
if so, it deletes it and then makes it again fresh

DEST_DIR=/tmp/std-file-upload-tests-04

if [[ -d  $DEST_DIR ]]
    then
    rm -rf $DEST_DIR
fi
mkdir -p $DEST_DIR && cd $DEST_DIR

is this what we really want?

maybe if x exists create x2 etc?

1 Like

Please feel free to fork and create a pull request at GitHub - safenetwork-community/dedup-tester: Bash script which uploads a set of standard files to SAFE Network for performance profiling and investigation of deduplication behaviour :slight_smile:
The more the merrier - that may well be a better solution as long as we clean up afterwards
Im about to cook for the ravenous horde (my wife absolutely hates it when i call her that) and later I will change the storage location to $USER/tmp or something

2 Likes