Author Topic: Any block explorer site that can look up a transaction by txid?  (Read 5680 times)

0 Members and 1 Guest are viewing this topic.

Offline monsterer

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.
https://metaexchange.info | Bitcoin<->Altcoin exchange | Instant | Safe | Low spreads

Offline 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?

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

Offline bytemaster

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: http://bytemaster.bitshares.org
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.

Offline 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

Offline monsterer

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.
https://metaexchange.info | Bitcoin<->Altcoin exchange | Instant | Safe | Low spreads

Offline 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.

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: http://bytemaster.bitshares.org
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.

Offline monsterer

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.
https://metaexchange.info | Bitcoin<->Altcoin exchange | Instant | Safe | Low spreads

Offline 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: http://bytemaster.bitshares.org
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.

Offline ByronP

  • Full Member
  • ***
  • Posts: 70
    • View Profile
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?

Offline monsterer

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.
https://metaexchange.info | Bitcoin<->Altcoin exchange | Instant | Safe | Low spreads

Offline monsterer

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.
https://metaexchange.info | Bitcoin<->Altcoin exchange | Instant | Safe | Low spreads

Offline ByronP

  • Full Member
  • ***
  • Posts: 70
    • View Profile
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.

Offline 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 :)

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

Offline monsterer

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.
https://metaexchange.info | Bitcoin<->Altcoin exchange | Instant | Safe | Low spreads

Offline 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