Add notes about temporary changes

This commit is contained in:
Rodrigo Q. Saramago 2022-12-06 20:26:43 +01:00
parent bc119e2522
commit 5ed7600130
No known key found for this signature in database
GPG Key ID: 9B36B2525704A359
2 changed files with 4 additions and 1 deletions

View File

@ -777,6 +777,7 @@ LinkerObject const& Assembly::assemble() const
auto dataLength = ret.bytecode.size() - dataStart;
if (m_eofVersion.has_value())
{
// Note: Temporary solution to current evmone requirement of non-empty data section.
if (dataLength == 0)
{
ret.bytecode.push_back(0);

View File

@ -63,7 +63,9 @@ public:
{
bytes bytecode = multiSourceCompileContract(_sourceCode, _sourceName, _contractName, _libraryAddresses);
if (bytecode.size() > 0)
// Note: Temporary solution that adds arguments size in the EOF data_section_size header to validate evmone implementation.
// TODO: Validate header and version.
if (bytecode.size() > 3)
{
if (bytecode[0] == uint8_t(0xef) && bytecode[1] == uint8_t(00)) // is EOF
{