[Offline] 50GB Static Testnet

No, just looking at the automatically generated thumbnails would do :blush:

2 Likes

I’ve not tested this yet, but here’s the gist for my script for infinite upload and verify … you can disable verify by commenting out the verify_put call (with a #).

As the team seems to want it to remain up and running for a while, I wouldn’t hammer it with a lot of instances of this script though.

1 Like

JPEG viewers usually do not care if file have extra data at the end.
So you can take fixed image and append counter at the end of it.

1 Like

Yeah, 1+1=2. Now why don’t I see any files in my computer after performing that calculation?

How?

No need to advise actually. I’m not capable to make any of this myself. Best I can is copy-paste some ready made stuff.

5 Likes

If Linux use this. It will create 200 random txt files about 8.5mb each(approx 1.7gb) If you want more just increase the 200 to a higher number.

#!/bin/bash
mkdir -p ./upload-files
cd ./upload-files
for n in {1..200}; do
    openssl rand -out sample$n.txt -base64 $(( 2**23* 3/4 ))
done

1 Like

If you use screen, one of several excellent terminal multiplexers you can resume your disconnected session which will have continued running whether you are connected or not.

I always have several terminals open under screen for running different commands, one showing the logile if I’m running a node etc

3 Likes

Thanks, I’ll have a look i to that! Is there a terminal app for Android with that function?

2 Likes

It’s a linux command. You probably have to install it (sudo apt install screen will probably do it).

I use JuiceSSH on Android and once I’m logged in run screen. If you get disconnected, when you log in again screen -r will resume the earlier session.

You can create new terminals with Ctrl-a c and switch between them with Ctrl-a 0, Ctrl-a 1 etc. Help is on Ctrl-a " and of course there’s man screen which you could keep open in a separate terminal!

5 Likes

Ok, I made my version of test program. With C#.
SafeVerify_v1.zip (4.8 KB)

For it to operate correctly, safe should have keys generated:
safe keys create --for-cli
It needed to be done once.

Test program have two commands - upload and download:
SafeVerify upload <fileCount> <fileSize> <seed>
SafeVerify download <fileCount> <fileSize> <seed> <containerUrl>

Example upload command:
SafeVerify upload 3 100 2348527586160649322
Example download command:
SafeVerify download 3 100 2348527586160649322 safe://hyryyry1i3to1o7bysrmh4d58jeogshqzetqscmh4pdfdq1rifb8t7a7c5anra

If anyone have questions or bug reports about it, let me know.

Linux users should be able to use it with mono, however I did not tested it

8 Likes

Hey, thanks a lot! I tried it before, but it didn’t seem to do anything else, than create an empty folder. Well, I just didn’t wait enough.

One thing with these instructions is, that it is almost impossible for you - who know - to understand the extent of our not-knowing. And of course we don’t even know it ourselves, so it is impossible to communicate. In this case, I didn’t know what to expect, how that script will end, and when my terminal looked like one in the image attached for a short while, I just deduced that it didn’t work. :face_with_raised_eyebrow:

Now, if I upload these to the testent, and then download, is there a way to check if those downloaded ones match exactly the ones I has locally?

4 Likes

Oh, wow, I’ll look into this later! Thanks!

1 Like

Oops, I forgot to mention that keys are needed.
I updated my message.

1 Like

I guess file size is in kB? So 9999 would be just under 10MB?

And does this program check the downloaded is not changed in the process of visiting the network?

1 Like

File size in bytes

I don’t understand your question.
It checks if container contains what it should contain - <fileCount> files of <fileSize>, generated from <seed>.

2 Likes

Made a gist for that too :wink:

5 Likes

Okay, so after fiddling with my other gist: infinite-safe-upload.sh, it’s now working but the verify part is not working yet (so it’s disabled by default).

It creates a random file around 10kb to 9MB (not exactly as I didn’t compute exact, but will be under 9MB max).

It then uploads that file, then repeats the process until you control-c to terminate it.

It also creates a log file called test.log
But what’s in the log is the same as what’s displayed in the terminal.

4 Likes

I meant is it possible to check if the file I have downloaded from the network is not corrupted in any way?

1 Like

It’s probably not necessary to do this - the network verifies the data it’s handling.

Could do sha256sum on the two to be sure no difference. I’ve seen no instance that catches difference though.

Looks like a good test net… though I rather like the ones we can break something :wink:

6 Likes

This is the goal of this program - to check if files are corrupted or not.
However, it uses its own sets of files, which are defined by 3 parameters.
It can’t check arbitrary files.

If you specify wrong parameters for container (which do not match parameters used when uploading), you will see how it fails.
It is possible, however, to check only first N files:
SafeVerify download 2 100 2348527586160649322 safe://hyryyry1i3to1o7bysrmh4d58jeogshqzetqscmh4pdfdq1rifb8t7a7c5anra
will check 2 of 3 uploaded files. Actually, 2 of 4 (there is one extra file there).

2 Likes