Any block explorer site that can look up a transaction by txid?

Started by monsterer, October 27, 2015, 05:16:40 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

monsterer

Quote from: roadscape on October 27, 2015, 10:34:54 PM
Ok.. txs can now be looked up by hash (if they were included in a block):

http://cryptofresh.com/tx/a5fea9b2abaaededabd4bd9af22e1e95da9f8ef2

I still don't get why get_block returns the hash but NOT the id... and get_object(1.11.x) returns the id and block_num but NOT the hash.
Is there any way to get the tx id and hash in the same call?

That is fantastic! Thank you very much-  I'll get that integrated into metaexchange :)
My opinions do not represent those of metaexchange unless explicitly stated.
[url="https://metaexchange.info"]https://metaexchange.info[/url] | Bitcoin<->Altcoin exchange | Instant | Safe | Low spreads

roadscape

Quote from: bytemaster on October 27, 2015, 10:49:40 PM
Quote from: roadscape on October 27, 2015, 10:34:54 PM
Ok.. txs can now be looked up by hash (if they were included in a block):

http://cryptofresh.com/tx/a5fea9b2abaaededabd4bd9af22e1e95da9f8ef2

I still don't get why get_block returns the hash but NOT the id... and get_object(1.11.x) returns the id and block_num but NOT the hash.
Is there any way to get the tx id and hash in the same call?

Great work but it should probably include the block number the transaction was included in as well.

Also, the URL should support the confirmation ID format used in the GUI

#c0099400499b5a18c383916c56240871906bf686@92856

Ok: http://cryptofresh.com/tx/f1353039b90d6d90f0968c3ee7593d2603a4008e@408275
http://cryptofresh.com  |  witness: roadscape

bytemaster

Quote from: roadscape on October 27, 2015, 10:34:54 PM
Ok.. txs can now be looked up by hash (if they were included in a block):

http://cryptofresh.com/tx/a5fea9b2abaaededabd4bd9af22e1e95da9f8ef2

I still don't get why get_block returns the hash but NOT the id... and get_object(1.11.x) returns the id and block_num but NOT the hash.
Is there any way to get the tx id and hash in the same call?

Great work but it should probably include the block number the transaction was included in as well.

Also, the URL should support the confirmation ID format used in the GUI

#c0099400499b5a18c383916c56240871906bf686@92856
For the latest updates checkout my blog: [url="http://bytemaster.bitshares.org"]http://bytemaster.bitshares.org[/url]
Anything said on these forums does not constitute an intent to create a legal obligation or contract between myself and anyone else.   These are merely my opinions and I reserve the right to change them at any time.

roadscape

Ok.. txs can now be looked up by hash (if they were included in a block):

http://cryptofresh.com/tx/a5fea9b2abaaededabd4bd9af22e1e95da9f8ef2

I still don't get why get_block returns the hash but NOT the id... and get_object(1.11.x) returns the id and block_num but NOT the hash.
Is there any way to get the tx id and hash in the same call?
http://cryptofresh.com  |  witness: roadscape

monsterer

Quote from: bytemaster on October 27, 2015, 09:40:39 PM
Just because you know the transaction from the ID doesn't mean you know it is VALID.

This is true. But I wouldn't expect the wallet to keep track of invalid transactions.
My opinions do not represent those of metaexchange unless explicitly stated.
[url="https://metaexchange.info"]https://metaexchange.info[/url] | Bitcoin<->Altcoin exchange | Instant | Safe | Low spreads

bytemaster

Quote from: monsterer on October 27, 2015, 07:26:29 PM
Quote from: bytemaster on October 27, 2015, 06:49:23 PM
There are several things going on here.

1.  Given a Transaction ID you want to find the Transaction.
2.  You want to know which Block the transaction was included in.

It would be relatively simple to add this to the existing API *except* that the node running with this feature enabled would require extra RAM.

I don't need 2 at all, I just need 1, but for any transaction.

I certainly wouldn't advise storing such a map in ram; this is a prime candidate for a database.

Just because you know the transaction from the ID doesn't mean you know it is VALID.
For the latest updates checkout my blog: [url="http://bytemaster.bitshares.org"]http://bytemaster.bitshares.org[/url]
Anything said on these forums does not constitute an intent to create a legal obligation or contract between myself and anyone else.   These are merely my opinions and I reserve the right to change them at any time.

monsterer

Quote from: bytemaster on October 27, 2015, 06:49:23 PM
There are several things going on here.

1.  Given a Transaction ID you want to find the Transaction.
2.  You want to know which Block the transaction was included in.

It would be relatively simple to add this to the existing API *except* that the node running with this feature enabled would require extra RAM.

I don't need 2 at all, I just need 1, but for any transaction.

I certainly wouldn't advise storing such a map in ram; this is a prime candidate for a database.
My opinions do not represent those of metaexchange unless explicitly stated.
[url="https://metaexchange.info"]https://metaexchange.info[/url] | Bitcoin<->Altcoin exchange | Instant | Safe | Low spreads

bytemaster

There are several things going on here.

1.  Given a Transaction ID you want to find the Transaction.
2.  You want to know which Block the transaction was included in.

It would be relatively simple to add this to the existing API *except* that the node running with this feature enabled would require extra RAM.
For the latest updates checkout my blog: [url="http://bytemaster.bitshares.org"]http://bytemaster.bitshares.org[/url]
Anything said on these forums does not constitute an intent to create a legal obligation or contract between myself and anyone else.   These are merely my opinions and I reserve the right to change them at any time.

ByronP

I use the nonce returned in signed_transaction and then get the history and match the nonces then keep the id. I have not had a problem so far do you foresee any issues with this route?

monsterer

Quote from: roadscape on October 27, 2015, 06:02:12 PM
Hmm.. I haven't dealt with any hashes yet. Is there any way to do a lookup on this hash or do I need to implement some form of hash-id map manually?

There is get_recent_transaction_by_id which works for some amount of time. When that fails, I trawl through each block looking in the transaction_ids array inside each block.

Really the wallet should support full queries for this.
My opinions do not represent those of metaexchange unless explicitly stated.
[url="https://metaexchange.info"]https://metaexchange.info[/url] | Bitcoin<->Altcoin exchange | Instant | Safe | Low spreads

monsterer

Quote from: ByronP on October 27, 2015, 06:17:16 PM
Why keep a long hash instead of a simple set of numbers?

I ask because I am not keeping track of the hash just the id.

Because when you send a transaction, the object id isn't known, making it rather difficult to log :)
My opinions do not represent those of metaexchange unless explicitly stated.
[url="https://metaexchange.info"]https://metaexchange.info[/url] | Bitcoin<->Altcoin exchange | Instant | Safe | Low spreads

ByronP

Why keep a long hash instead of a simple set of numbers?

I ask because I am not keeping track of the hash just the id.

roadscape

Quote from: monsterer on October 27, 2015, 05:57:39 PM
Quote from: roadscape on October 27, 2015, 05:42:55 PM
How's this for URL format? What's the easiest?
http://cryptofresh.com/tx/1.11.1111

It will look much better in a week or two :)

For metaexchange it needs to be the hash form, not the object id, so like:

http://cryptofresh.com/tx/a5fea9b2abaaededabd4bd9af22e1e95da9f8ef2

If you could do that, it would be awesome!

Hmm.. I haven't dealt with any hashes yet. Is there any way to do a lookup on this hash or do I need to implement some form of hash-id map manually?
http://cryptofresh.com  |  witness: roadscape

monsterer

Quote from: roadscape on October 27, 2015, 05:42:55 PM
How's this for URL format? What's the easiest?
http://cryptofresh.com/tx/1.11.1111

It will look much better in a week or two :)

For metaexchange it needs to be the hash form, not the object id, so like:

http://cryptofresh.com/tx/a5fea9b2abaaededabd4bd9af22e1e95da9f8ef2

If you could do that, it would be awesome!
My opinions do not represent those of metaexchange unless explicitly stated.
[url="https://metaexchange.info"]https://metaexchange.info[/url] | Bitcoin<->Altcoin exchange | Instant | Safe | Low spreads

roadscape

How's this for URL format? What's the easiest?
http://cryptofresh.com/tx/1.11.1111

It will look much better in a week or two :)
http://cryptofresh.com  |  witness: roadscape

monsterer

I'd like to update the link to transactions in metaexchange's display, but I'm not sure if any website yet provides a TXID lookup URL?
My opinions do not represent those of metaexchange unless explicitly stated.
[url="https://metaexchange.info"]https://metaexchange.info[/url] | Bitcoin<->Altcoin exchange | Instant | Safe | Low spreads