Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Enumeratable accounts #195
Makes all accounts enumerable. Introduces a short-hand form for encoding addresses and the notion of an existential deposit which is the minimum amount that must be held in an account for it to be considered "alive"; if the (free) balance ever falls below this, the account is deleted. It also introduces fees for account creation, contract-creation, transfer and a rebate for account-creation with a valid or non-existent hint.
Note: This will change the Polkadot binary extrinsic format. Before it was:
Now, it is:
Note that the "original fields" refer to the
The specific format for the new address type is one of 5 sub-formats, switched on the first byte:
The account index variants are significantly smaller but require a lookup in the state. To avoid a transaction replay attack when an index changes its account, the signature is signed not with the first field as the index, but rather as the account id, thereby invalidating all previous signatures once the index is used to lookup a different id.
In addition to the
There is currently a small "easter egg" which allows an index to be reclaimed after the account to which it refers expires. The reason it's done this way rather than an explicit new dispatch call is to allow for incidental account creation (e.g. a smart contract doing the creating, or being created) to also be able to make claims.
And of course...