Why not wait for N blocks instead of using the delayed node?

Started by monsterer, October 08, 2015, 02:42:41 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

bytemaster

just monitor the dynamic_global_properties (object 1.2.0)  for last_irreversible_block_num and then verify that any operations you process have a block number that is less than that.   If you do that you should be good.

Just beware that if you shutdown the last irreversible block number may move back a few places, so don't use last irreversible block number as the placeholder for the blocks you have already processed.
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.

xeroc

I am currently in china and can't really work a lot (due to fu*** up internet) .. I will try to figure this out ASAP .. in the meantime I would recommend you play around with object ids and stuff .. maybe the objects "1.11.*" contain an indicator on how often the operation has been confirmed already

monsterer

Quote from: xeroc on October 13, 2015, 02:10:14 PM
you can use both .. can't you? not sure but I think the transaction details contain a parameter that indicates how many blocks need to be waited till irreversibility .. if not .. if could CERTAINLY be added ..

I really don't want to maintain multiple executables just to support one coin type, if possible.
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

xeroc

Quote from: monsterer on October 12, 2015, 07:55:21 PM
Quote from: bytemaster on October 08, 2015, 09:39:12 PM
The benefit of the delayed node is that you never even see the unconfirmed transactions and thus never have the opportunity to make a mistake.   

Also there is some chain state that is not contained fully in the transaction, so if you wanted to know information such as your confirmed cash-back rewards then you would need a delayed node to tell you.

Metaexchange will need show pending transactions for responsiveness, so we will need to use the full node, rather than the delayed node, I think.
you can use both .. can't you? not sure but I think the transaction details contain a parameter that indicates how many blocks need to be waited till irreversibility .. if not .. if could CERTAINLY be added ..

monsterer

Quote from: bytemaster on October 08, 2015, 09:39:12 PM
The benefit of the delayed node is that you never even see the unconfirmed transactions and thus never have the opportunity to make a mistake.   

Also there is some chain state that is not contained fully in the transaction, so if you wanted to know information such as your confirmed cash-back rewards then you would need a delayed node to tell you.

Metaexchange will need show pending transactions for responsiveness, so we will need to use the full node, rather than the delayed node, I think.
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: ElMato on October 08, 2015, 09:30:06 PM
I think it's possible but it will require more work on your side.

You will need to keep track of every transfer operation to know if they are "confirmed" or not.

You are correct.  In the GUI we indicate which operations have been irreversibly confirmed and you could use such a system.

The benefit of the delayed node is that you never even see the unconfirmed transactions and thus never have the opportunity to make a mistake.   

Also there is some chain state that is not contained fully in the transaction, so if you wanted to know information such as your confirmed cash-back rewards then you would need a delayed node to tell you.   
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.

ElMato

I think it's possible but it will require more work on your side.

You will need to keep track of every transfer operation to know if they are "confirmed" or not.

monsterer

Is there another advantage to using a delayed node that wouldn't be afforded by waiting N blocks on a trusted node?

I'd like to be able to minimise the number of executables I need to maintain because it's easier that way.
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