Add notes about temporary changes

This commit is contained in:
Rodrigo Q. Saramago
2023-01-05 13:06:13 +01:00
committed by Daniel Kirchner
parent 80b2539e5f
commit 2fe9ffb799
2 changed files with 4 additions and 1 deletions
+1
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);
@@ -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
{