Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ao bundler fund (possibly) needs to fund bundler with Turbo creds, in order to perform uploads >100kb #1000

Open
av1ctor opened this issue Sep 4, 2024 · 5 comments
Labels
bug Something isn't working cli ao CLI

Comments

@av1ctor
Copy link

av1ctor commented Sep 4, 2024

Version: 0.1.3

Hi. I'm trying to publish a simple wasm file (written in lua) and I'm getting this error:

ao publish process.wasm --wallet ../arweave-keyfile.json

bigint: Failed to load bindings, pure JS will be used (try npm run rebuild?)
undefined:1
Insufficient balance
^

SyntaxError: Unexpected token I in JSON at position 0
at JSON.parse ()
at parseJSONFromBytes (node:internal/deps/undici/undici:6662:19)
at successSteps (node:internal/deps/undici/undici:6636:27)
at node:internal/deps/undici/undici:1236:60
at node:internal/process/task_queues:140:7
at AsyncResource.runInAsyncScope (node:async_hooks:203:9)
at AsyncResource.runMicrotask (node:internal/process/task_queues:137:8)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

Node.js v18.17.0

If I try to add funds, this happens:

ao bundler fund 100000000 -w ../arweave-keyfile.json

bigint: Failed to load bindings, pure JS will be used (try npm run rebuild?)
up.arweave.net is 100% subsidized and requires no funding

If I try to pass irys.xyz as the bundler, it will keep using up.arweave.net instead:

ao bundler fund 100000000 -w ../arweave-keyfile.json -b "https://irys.xyz"

bigint: Failed to load bindings, pure JS will be used (try npm run rebuild?)
up.arweave.net is 100% subsidized and requires no funding

Btw, process.wasm is around 450kb. I tried with a 10kb file and publish worked fine.

Thanks in advance!

@TillaTheHun0
Copy link
Member

Hey @av1ctor, thanks for reporting.

Yep you're running into something stale: up.arweave.net is no longer 100% subsidized for transactions larger than, I believe, 100kb. I that case, I think your wallet will either need to have AR, or will need Turbo creds funded via ArDrive, in order to upload via up.arweave.net.

We will need to update that copy, as well as adapt bundler fund -- i'm honestly not sure what would be most kosher behavior, will need to check with the ArDrive team.

Sorry about this, we will need to get it fixed.

@TillaTheHun0 TillaTheHun0 added the cli ao CLI label Sep 4, 2024
@TillaTheHun0 TillaTheHun0 changed the title Wasm upload is not working using the CLI ao bundler fund (possibly) needs to fund bundler with Turbo creds, in order to perform uploads >100kb Sep 4, 2024
@TillaTheHun0 TillaTheHun0 added the bug Something isn't working label Sep 4, 2024
@av1ctor
Copy link
Author

av1ctor commented Sep 4, 2024

@TillaTheHun0 My wallet had AR but no Turbo credits. Adding Turbo credits using ArDrive fixed it. Thanks!

@av1ctor
Copy link
Author

av1ctor commented Sep 5, 2024

@TillaTheHun0 If think the bundler can't be changed because the field name is wrong at

export async function publish ({ wallet, host, tag, value }, contractWasmPath) {

Shouldn't the correct field name be "bundler" and not "host"?

@TillaTheHun0
Copy link
Member

@av1ctor doh, that's definitely part of it. We will need to get it fixed.

Thanks for your patience and looking into this further.

@av1ctor
Copy link
Author

av1ctor commented Sep 5, 2024

@TillaTheHun0, thanks again!

I opened the PR #1005 to fix this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working cli ao CLI
Projects
None yet
Development

No branches or pull requests

2 participants