aionnetwork / AVM

Enabling Java code to run in a blockchain environment
https://theoan.com/
MIT License
49 stars 25 forks source link

[CLOSED] Add duplicate account check for contract depolyment #307

Closed aionbot closed 5 years ago

aionbot commented 5 years ago

Issue created by JunhanHu-aion (on Wednesday Nov 07, 2018 at 16:19 GMT)

In item #301 , task 5 and 6 need to be implemented within AVM.

AVM need to check if the projected account address is free. If the address is already taken, AVM should report a dedicated failure.

To sumary the requirement of this implementation, we need to

aionbot commented 5 years ago

Comment by jeff-aion (on Wednesday Nov 07, 2018 at 16:22 GMT)

What is mean by "the address is already taken" and under which circumstances could this happen?

I suspect that, if we correctly define what is means for address to already exist, we can commute this to an assertion error.

Note that a similar check is being modified on the kernel side, as I understand it.

aionbot commented 5 years ago

Comment by JunhanHu-aion (on Thursday Nov 15, 2018 at 22:12 GMT)

After group discussion, we reached the agreement that deploy into an existing account is as hard as guess someone's private key. If account already existed is detected, it must be an AVM bug.