You are viewing a single comment's thread from:

RE: Radiator Update: Getting Ready for Transaction Signing

in #radiator9 years ago

I'm not familiar with ruby...

am i understand correctly that the tx.expiration keep changing on each loop of signature generation?

      loop do
        @expiration += 1
        sig = ec.sign_compact(digest_hex, @private_key.priv, public_key_hex)
        
        next if public_key_hex != ec.recover_compact(digest_hex, sig)
        
        return sig if canonical? sig
      end

https://github.com/inertia186/radiator/blob/master/lib/radiator/transaction.rb#L102

Sort:  

Correct. It adds a second for each generation attempt. That's probably way too much time to add, but it hasn't been an issue.

Graphenej does this too, but they only add 1 millisecond per iteration. I should probably do the same.

https://github.com/kenCode-de/graphenej/blob/master/graphenej/src/main/java/de/bitsharesmunich/graphenej/Transaction.java#L145

this step is redundant IMO....

but it's okay if the users are aware of it.

  • he can't set a fixed expiration,
  • tx_id can't be determined until signing done.

Good point. I'll keep that in mind. Maybe it'd be better as an option, then make the default disabled.

Coin Marketplace

STEEM 0.06
TRX 0.31
JST 0.060
BTC 70164.23
ETH 2133.34
USDT 1.00
SBD 0.51