-
Notifications
You must be signed in to change notification settings - Fork 1
Transaction Processing #37
Comments
This comment has been minimized.
This comment has been minimized.
Regarding: |
Regarding |
q: can a layer be verified more than once? e.g. in case of after self-healing. if yes - can a tx be executed more than once? if yes, does the new receipts just over-ride the old receipts generated by executions of txs in that layer? |
Add to open questions: do we need to support additional transaction types beyond what we defined in this smipp? #23 |
Why? If a transaction causes an error early it will cost the system very little, and pay a proportional fee. Why call it an attack or discourage it? You may as well create a smart contract that does nothing and call that - it would be identical. Is that an attack?
This is an implementation detail - you're saying that instead of measuring actual consumed gas we'll query it from the contract - fine. Doesn't matter for the purpose of fee calculation.
Sure, but if a layer gets rolled back and re-applied then the state is also rolled back to before that layer. The transaction will be executed a second time, but the results of the first execution will be discarded.
This is being discussed in the context of transaction batching, counter/nonce and [dis]allowing gaps. I don't think it makes sense as a stand-alone question. |
There are reasons why all gas is consumed on smart contract runtime exception and this is how smart contract execution works in eth 1.0. Research should form a concrete opinion about this - I'm just raising this as a consideration. |
I agree with this assessment. There may be specific scenarios where a smart contract developer wants the contract to consume all remaining gas on an error, or in certain scenarios, but I can't think of any off the top of my head and it seems unnecessarily punitive in general. As @noamnelke pointed out,
There's a separate-but-related question here, which we discussed yesterday, and which is unique to the mesh: if a tx includes a very large maxgas, but only ends up consuming a small portion of that gas, it still fills block space and prevents other transactions from occupying that space. So we clearly have to charge something for unused maxgas. We need to think, and maybe try some simulations, to figure out whether the cost should be linear (e.g., 1/2 of unused maxgas) or sublinear (e.g., log of unused maxgas) or something else. |
A receipt includes a merkle proof of inclusion/execution of a tx (and points to the output). The old receipt would be meaningless as the state will have been updated (so its merkle proof would point nowhere). |
I raised this in the meeting and suggested charging some portion of the gas for unused maxgas. Tal agreed and called it a discount for the unused gas, that can be set anywhere between 0-100% (we probably don't want it at 100%). We didn't consider making it non-linear, but it's definitely something to consider. In any case, I think there's consensus that we'll charge something for unused maxgas and it's not critical to decide this early, as changing the exact formula should be easy. |
I suspect the "right" way to figure this out is by simulation. This is a
great example of a small, well-defined problem that has an optimal answer -
i.e., there is some number that will minimize waste (without sacrificing
security).
… |
implemented |
Transaction syntactic validation
See SMIP #23 for transaction structure and encoding.
Transaction counter/nonce and batching
We must decide on what makes the transaction counter/nonce valid and how to handle batching before specifying the following:
This topic, along with a proposal for adding a time-to-live value on each transaction, is discussed in this forum thread.
Gossip propagation criteria
Open questions
Transaction mempool admittance criteria
Open questions
Transaction mempool eviction
When one of the transaction mempool admittance criteria changes - transactions should be evicted.
Limits on block content
See forum thread.
There should be limits on:
The limits should be set such that the sum of the gas limit is the limiting factor. The other limits should be more relaxed, to make optimization easier in the common case.
Prioritization of transactions in the mempool for inclusion in blocks
Selecting specific transactions for a block from a prioritized list
Syntactic validation of blocks
Voting against blocks in the Hare protocol, if they have bad / too few transactions
Should we do something of this sort?
Withholding or granting rewards, based on included transactions
Should we do something of this sort?
Transaction processing [when a layer is validated]
Fees
gas_price x gas_limit
).Important note: While charging fees is part of this SMIP, distributing proceeds from fees to miners will be covered by a separate SMIP once the reward scheme is finalized.
Open questions
The text was updated successfully, but these errors were encountered: