Comments (24)
I managed to recreate. I will look into it and report when fixed.
Thank you very much!
from gotham-city.
well, you are right. now I really don't have explanation, I will dive deep and let you know
from gotham-city.
Hi,
I think your problem might be that you are not waiting for enough confirmation between receiving and sending.
Try to start new wallet. receive btc. wait until your wallet show you a positive balance (not pending, us e -b
to see balance). Once enough time passed try to send. let us know if you still get the error.
from gotham-city.
Hello @omershlo ,
Thank you for your fast response 👍 .
I'd checked, via the wallet and also via a neural site (blockcypher.com)
from gotham-city.
I will try to recreate it. Can you provide more details pleas?
the exact flow of commands you used maybe?
cc: @oleiba , if you saw it before.
from gotham-city.
Hello,
The steps were:
cli create-wallet
cli wallet -a //get address1
Got the address then go to a faucet, fund it. (Got 1 million satoshis)
cli wallet -a //add one more address
cli wallet send -t address1 amount 1000 satoshis //this done successfully
cli wallet send -t outside address
-> get negative output here
from gotham-city.
upload the wallet.data file for yor ease to recreate.
wallet.data.txt
from gotham-city.
what is the amount you sent to the outside address?
what are the balance and pending values at time of failed send?
from gotham-city.
I send only 10_000 satoshis outside, the total amount in the wallet is 1 million, though. The exact balance and pending value, I've did a screenshot from the privious comment. Pending value is 0 when do the transaction.
from gotham-city.
I got it!
even though you say the number are 1m and 10k in fact from the screenshots it looks that you had balance of 1340711 and you sent ALL: 1340711. Please make sure to always specify the amount you want to send and make sure you have enough for change.
from gotham-city.
Sorry my friend,
The last command used to send outside was:
./cli wallet send -t mo544wyeKE47cV8k5ZRFsrMQjdkjaCGHey -a 0.00001000
So the amount was specified.
To be sure, I've just run the command "cli wallet -b" again. You can see that 1340711 (it's around 1m, right) still in the pocket
Thus, I think that it's not the real problem we got.
from gotham-city.
my claim was that you have 1340711 in balance and you try to send all without considering the 0.0001 constant fee. You should try to send no more than balance - 0.0001BTC
.
I might be wrong of-course. I will try to follow your steps.
from gotham-city.
You should try to send no more than balance - 0.0001BTC.
Sure, you can see in the last command, I set the amount only "-a 0.00001"
I will try to follow your steps.
Thank you, please help me. I attach the file wallet.data in previous comment. You can take it any time.
from gotham-city.
I just remembered that this is probably a known old issue that the wallet was not able to do more than 1 transaction. I fixed it my branch: #18 (use legacy wallet and legacy send). Please make sure it works on this branch while I am deploying the fix to master
from gotham-city.
Hello,
I guess that these are the commands to use:
./cli create-wallet-legacy
./cli wallet-legacy -a
./cli wallet-legacy -b
./cli wallet-legacy send-legacy -t mo544wyeKE47cV8k5ZRFsrMQjdkjaCGHey -a 0.00001000
When I try (after delete wallet.data)
./cli create-wallet-legacy
Get this error
So, I put back wallet.data, and run
./cli wallet-legacy -b
./cli wallet-legacy send-legacy -t mo544wyeKE47cV8k5ZRFsrMQjdkjaCGHey -a 0.00001000
Then, the output's error
from gotham-city.
meanwhile - try do it without sending a transaction to yourself
from gotham-city.
I pushed some fix to my branch. try it now
from gotham-city.
working?
from gotham-city.
Hello :),
Now we get the result printed out. Still get the error, seems that the tx is not sent
from gotham-city.
Try again
from gotham-city.
from gotham-city.
I started from scratch to make sure and followed your scenario {generate address A, receive to address, generate new address, send x to A, send x to outside address (I used the one you used)}.
using my branch with legacy - it works fine. please try again from scratch as well. Here is the transcript from my machine.
There is one problem when one of my calls to electrum returned the error you faced but calling it a second later worked. I am not sure why is that - maybe network issue between me and the server. I will need to understand it better but I think that the edge case that was discovered in this issue was solved (the problem was that we forgot to include the fee as part of the coin selection algorithm)
➜ gotham-client git:(gg18_v1) ./target/release/cli create-wallet-legacy
Network: [testnet], Creating wallet
(id: ecd0b44d-deef-412b-b01f-ec2bf6245d3f) Took: PT0.924541056S
Network: [testnet], Wallet saved to disk
Network: [testnet], Escrow initiated
➜ gotham-client git:(gg18_v1) ./target/release/cli wallet-legacy -a
Network: [testnet], Address: [tb1qgj6f2y808nu84vgjt49nsz96tpmmh3y6av7my6]
➜ gotham-client git:(gg18_v1) ./target/release/cli wallet-legacy -b
Network: [testnet], Balance: [balance: 0, pending: 1000000]
➜ gotham-client git:(gg18_v1) ./target/release/cli wallet-legacy -b
Network: [testnet], Balance: [balance: 1000000, pending: 0]
➜ gotham-client git:(gg18_v1) ./target/release/cli wallet-legacy -a
Network: [testnet], Address: [tb1qrf4dnf079rr3uleltfewnpnusnsc7rj2aagv6u]
➜ gotham-client git:(gg18_v1) RUST_BACKTRACE=1 ./target/release/cli wallet-legacy send-legacy -t tb1qrf4dnf079rr3uleltfewnpnusnsc7rj2aagv6u -a 0.0001
total selected : 1000000
amount_satoshi : 10000
fees : 10000
result : 980000
(id: ecd0b44d-deef-412b-b01f-ec2bf6245d3f) Took: PT1.226775308S
raw: "00000000000101d0d24a027ae1f1440800c01293b73e5a01f3b877b52bd055dd39adf8e6f8c0df0100000000ffffffff0210270000000000001600141a6ad9a5fe28c71e7f3f5a72e9867c84e18f0e4a20f40e0000000000160014588cbd58568fb325017996a526440a9d577ddc7002473044022076ab0a300f2f56a00a7bcc8cd6441e8c31af433bb6af71d4316fc824b0deb82702203f6e0c95b0288602fc86430de89d39d7548966b57b4f8e3cc1d746dd864e3fca01210245bdcaab0213826cffc412103a8bf359c63043aed55e754e119da77467f3e4ad00000000"
Network: [testnet], Sent 0.0001 BTC to address tb1qrf4dnf079rr3uleltfewnpnusnsc7rj2aagv6u. Transaction ID: ac539940bf33c0d301606c7cab12271c53327f9de605ece91331ed273712b5cf
➜ gotham-client git:(gg18_v1) ./target/release/cli wallet-legacy -b
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Error("invalid value: integer `-1000000`, expected u64", line: 1, column: 76)', src/libcore/result.rs:997:5
note: Run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
➜ gotham-client git:(gg18_v1) ./target/release/cli wallet-legacy -b
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Error("invalid value: integer `-1000000`, expected u64", line: 1, column: 76)', src/libcore/result.rs:997:5
note: Run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
➜ gotham-client git:(gg18_v1) ./target/release/cli wallet-legacy -b
Network: [testnet], Balance: [balance: 990000, pending: 0]
➜ gotham-client git:(gg18_v1) RUST_BACKTRACE=1 ./target/release/cli wallet-legacy send-legacy -t mo544wyeKE47cV8k5ZRFsrMQjdkjaCGHey -a 0.0001
total selected : 990000
amount_satoshi : 10000
fees : 10000
result : 970000
(id: ecd0b44d-deef-412b-b01f-ec2bf6245d3f) Took: PT1.454316835S
(id: ecd0b44d-deef-412b-b01f-ec2bf6245d3f) Took: PT1.064589936S
raw: "00000000000102cfb5123727ed3113e9ec05e69d7f32531c2712ab7c6c6001d3c033bf409953ac0000000000ffffffffcfb5123727ed3113e9ec05e69d7f32531c2712ab7c6c6001d3c033bf409953ac0100000000ffffffff0210270000000000001976a91452db02dda5c812097c67307ee63c23c22ea955e288ac10cd0e000000000016001495e37ef14b24b48d200eb3f1d1a64ad4fd8095610247304402207c83dca46a3b495978f6707ed9100ea59e57cd6fda166ee91d3854b60b8d99620220064e8b0a4a1994f842e8bea95a6f6f549aa1980f47b0b62513d2192477e2348d012102d48ccac10c6aeddafb326576c272af30105051e007f7814dd56d7243da6b4b0a0247304402200d4a5e6c87ed4a556423767b1e46eafdda0ddeb3769c839875eac34cd6c04244022068167dbc2a65ea7aa5fd117ab05077aa9283cd80c89d2984f9c7fbc20a9b44ef0121034ec74f35774dc2e4b0d0d91109a6c312830e82e6fa1e736ca43acea240cab9a100000000"
Network: [testnet], Sent 0.0001 BTC to address mo544wyeKE47cV8k5ZRFsrMQjdkjaCGHey. Transaction ID: 5e52a06e87f04ff088d3a866c78159ad263254f9f0b53e803a91abd6ae5b7fe9
➜ gotham-client git:(gg18_v1) ./target/release/cli wallet-legacy -b
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Error("invalid value: integer `-10000`, expected u64", line: 1, column: 72)', src/libcore/result.rs:997:5
note: Run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
➜ gotham-client git:(gg18_v1) cargo build --release
Compiling gotham-client v0.1.0 (/Users/omershlo/Downloads/from_github/gotham-city/gotham-client)
Finished release [optimized] target(s) in 19.57s
➜ gotham-client git:(gg18_v1) ./target/release/cli wallet-legacy -b
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Error("invalid value: integer `-10000`, expected u64", line: 1, column: 72)', src/libcore/result.rs:997:5
note: Run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
➜ gotham-client git:(gg18_v1) ./target/release/cli wallet-legacy -b
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Error("invalid value: integer `-10000`, expected u64", line: 1, column: 72)', src/libcore/result.rs:997:5
note: Run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
➜ gotham-client git:(gg18_v1) ./target/release/cli wallet-legacy -b
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Error("invalid value: integer `-10000`, expected u64", line: 1, column: 72)', src/libcore/result.rs:997:5
note: Run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
➜ gotham-client git:(gg18_v1) ./target/release/cli wallet-legacy -b
Network: [testnet], Balance: [balance: 970000, pending: 0]
➜ gotham-client git:(gg18_v1) RUST_BACKTRACE=1 ./target/release/cli wallet-legacy send-legacy -t mo544wyeKE47cV8k5ZRFsrMQjdkjaCGHey -a 0.0001
(id: ecd0b44d-deef-412b-b01f-ec2bf6245d3f) Took: PT1.204025821S
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Error("missing field `result`", line: 1, column: 189)', src/libcore/result.rs:997:5
stack backtrace:
0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace
1: std::sys_common::backtrace::_print
2: std::panicking::default_hook::{{closure}}
3: std::panicking::default_hook
4: std::panicking::rust_panic_with_hook
5: std::panicking::continue_panic_fmt
6: rust_begin_unwind
7: core::panicking::panic_fmt
8: core::result::unwrap_failed
9: client_lib::wallet::Wallet::send
10: cli::main
11: std::rt::lang_start::{{closure}}
12: std::panicking::try::do_call
13: __rust_maybe_catch_panic
14: std::rt::lang_start_internal
15: main
➜ gotham-client git:(gg18_v1) RUST_BACKTRACE=1 ./target/release/cli wallet-legacy send-legacy -t mo544wyeKE47cV8k5ZRFsrMQjdkjaCGHey -a 0.0001
(id: ecd0b44d-deef-412b-b01f-ec2bf6245d3f) Took: PT1.049966127S
Network: [testnet], Sent 0.0001 BTC to address mo544wyeKE47cV8k5ZRFsrMQjdkjaCGHey. Transaction ID: ece39a1c67c291024948df8a8ce4c42b618251af5f1a65ecda616fc2b1054084
➜ gotham-client git:(gg18_v1) ./target/release/cli wallet-legacy -b
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Error("invalid value: integer `-970000`, expected u64", line: 1, column: 74)', src/libcore/result.rs:997:5
note: Run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
➜ gotham-client git:(gg18_v1) ./target/release/cli wallet-legacy -b
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Error("invalid value: integer `-970000`, expected u64", line: 1, column: 74)', src/libcore/result.rs:997:5
note: Run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
➜ gotham-client git:(gg18_v1) ./target/release/cli wallet-legacy -b
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 60, kind: TimedOut, message: "Operation timed out" }', src/libcore/result.rs:997:5
note: Run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
➜ gotham-client git:(gg18_v1) ./target/release/cli wallet-legacy -b
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Error("invalid value: integer `-970000`, expected u64", line: 1, column: 74)', src/libcore/result.rs:997:5
note: Run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
➜ gotham-client git:(gg18_v1) ./target/release/cli wallet-legacy -b
Network: [testnet], Balance: [balance: 950000, pending: 0]
➜ gotham-client git:(gg18_v1) RUST_BACKTRACE=1 ./target/release/cli wallet-legacy send-legacy -t mo544wyeKE47cV8k5ZRFsrMQjdkjaCGHey -a 0.0001
(id: ecd0b44d-deef-412b-b01f-ec2bf6245d3f) Took: PT1.641642987S
Network: [testnet], Sent 0.0001 BTC to address mo544wyeKE47cV8k5ZRFsrMQjdkjaCGHey. Transaction ID: e43fe72671116da355edcda991571da56734ee3072a251a58823334f739f8925
from gotham-city.
👍 It looks promising. I'll try do it again later when comeback and update the result for you.
from gotham-city.
Closing, please reopen if you see need.
from gotham-city.
Related Issues (17)
- send same transcation with one address,but sign result not some HOT 11
- Can I get the full private key? HOT 5
- Eliminate SerDes of PrivateShare and MasterKeys
- How do I get the master address and master key right after create the wallet HOT 4
- Enforce git-flow, PR and squash commit
- Cross Compile & Link Gotham Client and GMP for Android Architectures HOT 5
- feature has been removed HOT 1
- Zeroize version issue HOT 1
- Gotham goes real
- The security of client in gotham-city HOT 2
- I use rust toolchain [rustc 1.72.0-nightly (8b35c0bb0 2023-06-08)] to compile the work space, but error appears HOT 2
- [FEAT]: enable the client cli with v1.0.0
- Runtime comparison HOT 4
- [BUG]:build failed
- [FEAT]: port to gotham-engine all the http endpoints and make gotham-city depend on gotham engine
- Build Error due to conflicting versions of two_party_ecdsa crate HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gotham-city.