Weather report

This much is true….

(venv) willie@gagarin:~/projects/maidsafe/scratch-perf-test$ python3 speedtest-riddim.py
error on scratchpad update - time to error: 27.15 seconds
error on scratchpad update - time to error: 0.10 seconds
error on scratchpad update - time to error: 0.10 seconds
error on scratchpad update - time to error: 0.10 seconds
error on scratchpad update - time to error: 0.10 seconds
error on scratchpad update - time to error: 0.10 seconds
error on scratchpad update - time to error: 0.10 seconds
error on scratchpad update - time to error: 0.10 seconds
error on scratchpad update - time to error: 0.10 seconds
error on scratchpad update - time to error: 0.10 seconds
error on scratchpad update - time to error: 0.10 seconds
error on scratchpad update - time to error: 0.10 seconds
error on scratchpad update - time to error: 0.10 seconds
error on scratchpad update - time to error: 0.10 seconds
error on scratchpad update - time to error: 0.10 seconds
error on scratchpad update - time to error: 0.10 seconds
error on scratchpad update - time to error: 0.11 seconds
error on scratchpad update - time to error: 0.10 seconds
error on scratchpad update - time to error: 0.10 seconds
error on scratchpad update - time to error: 0.10 seconds
error on scratchpad update - time to error: 0.12 seconds
error on scratchpad update - time to error: 0.11 seconds
error on scratchpad update - time to error: 0.12 seconds
error on scratchpad update - time to error: 0.12 seconds
error on scratchpad update - time to error: 0.13 seconds
error on scratchpad update - time to error: 0.10 seconds
error on scratchpad update - time to error: 0.10 seconds
error on scratchpad update - time to error: 0.10 seconds
error on scratchpad update - time to error: 0.10 seconds
error on scratchpad update - time to error: 0.10 seconds

and many more screenfuls of similar

yeah - I did put a new version and resolved the fork now …

but I don’t trust this …

60ms … that’s not possible through xor-routing … only if you do direct p2p with the node that holds the chunk (or just read from cache without doing a network read … I wonder which one of both it is…)

2 Likes

Just for completeness - can you post your latest version of speedtest-riddim.py please?

Wanna be sure we are comparing apples to apples….

1 Like

I downloaded this file 10 times in a row. No problem.

1 Like

Where is the scratchpad test file available from?

1 Like

And I tried once more with VPN on - to no avail.

What can this be?

EDIT: I’m on Ubuntu, I’ll try Windows on another day.

Can you post the output of ant –version please?

toivo@toivo-HP-ProBook-450-G5:~$ ant --version
Autonomi Client v0.4.5
Network version: ant/1.0/1
Package version: 2025.7.1.5
Git info: stable / a66055a / 2025-07-31

if you meant that 1s → 60ms → 60ms

that’s just me executing stuff in a Jupyter notebook

from autonomi_client import SecretKey, Client, ScratchpadAddress
from secrets import token_bytes
import time

client_mainnet = await Client.init()

testpad_privatekey = SecretKey.from_hex("3a728f71282bd68fcbc6da9e335b46c1122e30eb4dc1ab4ba5c96ef65d365f47")

and after that some cells with

pad = await client_mainnet.scratchpad_get_from_public_key(testpad_privatekey.public_key())

you need an extension if you want to see the execution times on every cell

1 Like

Sorry, I don’t really know what you’re referring to when you say “if you meant”.

Just wanted to try the same test everyone else is doing.

With the script you linked to in the other thread, all I am seeing is:

error on scratchpad update

Is there any other setup required for it or can I just run it as is?

2 Likes

strange …

did you do the pip install --upgrade autonomi-client to be on the latest version?

you could use this earlier script version too:

which would show the full error message and wouldn’t have the try/except stuff in it

1 Like

Can you try this please?

rm -rf ~/.local/share/autonomi/bootstrap_cache

Then see what happens?

It’s a bit slower on the first run after deleting the cache.

If you are still getting failures, I would like a copy of your logs please.

1 Like

I never had a previous installation.

Created a new virtualenv:

❯ pip show autonomi-client
Name: autonomi-client
Version: 0.5.3
Summary: Autonomi client API
Home-page: https://maidsafe.net
Author:
Author-email: MaidSafe Developers <dev@maidsafe.net>
License: GPL-3.0
Location: /home/chris/.virtualenvs/autonomi_client/lib/python3.13/site-packages
Requires: maturin, pip, pytest
Required-by:

Just some of the output:

error on scratchpad update - time to error: 1.17 seconds
error on scratchpad update - time to error: 0.70 seconds
error on scratchpad update - time to error: 0.74 seconds
error on scratchpad update - time to error: 0.71 seconds
error on scratchpad update - time to error: 0.68 seconds
error on scratchpad update - time to error: 0.69 seconds
error on scratchpad update - time to error: 0.69 seconds
error on scratchpad update - time to error: 0.71 seconds
error on scratchpad update - time to error: 0.66 seconds
error on scratchpad update - time to error: 0.70 seconds
error on scratchpad update - time to error: 0.70 seconds
error on scratchpad update - time to error: 0.70 seconds
error on scratchpad update - time to error: 0.65 seconds
error on scratchpad update - time to error: 0.70 seconds
error on scratchpad update - time to error: 0.54 seconds
error on scratchpad update - time to error: 0.71 seconds
error on scratchpad update - time to error: 0.62 seconds
error on scratchpad update - time to error: 0.70 seconds
error on scratchpad update - time to error: 0.71 seconds
error on scratchpad update - time to error: 0.72 seconds
error on scratchpad update - time to error: 0.69 seconds
error on scratchpad update - time to error: 0.65 seconds
error on scratchpad update - time to error: 0.57 seconds
error on scratchpad update - time to error: 0.69 seconds
error on scratchpad update - time to error: 0.69 seconds
error on scratchpad update - time to error: 0.71 seconds
error on scratchpad update - time to error: 0.73 seconds
error on scratchpad update - time to error: 0.73 seconds
error on scratchpad update - time to error: 0.70 seconds
error on scratchpad update - time to error: 0.69 seconds
Scratchpad-Update time: 14.88 seconds

yes I ask you to use a previous version of the script (that doesn’t have the try/except stuff) so we can see the error message instead of the print statement that just informs the user there was an error

ooooooooooh - it succeeded finally!

1 Like

Sorry, you said you’re asking me to do something, but I don’t understand what. There is only a link to one script.

1 Like

you’re not looking careful enough @chriso :hugs: it’s 2 different scripts

import asyncio
import time
from autonomi_client import SecretKey, Client, ScratchpadAddress
from secrets import token_bytes


async def main() -> None:
    client_mainnet = await Client.init()
    testpad_privatekey = SecretKey.from_hex("3a728f71282bd68fcbc6da9e335b46c1122e30eb4dc1ab4ba5c96ef65d365f47")

    async def speedtest(byte_length: int) -> None:
        randomdata: bytes = token_bytes(byte_length)
        start_time: float = time.time()
        await client_mainnet.scratchpad_update(testpad_privatekey, 0, randomdata)
        update_time: float = time.time() - start_time
        print(f"Scratchpad-Update time: {update_time:.2f} seconds")

        tmp: int = 1
        start_time = time.time()
        while True:
            testpad = await client_mainnet.scratchpad_get(
                ScratchpadAddress.from_hex(testpad_privatekey.public_key().hex())
            )
            content: bytes = testpad.decrypt_data(testpad_privatekey)
            if content == randomdata:
                population_time: float = time.time() - start_time
                print(f"population time: {population_time:.2f} seconds")
                print(f"iterations: {tmp} - content: {content[:10]}...")
                break
            tmp += 1

    for _ in range(10):
        await speedtest(500)
        print()


if __name__ == "__main__":
    asyncio.run(main())

this one (is the one behind the 2nd link) doesn’t have the try except clauses

1 Like

For this one, it returned immediately:

❯ ./speedtest.py
Traceback (most recent call last):
  File "/tmp/./speedtest.py", line 40, in <module>
    asyncio.run(main())
    ~~~~~~~~~~~^^^^^^^^
  File "/usr/lib/python3.13/asyncio/runners.py", line 195, in run
    return runner.run(main)
           ~~~~~~~~~~^^^^^^
  File "/usr/lib/python3.13/asyncio/runners.py", line 118, in run
    return self._loop.run_until_complete(task)
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^
  File "/usr/lib/python3.13/asyncio/base_events.py", line 725, in run_until_complete
    return future.result()
           ~~~~~~~~~~~~~^^
  File "/tmp/./speedtest.py", line 35, in main
    await speedtest(500)
  File "/tmp/./speedtest.py", line 16, in speedtest
    await client_mainnet.scratchpad_update(testpad_privatekey, 0, randomdata)
RuntimeError: Failed to update scratchpad: Got multiple conflicting scratchpads with the latest version, the fork can be resolved by putting a new scratchpad with a higher counter
2 Likes

huh - funny - I got the same on read on my cloud machine at first … and now an update did go through … should be resolved now for you too I guess …

2 Likes

Success!!!
First run: real 1m5.229s :unamused_face:

Second: real 0m10.593s :melting_face:

Thanks a lot @chriso! I hope you get to enjoy your weekend some time too! :slightly_smiling_face:

1 Like