Code Monkey home page Code Monkey logo

arloader's People

Contributors

calebeverett avatar douganderson444 avatar easeev avatar kfnx avatar leozc avatar murki avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

arloader's Issues

Unable to get any command to work either either sol or ar keypairs

Version: 0.1.35

Ubuntu WSL on Windows 10.

Upload Command:

./arloader upload "*.png" --log-dir "status/asset/"
error: The following required arguments were not provided:
--ar-keypair-path <AR_KEYPAIR_PATH>

./arloader upload "*.png" --log-dir "status/asset/" --ar-keypair-path "./arweave-key"
error: Found argument '--ar-keypair-path' which wasn't expected, or isn't valid in this context
Did you mean --sol-keypair-path?

./arloader upload "*.png" --log-dir "status/asset/" --sol-keypair-path "~/.config/solana/id.json" --with-sol
error: The following required arguments were not provided:
--ar-keypair-path <AR_KEYPAIR_PATH>

./arloader upload "*.png" --log-dir "status/asset/" --sol-keypair-path "~/.config/solana/id.json" --with-sol --ar-keypair-path "./arweave-key"
error: Found argument '--ar-keypair-path' which wasn't expected, or isn't valid in this context
Did you mean --sol-keypair-path?

Estimate Command:

./arloader estimate "*.png"
error: The following required arguments were not provided:
--ar-keypair-path <AR_KEYPAIR_PATH>

./arloader estimate "*.png" --ar-keypair-path "./arweave-key"
error: Found argument '--ar-keypair-path' which wasn't expected, or isn't valid in this context

funding transactions with SOL - upload not completed - SOL deducted

when using arloader upload feature with solana as payment method I am getting error StatusCodeNotOk - File is never uploaded to arweave - the transaction is rebroadcasted and fails up to 10 times per try. The funds are deducted from solana wallet the same amount of times as it retries to resend - I have about 15 transactions that have deducted SOL from the wallet but no data uploaded to arweave.

Bundles never being accepted

https://explorer.solana.com/address/9Em18kRiGNBA1Rrx8oNBnftKj8dcFXFYyDchXQcKSV5r

arloader upload \*.mp4 --with-sol --sol-keypair-path ~/.config/solana/devnet.json --ar-default-keypair --bundle-size 50

 bundle txid                                   items      KB  status       confirms
------------------------------------------------------------------------------------
 L4YIOSLxpHLEL8oFk13rmVIMYXvMGTujMtRM0EMUBu4       3   38912  NotFound            0
 qsnuTQrhqxOoHxhJu_4RVOs-8JgGcf6OQHN9aF14Nlc       4   46121  NotFound            0
 h5IM9BIsfKZtKAZou3VuK3w-seTZnHf9dYWrCN7GowA       4   47642  NotFound            0
 Maac9oFEM2eTjp2iqiawljIjfY7SRDfCHngVIEvNyk0       3   39039  NotFound            0
 ZHuvQK60Eza4lWoIhTKstArSdlXUlzlFZA2F008QMIs       3   32708  NotFound            0
 4l18ZbtydWyvkkAJiUaq02vJJlsbuueWrITyZC6anIo       4   45692  NotFound            0
 quu63L_f-MCulXqaYOEJVd-8zNwm8PbyJuOKo58fDkU       4   46956  NotFound            0
 2OC_xvDoLKkBkh0sLDIQGhaVeksCWkSX7sDoVt3ijec       4   44346  NotFound            0
 YSnLMv67I0vWwOHiYCY0uDI9Cq8OUJRSra18evFZ1Is       4   49219  NotFound            0

arloader upload *.webp --with-sol --sol-keypair-path ~/.config/solana/devnet.json --ar-default-keypair --bundle-size 50

 bundle txid                                   items      KB  status       confirms
------------------------------------------------------------------------------------
 RXp4t5Ex-nJ0GIwbxDS_FpSMrP9KuCpq_rZO7ErG-2I      33   25983  NotFound            0

Am I able to get my SOL back if a transaction is never taken by a miner?

Constant issues with uploading nft set - StatusCodeNotOk

Using upload-nft results in StatusCodeNotOk.

AR tokens get deducted, adding a reward multiplier does not work.
Resulting bundle is crrupted and fails verification.

Any idea what can help ?

I am using the latest build to this date.

what am i doing wrong?

freshskates@not-localhost:/mnt/c/Users/freshskates/Desktop/Languages/Blockchain/test/exclusives$ arloader upload-nfts ./*.gif --with-sol --sol-keypair-path ~/.config/solana/test.json --ar-default-keypair


Uploading assets...

Uploading 1 files with 263 KB of data in 1 bundle transactions...

StatusCodeNotOk

Uploaded 0 KB in 0 files in 0 bundle transaction(s). Run `arloader update-status ./arloader_MA0-zRzXZQ4/assets/` to update statuses.


Uploading manifest for images...

No bundle statuses found in ./arloader_MA0-zRzXZQ4/assets/
thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', /home/freshskates/.cargo/registry/src/github.com-1ecc6299db9ec823/arloader-0.1.63/src/commands.rs:802:6
stack backtrace:
   0:     0x555bd019dc8d - std::backtrace_rs::backtrace::libunwind::trace::hee56aa883c63acb5
                               at /rustc/89b9f7b284aacc5f8613438b80e4dd7bdd10549e/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
   1:     0x555bd019dc8d - std::backtrace_rs::backtrace::trace_unsynchronized::he7cac0994dc78c4c
                               at /rustc/89b9f7b284aacc5f8613438b80e4dd7bdd10549e/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x555bd019dc8d - std::sys_common::backtrace::_print_fmt::hdc12a102f76753bd
                               at /rustc/89b9f7b284aacc5f8613438b80e4dd7bdd10549e/library/std/src/sys_common/backtrace.rs:67:5
   3:     0x555bd019dc8d - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hf7faa06c147903ce
                               at /rustc/89b9f7b284aacc5f8613438b80e4dd7bdd10549e/library/std/src/sys_common/backtrace.rs:46:22
   4:     0x555bcffac2bc - core::fmt::write::h66e8369cb6d370fa
                               at /rustc/89b9f7b284aacc5f8613438b80e4dd7bdd10549e/library/core/src/fmt/mod.rs:1168:17
   5:     0x555bd0177d54 - std::io::Write::write_fmt::h74797452eefbc651
                               at /rustc/89b9f7b284aacc5f8613438b80e4dd7bdd10549e/library/std/src/io/mod.rs:1653:15
   6:     0x555bd019ef35 - std::sys_common::backtrace::_print::h82e64c28f7109909
                               at /rustc/89b9f7b284aacc5f8613438b80e4dd7bdd10549e/library/std/src/sys_common/backtrace.rs:49:5
   7:     0x555bd019ef35 - std::sys_common::backtrace::print::hef2d97a7e889059a
                               at /rustc/89b9f7b284aacc5f8613438b80e4dd7bdd10549e/library/std/src/sys_common/backtrace.rs:36:9
   8:     0x555bd019ef35 - std::panicking::default_hook::{{closure}}::hc4f2f631c593350e
                               at /rustc/89b9f7b284aacc5f8613438b80e4dd7bdd10549e/library/std/src/panicking.rs:211:50
   9:     0x555bd019fdca - std::panicking::default_hook::he01061695065e502
                               at /rustc/89b9f7b284aacc5f8613438b80e4dd7bdd10549e/library/std/src/panicking.rs:228:9
  10:     0x555bd019fdca - std::panicking::rust_panic_with_hook::h3ad36e38c2432eec
                               at /rustc/89b9f7b284aacc5f8613438b80e4dd7bdd10549e/library/std/src/panicking.rs:606:17
  11:     0x555bd019f886 - std::panicking::begin_panic_handler::{{closure}}::hc909e1e15fb3ebac
                               at /rustc/89b9f7b284aacc5f8613438b80e4dd7bdd10549e/library/std/src/panicking.rs:500:13
  12:     0x555bd019f826 - std::sys_common::backtrace::__rust_end_short_backtrace::hfcf0febb37587b3d
                               at /rustc/89b9f7b284aacc5f8613438b80e4dd7bdd10549e/library/std/src/sys_common/backtrace.rs:139:18
  13:     0x555bd019f7e2 - rust_begin_unwind
                               at /rustc/89b9f7b284aacc5f8613438b80e4dd7bdd10549e/library/std/src/panicking.rs:498:5
  14:     0x555bcfe2a0f0 - core::panicking::panic_fmt::h6a50bf58d4eb52b4
                               at /rustc/89b9f7b284aacc5f8613438b80e4dd7bdd10549e/library/core/src/panicking.rs:110:14
  15:     0x555bcfe2a24c - core::panicking::panic::h2379521af04ff957
                               at /rustc/89b9f7b284aacc5f8613438b80e4dd7bdd10549e/library/core/src/panicking.rs:48:5
  16:     0x555bcfe68cbc - arloader::commands::command_upload_nfts::{{closure}}::hb74ad99e1a56c002
  17:     0x555bcfe50653 - arloader::main::{{closure}}::hd22cca23b22f2d15
  18:     0x555bcff038d4 - tokio::runtime::Runtime::block_on::h93430bb1a19d2393
  19:     0x555bcff46d03 - arloader::main::h0920b29802615e26
  20:     0x555bcfee68e3 - std::sys_common::backtrace::__rust_begin_short_backtrace::h8613cfdecd68f448
  21:     0x555bcff46327 - main
  22:     0x7f81c37e70b3 - __libc_start_main
  23:     0x555bcfe3682e - _start
  24:                0x0 - <unknown>
  

what could I be doing wrong?

Trying to upload png/json

Hi,

Any Ideas what is going on here?

$ ./arloader upload-nfts inc/a/. --with-sol --sol-keypair-path wallet.json --ar-default-keypair

Uploading assets...

Uploading 598 files with 249510 KB of data in 3 bundle transactions...

bundle txid items KB status confirms

uYpDF2_4DvBywQu2geqXeut4c7C4yMjiC7gQ-UhaZYk 239 98271 Submitted 0
Retrying Solana transaction (1 of 10)...
TOZyZxnOGyra5LPhlEcCO1UgS7sXMnFdC9JrQTxPIyk 236 99834 Submitted 0
Retrying Solana transaction (1 of 10)...
klFh_4YuuKYDphaHmvIEUTcB6K8ErenJfL9JwUduDb0 123 51404 Submitted 0

Uploaded 249510 KB in 598 files in 3 bundle transaction(s). Run arloader update-status inc/a/arloader_Bhd-BmCczr0/assets/ to update statuses.

Uploading manifest for images...

Uploaded manifest for 598 files and wrote to inc/a/arloader_Bhd-BmCczr0/assets/manifest_Lgp1zj-QYDn9yaXKsiaxpJAOkTdrfXETTYn6KaCGG0Q.json.

Run arloader get-status Lgp1zj-QYDn9yaXKsiaxpJAOkTdrfXETTYn6KaCGG0Q to confirm manifest transaction.

Updating metadata with links from manifest...

Error: SerdeJson(Error("EOF while parsing a value", line: 1, column: 0))

Rust nightly toolchain

As I can see there is only on feature from nightly โ€” #![feature(derive_default_enum)], to derive default trait for status.
But with that it's not possible to use this crate as lib in stable toolchain.

Transaction for upload-nfts complete, but files inaccessible

Metadata:
https://viewblock.io/arweave/tx/CYxzfb6gKuU1-KEUAVQUDZTpBOOi8iLcGA71EuOc9jk

Images:
https://viewblock.io/arweave/tx/yeFIaMr8plqwgvW6jQqOm7CQYLXl2HWTf8NfuAtADi8

I used the upload-nfts command to upload a test set of 100 NFTs, but even after several hundred confirmations none of the bundled transactions return anything but the standard 'not found' page on arweave.net.

Here's an example of one of the bundled transactions that should return an image: https://arweave.net/-DM0oTxVYX8esq8fn79ifxAoNJRpyZHhXmYTsVAGMjE

It doesn't seem to be a one off issue for me; I first ran into this issue yesterday, and I eventually gave up on this transaction and tried to use the same command again this morning to the same result.

In case these are needed as well, these are the links to the new transaction bundles:
Images:
https://viewblock.io/arweave/tx/23-cH3-AAYCYPCp43fD1Im1iNgED3NoDcNwTAisIXOY

Metadata:
https://viewblock.io/arweave/tx/hK9cpjqHYnUi3IwIY_om8pMNgxcgInAR2Tt2fmvFnmM

Error doesn't implement Send

this makes it very hard to use the Arweave since the errors it returns are !Send and that makes the Futures themselves !Send which makes running them in tokio not possible without LocalSet

StatusNotOK

When uploading with sol, I am continuously having an issue of StatusNotOK. I looked back through all the issues where some say its an Arweave network issue, some say its a Solana network issue, and then some say update the arloader version. I've been trying to upload this set for 3 days and haven't had any luck. Does anyone have a known solution or is it really just wait and be patient? Also, for one of these failed attempts, is there a way to restart it so it just goes back and tries to upload the bundles that it previously failed on?

StatusCodeNotOk

I'm getting StatusCodeNotOk on everything -- is this a network issue? I installed the latest version

$ arloader upload *.json --ar-keypair-path ~/arweave-keyfile.json --no-bundle
StatusCodeNotOk
StatusCodeNotOk
StatusCodeNotOk
StatusCodeNotOk

without no bundle
$ arloader upload *.json --ar-keypair-path ~/arweave-keyfile.json

Uploading 4 files with 6 KB of data in 1 bundle transactions...

StatusCodeNotOk

Uploaded 0 KB in 0 files in 0 bundle transactions. Run arloader update-status arloader_hygiTCzJ898 to update statuses.

crash when tx status returns internal server error

currently tx status endpoint on arweave http server returns internal server error and this isn't currently handled in arloader so we get this crash: thread 'tokio-runtime-worker' panicked at 'internal error: entered unreachable code', github.com-1ecc6299db9ec823/arloader-0.1.59/src/lib.rs:1271:18

Crash happen when file reach to certain size

When media file size larger 10MB, it crashed
arloader-0.1.55/src/commands.rs:743:26

thread 'main' panicked at 'index out of bounds: the len is 0 but the index is 0', /Users/leozc/.cargo/registry/src/github.com-1ecc6299db9ec823/arloader-0.1.55/src/commands.rs:743:26
stack backtrace:
   0: _rust_begin_unwind
   1: core::panicking::panic_fmt
   2: core::panicking::panic_bounds_check
   3: arloader::commands::command_upload_nfts::{{closure}}
   4: arloader::main::{{closure}}
   5: arloader::main
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
    let log_dir = if let Some(log_dir) = log_dir {
        log_dir
    } else {
        let parent_dir = path_chunks[0].0[0].parent().unwrap();
        arweave.create_log_dir(parent_dir).await?
    };

NotFound when using multiplier 0 to 3

bundle txid items KB status confirms

fkESPupWBD-TVpXaBGJC-ta7--UDjtdiJ-Uap2WMSEo 4000 3173 NotFound 0
Updated 1 statuses.

Is there any work around for this issue or anyway to get the sol back?

Add number of items limit to bundle size

Current work around is to limit the size of the bundle in terms of memory to have less than approx. 500 items (ok to pass a float to --bundle-size if it needs to be less than 1 to get under 500 items per bundle).

Insanely high upload time?

Hey team!

Was not sure where the best place to put this was, but figured it couldn't hurt to have it here in case any other users experience this.

My scenario:
Our project already minted and we want to add an extra attributes field in the metadata to specify the rarity of that NFT. This needs to be done for all 750 NFT's and we can easily update the URI that points to the metadata with something like metaboss. The problem we face is figuring out the best way to upload the updated JSONS into arweave.

The issue:
I did some testing with only 1 JSON file following the available documentation. I used SOL and also specified the maximum amount for reward multiplier. Even with the increased rewards, the upload for a single JSON file took roughly 40 minutes before it showed up.

Is there something I am doing wrong for it to take so long?
Is there a better way to achieve what we are trying to do?

Any help would be greatly appreciated!

Custom Gateway - instead of `arweave.net`

Hardcode arweave.net is not a good idea. We are using self hosted Arweave gateway localhost:1984 for testing and experiemental purposes. How to change default Arweave gateway arweave.net to something else?

Bundlr support

Hey,

It would be great to provide a Bundlr integration meaning peoples bundles are guaranteed to get on chain. AR and SOL are already supported.

StatusCodeNotOK - Can't Upload 10k Set - 0.1.62

Hey there,

Using the 0.1.62 version and I'm unable to finish uploading a 10K set. I've tried 3 times now and got about 30% in on one try, and then about 50% through on the other 2 tries but all of them eventually failed with StatusCodeNotOK. I played with the bundle size each time to see if I could resolve it that way, and the last try I turned bundles off entirely and still had the same issue. If it matters I'm using OSX.

What data is passed through Arloader?

When paying with SOL, we pass https://arloader.io/sol and also a keypair. You also mentioned that if a transaction is failed, you have to manually refund.

  1. How do you store the data? I am mainly concerned about keypairs.
  2. Do you perform a swap for AR or hold an equivalent in SOL for the transaction?
  3. If paying with AR, is it direct with Arweave, or does it also pass through you?
  4. Anything else that Arloader performs as a middleman? or that it could do?

I am interested in the case where Arloader is totally neutral and when it could take a cut by offering a more streamlined process/other features.

Cannot create w2w transaction

I'm trying to create an data-empty transaction with target and quantity other than 0, a wallet 2 wallet transaction. Is this even supported? Is there a way of doing this?

Here is my attempt:

async fn main() {
    let path = PathBuf::from_str("wallet.json").unwrap();
    let arweave = 
        Arweave::from_keypair_path(path, Url::from_str("https://arweave.net").unwrap())
        .await
        .unwrap();
    
    let price_terms = arweave
        .get_price_terms(1.0)
        .await
        .unwrap();
    println!("{:?}", price_terms);
    
    let mut tx = arweave.create_transaction(vec![10], None, None, price_terms, false).await.unwrap();
    tx.target = Base64::from_str("PAgdonEn9f5xd-UbYdCX40Sj28eltQVnxz6bbUijeVY").unwrap();
    tx.quantity = 100000;
    dbg!(json!(&tx));


    let sig_tx = arweave
        .sign_transaction(tx)
        .unwrap();

    dbg!(json!(&sig_tx));
    
    let res = arweave
        .post_transaction(&sig_tx)
        .await;

    dbg!(res);
}

Apparently, the merkle generated when the target is present and quantity is different from zero is not being generated correctly.

StatusNotOK

Hi.
i need to upload an json file to arweave with rust(im using arloader = "0.1.63"). but i got a StatusCodeNotOk error.

it makes empty folder (ex: SZ2g5l-q7M4) and after an error the folder is deleted by itself.

Also it takes fee, even with error StatusCodeNotOk:

https://explorer.solana.com/tx/5YDUWr4s8RE52LKivnCBjWqGXM1YN1mBK1rLvj3Yq9NJZ5t5ASofnvFWBouWvg167UQdEwkVbEt9xFnEYTWA4J6

but with CLI everything is ok, no errors.

arloader upload xxx.json --with-sol --sol-keypair-path /Users/x/.config/solana/id.json --ar-default-keypair

Any ideas why?

Error:

thread 'main' panicked at '----- err: status code not ok', src/upload_files_2.rs:199:21
stack backtrace:
   0:        0x10b4b9ef4 - std::backtrace_rs::backtrace::libunwind::trace::hc513dadde6954c86
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
   1:        0x10b4b9ef4 - std::backtrace_rs::backtrace::trace_unsynchronized::hef5b528e06275835
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:        0x10b4b9ef4 - std::sys_common::backtrace::_print_fmt::hd90f3854346e0ebc
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/sys_common/backtrace.rs:66:5
   3:        0x10b4b9ef4 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h85521558a183f368
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/sys_common/backtrace.rs:45:22
   4:        0x10b4d509b - core::fmt::write::h01631fae0d2b98bc
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/core/src/fmt/mod.rs:1197:17
   5:        0x10b4b4ab8 - std::io::Write::write_fmt::h675dde99a2999169
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/io/mod.rs:1672:15
   6:        0x10b4bb89d - std::sys_common::backtrace::_print::h9f1d91ee7cd2be55
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/sys_common/backtrace.rs:48:5
   7:        0x10b4bb89d - std::sys_common::backtrace::print::h4ad640f11cc29383
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/sys_common/backtrace.rs:35:9
   8:        0x10b4bb89d - std::panicking::default_hook::{{closure}}::h5e5df492d229fd65
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/panicking.rs:295:22
   9:        0x10b4bb5f4 - std::panicking::default_hook::h18647b59f1a84ee2
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/panicking.rs:314:9
  10:        0x10b4bbdd8 - std::panicking::rust_panic_with_hook::hd9ead35a68ccc55e
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/panicking.rs:698:17
  11:        0x10b4bbd13 - std::panicking::begin_panic_handler::{{closure}}::h6fca91c5e1dc2f30
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/panicking.rs:588:13
  12:        0x10b4ba377 - std::sys_common::backtrace::__rust_end_short_backtrace::h4ff3025d9a0a0490
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/sys_common/backtrace.rs:138:18
  13:        0x10b4bb9ea - rust_begin_unwind
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/panicking.rs:584:5
  14:        0x10b4efbb3 - core::panicking::panic_fmt::h3d9f795ee387ef8d
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/core/src/panicking.rs:142:14
  15:        0x10ab37cc2 - nft_metadata::upload_files_2::test_upload_file_from_path_with_sol::{{closure}}::hb8fe6cce227e8978
                               at /Users/viktor/SolanaWorkspace/nft-metadata/src/upload_files_2.rs:199:21
  16:        0x10ab27497 - <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll::he32511af53025e80
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/core/src/future/mod.rs:91:19
  17:        0x10ab0cb01 - tokio::park::thread::CachedParkThread::block_on::{{closure}}::hf98dcba3d89e9394
                               at /Users/viktor/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.14.1/src/park/thread.rs:263:54
  18:        0x10aaf43e8 - tokio::coop::with_budget::{{closure}}::h8f3cef8a0094aa0a
                               at /Users/viktor/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.14.1/src/coop.rs:106:9
  19:        0x10aafbf0e - std::thread::local::LocalKey<T>::try_with::h2592c78968e826ec
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/thread/local.rs:445:16
  20:        0x10aafbcb4 - std::thread::local::LocalKey<T>::with::h7a0b1186cdee89b9
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/thread/local.rs:421:9
  21:        0x10ab0c4de - tokio::coop::with_budget::h60f98d0ff60a035c
                               at /Users/viktor/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.14.1/src/coop.rs:99:5
  22:        0x10ab0c4de - tokio::coop::budget::h8e386e495c4b0c28
                               at /Users/viktor/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.14.1/src/coop.rs:76:5
  23:        0x10ab0c4de - tokio::park::thread::CachedParkThread::block_on::h0c7bb7f1c9c5cfbe
                               at /Users/viktor/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.14.1/src/park/thread.rs:263:31
  24:        0x10ab0adcd - tokio::runtime::enter::Enter::block_on::h41508e85a19c1a26
                               at /Users/viktor/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.14.1/src/runtime/enter.rs:151:13
  25:        0x10aaf2eef - tokio::runtime::thread_pool::ThreadPool::block_on::h55293f9165436576
                               at /Users/viktor/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.14.1/src/runtime/thread_pool/mod.rs:77:9
  26:        0x10ab2d520 - tokio::runtime::Runtime::block_on::h78e12c21ffd62b54
                               at /Users/viktor/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.14.1/src/runtime/mod.rs:463:43
  27:        0x10ab1d180 - nft_metadata::upload_files_2::test_upload_file_from_path_with_sol::hb8917331bc9bc0dc
                               at /Users/viktor/SolanaWorkspace/nft-metadata/src/upload_files_2.rs:208:5
  28:        0x10ab0aa09 - nft_metadata::main::he3f7432529c9137b
                               at /Users/viktor/SolanaWorkspace/nft-metadata/src/main.rs:33:13
  29:        0x10aaff68e - core::ops::function::FnOnce::call_once::h2886063610811728
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/core/src/ops/function.rs:248:5
  30:        0x10aafc821 - std::sys_common::backtrace::__rust_begin_short_backtrace::hac21c6f8c37f6631
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/sys_common/backtrace.rs:122:18
  31:        0x10ab1c924 - std::rt::lang_start::{{closure}}::hab33639a50e1c439
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/rt.rs:145:18
  32:        0x10b4af28e - core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once::h7b036f15aca60adb
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/core/src/ops/function.rs:280:13
  33:        0x10b4af28e - std::panicking::try::do_call::hf6119ec0466800e8
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/panicking.rs:492:40
  34:        0x10b4af28e - std::panicking::try::hcda27a2b6f836f01
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/panicking.rs:456:19
  35:        0x10b4af28e - std::panic::catch_unwind::hde37ab35642f072b
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/panic.rs:137:14
  36:        0x10b4af28e - std::rt::lang_start_internal::{{closure}}::h103d9f9a51ce5b21
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/rt.rs:128:48
  37:        0x10b4af28e - std::panicking::try::do_call::h0e10440d51723322
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/panicking.rs:492:40
  38:        0x10b4af28e - std::panicking::try::h738bcf26bd63f912
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/panicking.rs:456:19
  39:        0x10b4af28e - std::panic::catch_unwind::hc9eba21b74d8966b
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/panic.rs:137:14
  40:        0x10b4af28e - std::rt::lang_start_internal::h3fd5cff071397f19
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/rt.rs:128:20
  41:        0x10ab1c8fe - std::rt::lang_start::h40d9b716e1344c4c
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/rt.rs:144:17
  42:        0x10ab0aa36 - _main
cod005hctln:src viktor$ 

my code:

 use arloader::{
    error::Error,
    solana::{SOLANA_MAIN_URL, SOL_AR_BASE_URL},
    utils::TempDir,
    Arweave,
};
use solana_sdk::signer::keypair;
use std::{path::PathBuf, str::FromStr};
use url::Url;

async fn get_arweave() -> Result<Arweave, Error> {
    let ar_keypair_path = PathBuf::from("/Users/viktor/SolanaWorkspace/arweave-key-CAJ7UsUYpeRAp4gb8-mm9k-6a2H8XEWTPQeGYzuFSOU.json");

    let arweave = match Arweave::from_keypair_path(
        ar_keypair_path,
        Url::from_str("https://arweave.net").unwrap(),
    )
    .await
    {
        Ok(arweave) => arweave,
        Err(e) => panic!("----- arweave error: {}", e),
    };

    Ok(arweave)
}

#[tokio::main]
pub async fn upload_file_with_sol() -> Result<(), Error> {
    let solana_url = SOLANA_MAIN_URL.parse::<Url>()?;
    let sol_ar_url = SOL_AR_BASE_URL.parse::<Url>()?.join("sol")?;
    let keypair = PathBuf::from("/Users/viktor/.config/solana/id.json");
    println!("{}", keypair.exists());

    let from_keypair = keypair::read_keypair_file("/Users/viktor/.config/solana/id.json")?;

    let arweave = get_arweave().await?;

    let file_path = PathBuf::from("tests/fixtures/1.json");
    let temp_log_dir = TempDir::from_str("tests/fixtures/").await?;
    let log_dir = temp_log_dir.0.clone();

    println!("------- solana_url: {}", solana_url);
    println!("------- sol_ar_url: {}", sol_ar_url);
    println!("------- file_path: {:?}", &file_path);
    println!("{}", file_path.exists());
    println!("------- log_dir: {:?}", log_dir);
    println!("{}", log_dir.exists());

    let status = arweave
        .upload_file_from_path_with_sol(
            file_path.clone(),
            None,
            None,
            None,
            (0, 0), // (5,5) doesn't work either
            solana_url.clone(),
            url::Url::parse("https://arloader.io/sol").unwrap(),
            &from_keypair,
        )
        .await;

    match status {
        Ok(x) => x,
        Err(err) => panic!("----- err: {:#}", err),
    };

    // println!("{:?}", status);

    let read_status = arweave.read_status(file_path, log_dir.clone()).await?;
    println!("{:?}", &read_status);
    Ok(())
}

README errors

From the README:

If you are creating your NFTs with the Metaplex Candy Machine, you can create a json file with links it that you can copy and paste into your candy machine config by running the command below. <FILE_PATHS> can match your either your asset or metadata files.

There are a few grammatical errors and typos highlighted in bold, but more importantly: is this actually correct, or does this command require specifying the file paths for the metadata JSON files? If I specify assets/*.png I get Error: IOError(Error { kind: InvalidData, message: "stream did not contain valid UTF-8" }). I would expect this command to only operate on assets/*.json and that does indeed work.

get-status JSON output panics

  • Installed through cargo on macOS.
  • Attempting to get status of a tx with JSON output panics
  • This tx is pending at the time
arloader get-status Y-sqEXggvUCoGaeYJfpGKg7LLNCORBiAGBKyG5aYIhM --output json
thread 'main' panicked at 'byte index 32 is out of bounds of ``', library/core/src/str/mod.rs:107:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Getting StatusCodeNotOk errors after trying to upload with SOL

Hi, this is my first time using your tool and I've been having issues all day trying to upload a single png/json pair. The operation fails but the SOL do get deducted from my wallet each time.

The same issues happen both when running upload or upload-nfts. This is what I'm doing (I'm using mainnet-beta):

arloader upload assets/0.png --sol-keypair-path ~/.config/solana/my_wallet_keypair.json --with-sol --ar-default-keypair
output:

Uploading 1 files with 93 KB of data in 1 bundle transactions...

StatusCodeNotOk

Uploaded 0 KB in 0 files in 0 bundle transaction(s). Run `arloader update-status assets/arloader_2Ot4PVp1jrA` to update statuses.

or
arloader upload-nfts assets/*.png --with-sol --sol-keypair-path ~/.config/solana/my_wallet_keypair.json --ar-default-keypair
output:

Uploading assets...

Uploading 1 files with 93 KB of data in 1 bundle transactions...

Retrying Solana transaction (1 of 10)...
StatusCodeNotOk

Uploaded 0 KB in 0 files in 0 bundle transaction(s). Run `arloader update-status assets/arloader_nk2gGXUQ7C8/assets/` to update statuses.

Uploading manifest for images...

No bundle statuses found in assets/arloader_nk2gGXUQ7C8/assets/
thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', /Users/mjuarezlopez/.cargo/registry/src/github.com-1ecc6299db9ec823/arloader-0.1.60/src/commands.rs:802:6

Both operations create empty arloader_<RANDOM_CHARS> folders.

I tried using --reward-multiplier of 2 and 3 without luck. I also tried using the --no-bundle option with upload command but that doesn't seem to work at all.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.