Skip to content

Commit

Permalink
Remove the idea of virtual addresses and replace with alias(es) (#259)
Browse files Browse the repository at this point in the history
* Remove the notion of virtual addresses and replace with alias(es)

Signed-off-by: lukelee-sl <[email protected]>

* update comments per pr reviews

Signed-off-by: lukelee-sl <[email protected]>

* remove changes related to multiple aliases

Signed-off-by: lukelee-sl <[email protected]>

---------

Signed-off-by: lukelee-sl <[email protected]>
  • Loading branch information
lukelee-sl committed Feb 10, 2023
1 parent 717b96c commit 3fa0f5e
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 42 deletions.
25 changes: 5 additions & 20 deletions services/basic_types.proto
Original file line number Diff line number Diff line change
Expand Up @@ -96,23 +96,20 @@ message AccountID {
* a protobuf Key message for any primitive key type. Currently only primitive key bytes are supported as an alias
* (ThresholdKey, KeyList, ContractID, and delegatable_contract_id are not supported)
*
* May also be the ethereum account 20-byte EVM address to be used initially in place of the public key bytes. This EVM
* address may be either the encoded form of the shard.realm.num or the keccak-256 hash of a ECDSA_SECP256K1 primitive key.
*
* At most one account can ever have a given alias and it is used for account creation if it
* was automatically created using a crypto transfer. It will be null if an account is created normally.
* It is immutable once it is set for an account.
*
* If a transaction auto-creates the account, any further transfers to that alias will simply be deposited
* in that account, without creating anything, and with no creation fee being charged.
*/
bytes alias = 4;

/**
* The ethereum account 20-byte EVM address to be used initially in place of the public key bytes. This EVM
* address may be either the encoded form of the shard.realm.num or the keccak-256 hash of a ECDSA_SECP256K1 primitive key.
*
* If a transaction lazily-creates this account, a subsequent transaction will be required containing the public key bytes
* that map to the EVM address bytes. Lazy account creates will only support the keccak-256 hash of a ECDSA_SECP256K1 primitive key form.
* that map to the EVM address bytes. The provided public key bytes will then serve as the final alias bytes.
*/
bytes evm_address = 5;
bytes alias = 4;
}
}

Expand Down Expand Up @@ -1595,15 +1592,3 @@ message StakingInfo {
int64 staked_node_id = 6;
}
}

message VirtualAddress {
/**
* The 20-byte EVM address that is derived from the keccak-256 hash of a ECDSA_SECP256K1 primitive key.
*/
bytes address = 1;

/**
* Flag if this address should now be set or is the default address on the account.
*/
bool is_default = 2;
}
7 changes: 2 additions & 5 deletions services/crypto_create.proto
Original file line number Diff line number Diff line change
Expand Up @@ -160,16 +160,13 @@ message CryptoCreateTransactionBody {
* supported as the key for an account with an alias. ThresholdKey, KeyList, ContractID, and
* delegatable_contract_id are not supported.
*
* May also be the EOA 20-byte address to create that is derived from the keccak-256 hash of a ECDSA_SECP256K1 primitive key.
*
* A given alias can map to at most one account on the network at a time. This uniqueness will be enforced
* relative to aliases currently on the network at alias assignment.
*
* If a transaction creates an account using an alias, any further crypto transfers to that alias will
* simply be deposited in that account, without creating anything, and with no creation fee being charged.
*/
bytes alias = 18;

/**
* EOA 20-byte address to create that is derived from the keccak-256 hash of a ECDSA_SECP256K1 primitive key.
*/
bytes evm_address = 20;
}
5 changes: 0 additions & 5 deletions services/crypto_get_info.proto
Original file line number Diff line number Diff line change
Expand Up @@ -181,11 +181,6 @@ message CryptoGetInfoResponse {
* Staking metadata for this account.
*/
StakingInfo staking_info = 22;

/**
* List of virtual addresses each of which is an EVM address that maps to an ECDSA key pair a user must prove ownership of.
*/
repeated VirtualAddress virtual_addresses = 24;
}

/**
Expand Down
12 changes: 0 additions & 12 deletions services/crypto_update.proto
Original file line number Diff line number Diff line change
Expand Up @@ -155,16 +155,4 @@ message CryptoUpdateTransactionBody {
* If true, the account declines receiving a staking reward. The default value is false.
*/
google.protobuf.BoolValue decline_reward = 18;

oneof virtual_address_update {
/**
* The virtual address to be added.
*/
VirtualAddress add = 20;

/**
* The 20-byte EVM address of the virtual address that is being removed.
*/
bytes remove = 21;
}
}

0 comments on commit 3fa0f5e

Please sign in to comment.