-
Notifications
You must be signed in to change notification settings - Fork 66
Problem: no safe stake tx retry logic in client-* #1293
Comments
some ideas for solution parts:
|
I think it's more flexible to provide
EDIT: there'll be issues with utxo state, and pending logic. |
For development / integration tests,
|
Currently, when the transaction failed in abci, what happens to the related utxo state and pending state in client? They won't recover I think? |
I think it gets removed after some number of blocks since the recorded pending info? @linfeng-crypto |
After some further thought, fetch nonce and retry the transaction, if the node connected to is not trusted, it'll again subject to the replay attack, because the node can retain the transactions signed against different nonces? |
Internal staking mutations and nonceInternal staking mutations cases
Increase nonce or notWhen internal staking mutation happens, should we increase the nonce or not? Both can prevent replay attacks. IncreaseThe semantic of the nonce is the update counter of staking state. Pros
Cons
Not increase
The semantic of the nonce is the number of transactions sent from a given address, From another angle, the nonce only increased if the tx has a witness for this staking address, e.g. only the owner is able to change it. Pros
Cons
|
only "nonce" -- only one of them is valid -- there's no replay. the client runs the light client verification -- altogether with retrieving the staked state, it should also ask for the inclusion proof:
(in the light client verification, the client needs to keep track of the trie root when verifying app hash) I guess it's not doing it right now? |
probably docs can be updated and code that nonce here will be the "(from) transaction counter" (it was like that before it got more complex) -- cons are some other things may still go wrong from the point of the client, so it's a question whether to also include e.g. expected input amount in tx payload that would get cross-checked. increasing nonce only for withdraw/unbond/unjail/joinnode makes sense |
Yeah, client hasn't verified the inclusion proof of staking state yet. |
ok, opened: #1313 |
nonce logic update: |
as per crypto-org-chain/chain-docs#112 (comment)
if the amounts or core items (e.g. jailed) did not change, a new tx against an updated nonce may be re-created
The text was updated successfully, but these errors were encountered: