Author Topic: Why not wait for N blocks instead of using the delayed node?  (Read 1982 times)

0 Members and 1 Guest are viewing this topic.

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

  • Board Moderator
  • Hero Member
  • *****
  • Posts: 12922
  • ChainSquad GmbH
    • View Profile
    • ChainSquad GmbH
  • BitShares: xeroc
  • GitHub: 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

Offline monsterer

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

Offline xeroc

  • Board Moderator
  • Hero Member
  • *****
  • Posts: 12922
  • ChainSquad GmbH
    • View Profile
    • ChainSquad GmbH
  • BitShares: xeroc
  • GitHub: xeroc
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 ..

Offline monsterer

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

Offline bytemaster

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: 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 ElMato

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

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