aionnetwork / AVM

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

[CLOSED] Add kernel storage support for arbitrary length data #271

Closed aionbot closed 5 years ago

aionbot commented 5 years ago

Issue created by aionick (on Friday Oct 05, 2018 at 17:46 GMT)

The kernel currently only has the ability to store key-value data units as 16 bytes (a fast vm requirement) and 32 bytes (used by precompiled contracts), but the avm needs to be able to submit value pairs of arbitrary length (it can probably live with 16 byte keys, though by providing arbitrary length support for the values the keys get this same support for free).

The changes to this will all be on the kernel side, this is just here as part of the book-keeping.

aionbot commented 5 years ago

Comment by aionick (on Friday Oct 05, 2018 at 17:50 GMT)

The plan is to remove the 32 byte key-value support altogether and replace it with an arbitrary-length storage unit and then to have any data of 16 bytes or less become DataWords (the 16 byte units) and all other data to become arbitrary length units.

It may be possible to also drop the 16 byte DataWord but we need integ tests with the fast vm to really be sure of that, so that change will not be included here.

aionbot commented 5 years ago

Comment by aionick (on Tuesday Oct 09, 2018 at 15:40 GMT)

This is complete. See commit 7c4cf78 in the integration_kernel.