aionnetwork / AVM

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

[CLOSED] Fix database value padding issue #277

Closed aionbot closed 5 years ago

aionbot commented 5 years ago

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

A call into a dApp currently fails when the ContractEnvironmentState attempts to read back the graph store meta data because it expects this data to consist of 4 bytes. The underlying kernel storage pads its values with leading zero bytes to ensure it is at least 17 bytes (for reasons relating to disambiguating it from fvm data). This needs to be fixed up so that nothing the avm stores gets padded while also ensuring that the data remains unambiguous.

aionbot commented 5 years ago

Comment by aionick (on Friday Oct 12, 2018 at 20:09 GMT)

This issue is now fixed. The fix is sitting on my fix-padding branch as commit 8401f17. I want to return back to this to refactor the solution somewhat, as I handled the fix at the wrong level of abstraction really. So I'm going to keep the fix on that branch until it's in a state I like unless this fix is urgently needed and close this issue once that's done.