-
Notifications
You must be signed in to change notification settings - Fork 137
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tx validity interval instead of block_hash+global validity length #56
Comments
If we use epoch id then it doesn't make transaction any smaller.
This seems pretty important to me. |
What problem you are trying to solve with the height intervals? You mention replay attacks at the beginning, but then (correctly) point out that height ranges doesn't solve replay attacks. Replay attacks from the testnet can be solved by adding one byte network ID in the transactions. Replay attacks from other forks doesn't really need to be solved because it's practically a non-existent problem in a BFT-chain. To defend against a delay attack we can include a 3-byte epoch ordinal. With half-a-day epochs it gives you 23K years until you run out of range. Thus 4 bytes gives you both a replay attack protection and the delay attack protection. |
I think that users should be able to specify validity period for their transactions. Maybe they need more time to sign a transaction (e.g. because they need to physically move it to some airgapped device with a private key), or they want to sign it now and release later. If we want to save 32 bytes of transaction size, we can use signatures that allow key recovery, then we won't need to store the key. Or replace the key with some short ID (actual keys are stored in account state anyway). Also, when storing a transaction in a block, the included block hash can be replaced with the corresponding block height. |
Then we can include the height range and the chain ID, and that should be enough. |
@evgenykuzyakov mentioned today that we also need tx validity from the gas side to limit how high can gas price go. Question if we can just use height range for this? |
Wouldn't that result in having pretty short height range? |
From this standpoint it will be no different than the validity interval. |
I don't think it's the same thing. In the case of preparing transactions very securely (from cold storage) it will likely take some time so the interval cannot be too small (at least several hours), which is unfit for the purpose of limiting gas price. |
I don't think it contradicts my point that from this standpoint it is no different from the validity interval? For the case of preparing the transaction from the cold storage, if we use validity interval, we need a large validity interval. If we use a height range, we need a long height range. For the case of limiting gas price, if we use validity interval, we need a short validity interval. If we use a height range, we need a short height range. From this standpoint height range is not different than the validity interval, no? |
Oh I see what you mean. Yes that's true. |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
Currently to defend against:
We require transaction to specify
block_hash
for some block on the chain it needs to be applied on. We also have global validity length, which specifies maximum amount of time from givenblock_hash
this transaction can be included.Algorand uses different method: they require in transaction to specify an interval of block heights where transaction is considered valid.
Pros:
Cons:
Also for alternative chains, we can leverage
epoch_id
or few other alternatives to identify chain.The text was updated successfully, but these errors were encountered: