Bitcoin Forum
November 02, 2024, 08:34:16 AM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: « 1 2 [3] 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 »  All
  Print  
Author Topic: [Nxt] API of Nxt  (Read 37317 times)
Come-from-Beyond
Legendary
*
Offline Offline

Activity: 2142
Merit: 1010

Newbie


View Profile
December 11, 2013, 09:44:53 AM
 #41

API method request: a way to get a list of transactions pending inclusion in blocks (a la bitcoind getmemorypool).

http://localhost:7874/nxt?requestType=getUnconfirmedTransactionIds (in 0.3.18)
GCInc.
Hero Member
*****
Offline Offline

Activity: 566
Merit: 500


View Profile WWW
December 11, 2013, 10:43:32 AM
 #42

getting
Code:
{"errorCode":6,"errorDescription":"Not enough funds"}
for small amounts of NXT

while

Code:
{"balance":112049900,"effectiveBalance":112049900,"unconfirmedBalance":-90021000}

What's with that?

Come-from-Beyond
Legendary
*
Offline Offline

Activity: 2142
Merit: 1010

Newbie


View Profile
December 11, 2013, 10:44:29 AM
 #43

getting
Code:
{"errorCode":6,"errorDescription":"Not enough funds"}
for small amounts of NXT

while

Code:
{"balance":112049900,"effectiveBalance":112049900,"unconfirmedBalance":-90021000}

What's with that?

Corrupted blockchain file.

Just restart and check again before redownloading the blockchain.
GCInc.
Hero Member
*****
Offline Offline

Activity: 566
Merit: 500


View Profile WWW
December 12, 2013, 12:50:53 PM
 #44

We have many times received a txid for submitted sendMoney transactions that have an invalid receiver account number and eventually do not go thru. Is that right?

Come-from-Beyond
Legendary
*
Offline Offline

Activity: 2142
Merit: 1010

Newbie


View Profile
December 12, 2013, 01:14:05 PM
 #45

We have many times received a txid for submitted sendMoney transactions that have an invalid receiver account number and eventually do not go thru. Is that right?

Could u post an example of such incorrect recipient account number?
GCInc.
Hero Member
*****
Offline Offline

Activity: 566
Merit: 500


View Profile WWW
December 12, 2013, 02:44:16 PM
 #46

Could u post an example of such incorrect recipient account number?
Will post one when it comes along again. I may have been mistaken, by coincidence some payments that had a space in the account number, or decimals in the amount are not going through even through the wrong format is parsed.

I suppose the system still gives a txid instantly even when the transaction does not eventually necessarily go through.? For instance we have a transfer of 10337 NXT with txid 7304505050048365739 returned by the API, yet this payment has not materialized in the blockchain explorer.

Come-from-Beyond
Legendary
*
Offline Offline

Activity: 2142
Merit: 1010

Newbie


View Profile
December 12, 2013, 03:02:51 PM
 #47

Could u post an example of such incorrect recipient account number?
Will post one when it comes along again. I may have been mistaken, by coincidence some payments that had a space in the account number, or decimals in the amount are not going through even through the wrong format is parsed.

I suppose the system still gives a txid instantly even when the transaction does not eventually necessarily go through.? For instance we have a transfer of 10337 NXT with txid 7304505050048365739 returned by the API, yet this payment has not materialized in the blockchain explorer.

Just like in Bitcoin if u send a transaction it's not guaranteed that it will be included into a block.
GCInc.
Hero Member
*****
Offline Offline

Activity: 566
Merit: 500


View Profile WWW
December 12, 2013, 07:39:39 PM
 #48

Just like in Bitcoin if u send a transaction it's not guaranteed that it will be included into a block.
Ok, but NXT blocks are not nearly full. What would constitute the reasons for not including a payment in the numerous empty blocks that appear before the deadline?

Come-from-Beyond
Legendary
*
Offline Offline

Activity: 2142
Merit: 1010

Newbie


View Profile
December 12, 2013, 07:42:41 PM
 #49

Just like in Bitcoin if u send a transaction it's not guaranteed that it will be included into a block.
Ok, but NXT blocks are not nearly full. What would constitute the reasons for not including a payment in the numerous empty blocks that appear before the deadline?

Network fragmentation. Make sure u use recent version and ur node is marked, this greatly increases chance to push a transaction.
GCInc.
Hero Member
*****
Offline Offline

Activity: 566
Merit: 500


View Profile WWW
December 12, 2013, 08:43:30 PM
 #50

Network fragmentation. Make sure u use recent version and ur node is marked, this greatly increases chance to push a transaction.
I think I have marked my node. How to verify this pls?

Come-from-Beyond
Legendary
*
Offline Offline

Activity: 2142
Merit: 1010

Newbie


View Profile
December 12, 2013, 08:45:13 PM
 #51

Network fragmentation. Make sure u use recent version and ur node is marked, this greatly increases chance to push a transaction.
I think I have marked my node. How to verify this pls?

Launch client from other node and check ur node in Active peers. It should have a non-zero weight set.
GCInc.
Hero Member
*****
Offline Offline

Activity: 566
Merit: 500


View Profile WWW
December 12, 2013, 10:08:05 PM
Last edit: December 13, 2013, 12:29:37 AM by GCInc.
 #52

Launch client from other node and check ur node in Active peers. It should have a non-zero weight set.
Right. Not in activepeers, had set up ip and hallmark. But just noticed http://localhost:7874/nxt?requestType=getMyInfo gives

Code:
{"host":"127.0.0.1","address":"127.0.0.1"}

How can I change the host to my static IP address? Thanks

Despite having set the IP, for some reason the node is not showing up in active peers.

More important: About the bogus txid received for sendMoney requests that are not included in blockchain; if we do getTransaction immediately after receiving the bogus txid, can we trust that the tx is not included in the blockchain at all (regardless of the deadline) if we get "Unknown transaction" as a reply?

Come-from-Beyond
Legendary
*
Offline Offline

Activity: 2142
Merit: 1010

Newbie


View Profile
December 13, 2013, 05:12:16 AM
 #53

More important: About the bogus txid received for sendMoney requests that are not included in blockchain; if we do getTransaction immediately after receiving the bogus txid, can we trust that the tx is not included in the blockchain at all (regardless of the deadline) if we get "Unknown transaction" as a reply?

NO.
Come-from-Beyond
Legendary
*
Offline Offline

Activity: 2142
Merit: 1010

Newbie


View Profile
December 13, 2013, 05:12:48 AM
 #54

Despite having set the IP, for some reason the node is not showing up in active peers.

PM me with ur hallmark plz.
GCInc.
Hero Member
*****
Offline Offline

Activity: 566
Merit: 500


View Profile WWW
December 13, 2013, 01:16:18 PM
 #55

More important: About the bogus txid received for sendMoney requests that are not included in blockchain; if we do getTransaction immediately after receiving the bogus txid, can we trust that the tx is not included in the blockchain at all (regardless of the deadline) if we get "Unknown transaction" as a reply?

NO.
Ok. So is there a simple way to see quickly what sendMoney requests have gone, or are going through? Do we need to wait until the deadline and then check all the txid in question for at least 1 confirmation?

Come-from-Beyond
Legendary
*
Offline Offline

Activity: 2142
Merit: 1010

Newbie


View Profile
December 13, 2013, 02:17:54 PM
 #56

More important: About the bogus txid received for sendMoney requests that are not included in blockchain; if we do getTransaction immediately after receiving the bogus txid, can we trust that the tx is not included in the blockchain at all (regardless of the deadline) if we get "Unknown transaction" as a reply?

NO.
Ok. So is there a simple way to see quickly what sendMoney requests have gone, or are going through? Do we need to wait until the deadline and then check all the txid in question for at least 1 confirmation?

After sendMoney do getTransaction.

1 confirmation is exactly the same as 0 confirmations.
GCInc.
Hero Member
*****
Offline Offline

Activity: 566
Merit: 500


View Profile WWW
December 13, 2013, 02:30:13 PM
 #57

After sendMoney do getTransaction.
Yes that's what I asked a few messages back, but you answered NO  Smiley. So we can only trust the tx that give valid output from getTransaction (at least 10 confirmations).

The other half or the problem remains:
What should we do with those tx for which we get valid-looking txid from sendMoney but they are not included in blockchain? They remain pending on our system until we can verify they are not included in blockchain. For how long should we wait before we can issue getTransaction and be sure the response given will be final?

Come-from-Beyond
Legendary
*
Offline Offline

Activity: 2142
Merit: 1010

Newbie


View Profile
December 13, 2013, 02:49:45 PM
 #58

Yes that's what I asked a few messages back, but you answered NO  Smiley. So we can only trust the tx that give valid output from getTransaction (at least 10 confirmations).

Oh, perhaps I didn't get one of ur questions...


The other half or the problem remains:
What should we do with those tx for which we get valid-looking txid from sendMoney but they are not included in blockchain? They remain pending on our system until we can verify they are not included in blockchain. For how long should we wait before we can issue getTransaction and be sure the response given will be final?

There is no "final" in cryptocurrencies. In Nxt a transaction must have 720 confirmations, this is the largest possible chain reorg depth.
GCInc.
Hero Member
*****
Offline Offline

Activity: 566
Merit: 500


View Profile WWW
December 13, 2013, 03:09:38 PM
 #59

There is no "final" in cryptocurrencies. In Nxt a transaction must have 720 confirmations, this is the largest possible chain reorg depth.
Yes. But For All Practical Purposes there must be a workaround to the serious problem we are facing with rejected transactions;

- we get txid for every sendMoney call we submit (not considering blockchain not up to date etc.)
- about 25% of these valid-looking txid are not valid, ie. the money sent does not reach the blockchain and not the recipient
- when you say we cannot trust getTransaction, we have no way of programmatically knowing which tx is validly forwarded which are not
- the only way to get a hint of the rejects, we have concluded, is to visually observe the NXT client to see which tx are getting through
- the visual method is very cumbersome, AND it is not certain as some tx will be validly forwarded later even if they are not immediately

The above procedure is not feasible for any business mass handling payments. Additionally, just a single payment of, say 1M NXT, erroneously twice to the same recipient because of not receiving coherent transaction acknowledgement, and the business would be in serious trouble  Huh

Come-from-Beyond
Legendary
*
Offline Offline

Activity: 2142
Merit: 1010

Newbie


View Profile
December 13, 2013, 03:15:12 PM
 #60

There is no "final" in cryptocurrencies. In Nxt a transaction must have 720 confirmations, this is the largest possible chain reorg depth.
Yes. But For All Practical Purposes there must be a workaround to the serious problem we are facing with rejected transactions;

- we get txid for every sendMoney call we submit (not considering blockchain not up to date etc.)
- about 25% of these valid-looking txid are not valid, ie. the money sent does not reach the blockchain and not the recipient
- when you say we cannot trust getTransaction, we have no way of programmatically knowing which tx is validly forwarded which are not
- the only way to get a hint of the rejects, we have concluded, is to visually observe the NXT client to see which tx are getting through
- the visual method is very cumbersome, AND it is not certain as some tx will be validly forwarded later even if they are not immediately

The above procedure is not feasible for any business mass handling payments. Additionally, just a single payment of, say 1M NXT, erroneously twice to the same recipient because of not receiving coherent transaction acknowledgement, and the business would be in serious trouble  Huh


U should use deadline. If u don't see a transaction after it expired then wait for 10+ (up to 720) more blocks and resend again. I'll enabled broadcastTransaction in next version, so u will be able to set 24h deadline and keep pushing the same transaction until it's confirmed.


Quote
- the only way to get a hint of the rejects, we have concluded, is to visually observe the NXT client to see which tx are getting through

getTransaction returns even unconfirmed transactions. No need to monitor interface.
Pages: « 1 2 [3] 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 »  All
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!