Ant upload: an app to share files to the world

Hey hacker ants! Here’s an app I made on my free time to simplify file sharing on the Network for the rest of us.

Hope you like it. This is just a prototype. Currently supports:

  • alpha network
  • main autonomi network
  • local networks
  • uploads (all public!)

I plan to add more features in the future like:

  • downloads!
  • proper binary releases
  • maybe a repository to track all uploaded stuff and a search to find it?
  • inspire me! happy to take suggestions!

ant_upload

edit: First Release here for Mac and Linux! :tada: @Toivo

33 Likes

Simple and elegant! Love to see it @Anselme!

13 Likes

Great to see this @Anselme. I admire your coding ability and expect to learn a lot from this. I will be interested to see how it develops too.

Without having tried it (it’s cocktail :cocktail_glass: hour here) I’ve noticed attacks on what I regard as important public datasets mounting, such as on the Internet Archive and just recently Wikipedia, from both corporations and government.

So my wish would be for individuals to use Autonomi apps to preserve these and similar datasets to ensure continued access.

Should those attacks succeed in hampering access or worse, it would also be a great example of why this network is so important.

14 Likes

I was trying, but this page does not seem to exist:

https://github.com/autonomi/autonomi.git

3 Likes

I don’t understand why this post is here but the company wasn’t renamed if I’m not mistaken - the github repo itself is still called maidsafe…

4 Likes

It was because the instructions on Gtihub said:

# currently uses the bleeding edge of the autonomi API which will eventually be released but for avant-garde users here's a how to guide

# go back one directory out of the ant-upload directory
cd .. 

# clone the autonomi repo and use the client-light-networking branch
git clone https://github.com/autonomi/autonomi.git 
cd autonomi
git fetch origin client-light-networking 
git checkout client-light-networking

# go back into the ant-upload directory
cd ../ant-upload 

# build the release version of the app
cargo build --release
4 Likes

Ah I see - you could open a pull request with corrected link

3 Likes

Nah, I’ll give up. This was way too avantgarde for me, even with the right link. :sweat_smile:

I needed to install Tauri and what not, and just couldn’t get any of it working after a long chat with GPT.

I’ll wait for the binaries.

(I just wonder how others have gotten this to work? The instructions seem way off.)

2 Likes

I’m compiling right now with the instructions above

  • except I changed
    git clone https://github.com/autonomi/autonomi.git
    to
    git clone https://github.com/maidsafe/autonomi.git , renamed my autonomi folder to nautonomi and just followed the rest of the instructions - simples

and we are off…

8 Likes

My upload woes continue…

Initializing client with environment: "autonomi"
Client initialized
EVM network: ArbitrumOne
Wallet loaded
Uploading 146127 bytes...
Error uploading data: Error occurred during payment: Wallet error: ChunkPaymentsContract(RpcError(ErrorResp(ErrorPayload { code: -32000, message: "execution reverted", data: None })))

Heres the coq-au-vin you missed

Nice UI, please try it yourself, hopefully you will have more upload success than I am having right now.

10 Likes

I indeed wrote those instructions in a rush! Sorry about that!

This is the correct url! Thanks @Southside! Just pushed the fix! Instructions fixed now!

9 Likes

I’d have a lot more fun with this if I didnt keep getting this error on uploads

willie@gagarin:~/projects/maidsafe/ant_upload$ ./target/release/ant_upload 
Selected environment: autonomi
Initializing client with environment: "autonomi"
Client initialized
EVM network: ArbitrumOne
Wallet loaded
Uploading 793 bytes...
Error uploading data: Error occurred during payment: Wallet error: ChunkPaymentsContract(RpcError(ErrorResp(ErrorPayload { code: -32000, message: "execution reverted", data: None })))

But the UI looks good :slight_smile:

I am getting this on
Wallet error: ChunkPaymentsContract(RpcError(ErrorResp(ErrorPayload { code: -32000, message: "execution reverted"all uploads from home with all tools so its not your problem, its mine :slight_smile:

4 Likes

Just tested on mainnet @Southside, although I didn’t get the same error it seems retrying did the trick in my case (cf ant.jpg).
I’ve notified the smart contract team about your error, I trust they will find a fix for you!

autonomi mainnet addresses: 

ant_upload.gif: c7c6a46a9789fbc6530b4c8090532f386d98eddffb1af3fc616f7b19f7b35fe0
ant.jpg: af904ba36b8a3bcd9c1c37b54a2200987ee9e6fa4a2db8551cdaf6d7be533c1f
more_ants.jpg: 283fef9ccd0afa721530e4ee80398548f6d17bad965af200d78b1bb397427ba4
even_more_ants.jpg: 7d60b22f76665821ccbb3ed04194ebfa1a27e89f442a61dc28ce04f5380c9e46
a_turbofish.jpg: 12e94b42f62d2593e9bbf37239b9350bef8af2827f6fb383327eb35ff6ff8375
6 Likes

I’m trying @qi_ma 's proposed hotfix client further config tweaking for more rubost performance on slow connection by maqi · Pull Request #2929 · maidsafe/autonomi · GitHub and see if I have more luck.

Where are the logs? I dont have anything new in ~/.local/share/autonomi/client/logs/.

3 Likes

No worries!

And my comment was not meant in a snarky way, even though I certainly understand that it can seem so. I was just wondering how others can spot the important differences between how it is vs. how it should be so easily? I guess that’s just experience and in general knowing what you are doing :laughing:

Anyway, thanks for making this! GUI -stuff is certainly something I’ve been looking for.

5 Likes

This man is living even more on the bleeding edge than me! :man_scientist:

Not implemented yet!

4 Likes

https://learnpythonthehardway.org/

I got this PDF years ago and the first couple of chapters are really just getting you to look at strings and the subtle differences between two lines that look absolutely identical but…
Lots of exercises and hard work for a few hours but well worth it.
And only after that he moves on to trying to teach you absolute basic Python.

I might still have it on an old HDD somewhere, but its no longer on this box.

Really useful exercises.

EDIT
Found it !! :slight_smile:

Zed Shaw of Learn Python the Hard Way has an uncompromising style

1 Like

I only do the most basic of PRs… like really basic.
I’ll wait for you to get logging done and then go looking.
But I bet it says

2 Likes

Thank you . Who should I send logs to?

They look a lot like this


[2025-04-27T03:55:52.146269Z DEBUG evmlib::contract::payment_vault::handler 56] Returned quotes are: [1862668836, 1862668836, 1862668836, 1862668836, 1862668836, 186266883│
│[2025-04-27T03:55:52.146379Z DEBUG autonomi::client::payment 126] Waiting for wallet lock                                                                                  │
│[2025-04-27T03:55:52.146385Z DEBUG autonomi::client::payment 128] Locked wallet                                                                                            │
│[2025-04-27T03:55:52.146487Z INFO evmlib::wallet 330] Paying for quotes of len: 20                                                                                         │
│[2025-04-27T03:55:52.146492Z INFO evmlib::wallet 225] Getting balance of tokens for account: 0xc753bA57E0F8Ba81bAcf73Ac1b9242733d39a646                                    │
│[2025-04-27T03:55:52.146556Z DEBUG evmlib::contract::network_token 69] Getting balance of account: 0xc753ba57e0f8ba81bacf73ac1b9242733d39a646                              │
│[2025-04-27T03:55:52.360996Z DEBUG evmlib::contract::network_token 77] Balance of account 0xc753bA57E0F8Ba81bAcf73Ac1b9242733d39a646 is 6955209865853754775                │
│[2025-04-27T03:55:52.361017Z DEBUG evmlib::wallet 248] Getting allowance for owner: 0xc753bA57E0F8Ba81bAcf73Ac1b9242733d39a646 and spender: 0xB1b5219f8Aaa18037A2506626Dd04│
│[2025-04-27T03:55:52.361063Z DEBUG evmlib::contract::network_token 83] Getting allowance of owner: 0xc753bA57E0F8Ba81bAcf73Ac1b9242733d39a646 for spender: 0xB1b5219f8Aaa18│
│[2025-04-27T03:55:52.575750Z DEBUG evmlib::contract::network_token 91] Allowance of owner: 0xc753bA57E0F8Ba81bAcf73Ac1b9242733d39a646 for spender: 0xB1b5219f8Aaa18037A2506│
│[2025-04-27T03:55:52.575811Z DEBUG evmlib::wallet 387] Paying for batch of quotes of len: 12, [(0xaf627953552f832c242c2e8602368f975374500b5cc0e0b613a226ba8d61b125, 0x1e4e3│
│[2025-04-27T03:55:52.575825Z DEBUG evmlib::contract::payment_vault::handler 67] Paying for quotes.                                                                         │
│[2025-04-27T03:55:52.793144Z WARN evmlib::retry 102] Error sending pay for quotes transaction: ErrorResp(ErrorPayload { code: -32000, message: "execution reverted", data: │
│[2025-04-27T03:55:52.901271Z WARN ant_networking::event::swarm 336] OutgoingConnectionError to PeerId("12D3KooWBej23eQmtGCfJv66sPCFmmU6p13tD1GJACpneAuHFZTN") on Connection│
│[2025-04-27T03:55:52.901300Z ERROR ant_networking::event::swarm 354] Dial errors len : 1                                                                                   │
│[2025-04-27T03:55:52.901302Z ERROR ant_networking::event::swarm 374] OutgoingConnectionError: Transport::Other Custom { kind: Other, error: Right(Custom { kind: Other, err│
│[2025-04-27T03:55:52.901310Z WARN ant_networking::event::swarm 397] Problematic error encountered: Custom { kind: Other, error: Right(Custom { kind: Other, error: Custom {│
│[2025-04-27T03:55:52.901315Z WARN ant_networking::event::swarm 449] Outgoing Connection error to PeerId("12D3KooWBej23eQmtGCfJv66sPCFmmU6p13tD1GJACpneAuHFZTN") is consider│
│[2025-04-27T03:55:52.901321Z INFO ant_networking::cmd 1059] Peer PeerId("12D3KooWBej23eQmtGCfJv66sPCFmmU6p13tD1GJACpneAuHFZTN") is reported as having issue ConnectionIssue│
│[2025-04-27T03:55:54.384109Z WARN ant_networking::event::swarm 336] OutgoingConnectionError to PeerId("12D3KooWNujnuiYPsbrqiFkS6AuCYD1PnWvXrvZpn4LLseTbokwj") on Connection│
│[2025-04-27T03:55:54.384141Z ERROR ant_networking::event::swarm 437] OutgoingConnectionError: WrongPeerId: obtained: PeerId("12D3KooWJuTYc5xeqMLvvZKFwF2j1MDsNrHbC45Qc9ECrw│

until eventually

[2025-04-27T03:56:48.487478Z INFO ant_networking::cmd 1059] Peer PeerId("12D3KooWBvqACPxK8BmXucTAea2wUWkpBcHd1xnsoD65SVdKpm7V") is reported as having issue ConnectionIssue│
│[2025-04-27T03:56:49.395422Z ERROR evmlib::retry 94] Failed to send pay for quotes transaction after 3 retries. Giving up. Error: ErrorResp(ErrorPayload { code: -32000, me│
│[2025-04-27T03:56:49.395457Z ERROR autonomi::client::high_level::data::public 60] Error paying for data: EvmWalletError(ChunkPaymentsContract(RpcError(ErrorResp(ErrorPaylo│
│[2025-04-27T03:56:49.395465Z DEBUG autonomi::client::high_level::files::archive_public 200] Uploaded archive PublicArchive { map: {"ant_upload.gif": (c7c6a46a9789fbc6530b4│
│[2025-04-27T03:56:49.395528Z INFO ant_networking::driver 244] Shutdown signal received or sender dropped. Exiting swarm driver loop.                                       │
│[2025-04-27T03:56:49.395525Z INFO autonomi::client 316] Shutdown signal received or sender dropped. Exiting event receiver loop.

Better on filebin, I suppose…

3 Likes

Hey @Southside ,

Thanks for reporting the error!

Could it be that at the time of the transaction, the account 0xc753ba57e0f8ba81bacf73ac1b9242733d39a646 had a very low balance of ETH (like less than $2.50)?

I’m asking because the account needs enough ETH balance to pay for the worst case transaction fee scenario. By default the max fee per gas is set to 0.2 GWEI, which is a relatively high amount. The average Arbitrum One gas fees are about 0.015 GWEI. But there are often days where the fees are considerably higher than average, that’s why we set the default so relatively high.

So you should either add a small amount of ETH to the account or If you want to be able to pay for transactions on an account with a very low ETH balance, you can try playing around with the --max-fee-per-gas <WEI> parameter for the CLI or the Wallet.set_transaction_config method if you are using the autonomi sdk. You could set it to 15000000 WEI and go up from there to see what works for you.

We’re working on a feature that will automatically set the max fee per gas to the current market average to avoid having to tweak it manually.

11 Likes