标签:pop different which created alt HERE about ethereum case
EIP 161: State trie clearing - makes it possible to remove a large number of empty accounts that were put in the state at very low cost as a result of earlier DoS attacks. With this EIP, ‘empty‘ accounts are removed from the state whenever ‘touched‘ by another transaction. Removal of the empty accounts greatly reduces blockchain state size, which will provide client optimizations such as faster sync times. The actual removal process will begin after the fork by systematically performing `CALL` to the empty accounts that were created by the attacks.
可以删除由于早期DoS攻击攻击者以非常低的成本放入状态的大量空帐户。有了这个EIP,“空”账户在被另一个交易“触及”时就会从状态中删除。删除空帐户大大减少了区块链状态大小,这将提供更快的同步时间等客户端优化。实际的删除过程将在fork之后开始,系统地对攻击者创建的空帐户执行“调用”,一次来删除空账户。
eip | title | author | type | category | status | created |
---|---|---|---|---|---|---|
161
|
State trie clearing (invariant-preserving alternative)
|
Gavin Wood
|
Standards Track
|
Core
|
Final
|
2016-10-24
|
FORK_BLKNUM
: 2,675,000CHAIN_ID
: 1 (main net)a. Account creation transactions and the CREATE
operation SHALL, prior to the execution of the initialisation code, increment the nonce over and above its normal starting value by one (for normal networks, this will be simply 1, however test-nets with non-zero default starting nonces will be different).
帐户创建事务和创建操作在执行初始化代码之前,应将nonce在其正常初始值之上增加1个(对于正常的网络,这将是简单的1,但是具有非零默认启动nonces的测试网将是不同的)
b. Whereas CALL
and SUICIDE
would charge 25,000 gas when the destination is non-existent, now the charge SHALL only be levied if the operation transfers more than zero value and the destination account is dead.
虽然CALL
和SUICIDE
会在destination账户不存在的情况下收取25,000美元的燃气费用,但现在只有在操作转账超过零值且destination账户状态为dead时才会收取费用。
c. No account may change state from non-existent to existent-but-empty. If an operation would do this, the account SHALL instead remain non-existent.
任何帐户都不能将不存在状态更改为存在但为空状态。如果某个操作会这样做,则该帐户将保持不存在
d. At the end of the transaction, any account touched by the execution of that transaction which is now empty SHALL instead become non-existent (i.e. deleted).
在交易结束时,任何之前与交易执行有关但现在为空的账户都将变为不存在状态
Where:
An account is considered to be touched when it is involved in any potentially state-changing operation. This includes, but is not limited to, being the recipient of a transfer of zero value.
当涉及到任何可能改变状态的操作时,帐户被认为是被触动的。这包括,但不限于,作为零值转移的接收者
An account is considered empty when it has no code and zero nonce and zero balance.
如果帐户没有代码,且没有nonce和零余额,则认为该帐户为空。
An account is considered dead when either it is non-existent or it is empty.
如果一个帐户不存在或者它是空的,那么它就被认为是dead的
At the end of the transaction is immediately following the execution of the suicide list, prior to the determination of the state trie root for receipt population.
在交易结束后,在确定receipt population的状态树root之前立即执行自杀清单。
An account changes state when:
SUICIDE
operation for zero or more value; 它是价值为零或更多的SUICIDE
操作的目标账户或资金退还账户,
CALL
operation or message-call transaction transferring zero or more value;它是一个调用传递0或更多值的操作或消息调用事务的源或目的地
CREATE
operation or contract-creation transaction endowing zero or more value;它是创建赋予零或以上价值的操作或合同创建事务的来源或创建账号;
作为块作者(“矿工”),它是价值为零或更多的块奖励或交易费用的接受者。
In the present Ethereum protocol, it should be noted that very few state changes can ultimately result in accounts that are empty following the execution of the transaction. In fact there are only four contexts that current implementations need track:
在当前的Ethereum协议中,应该注意到很少的状态改变最终会导致在执行事务后账户为空。实际上,当前的实现只需要跟踪4个上下文
CALL
;空帐户通过call转移到它的值为零
SUICIDE
;Same as #158 except that several edge cases are avoided since we do not break invariants:
CREATE
avoids zero in the nonce to avoid any suggestion of the oddity of CREATE
d accounts being reaped half-way through their creation.
On 2016-11-24, a consensus bug occurred due to two implementations having different behavior in the case of state reverts.[3] The specification was amended to clarify that empty account deletions are reverted when the state is reverted.
Details: Geth was failing to revert empty account deletions when the transaction causing the deletions of empty accounts ended with an an out-of-gas exception. An additional issue was found in Parity, where the Parity client incorrectly failed to revert empty account deletions in a more limited set of contexts involving out-of-gas calls to precompiled contracts; the new Geth behavior matches Parity’s, and empty accounts will cease to be a source of concern in general in about one week once the state clearing process finishes.
ethereum/EIPs-161 State trie clearing
标签:pop different which created alt HERE about ethereum case
原文地址:https://www.cnblogs.com/wanghui-garcia/p/9664288.html