-
Notifications
You must be signed in to change notification settings - Fork 2.2k
move transaction verification checks to sealEngine #4039
Conversation
libethashseal/Ethash.cpp
Outdated
} | ||
|
||
// Check gas cost is enough. | ||
int64_t baseGasRequired = _t.baseGasRequired(evmSchedule(_env)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This check is already here on line 161
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hm. let me check. there was an issue when we removed this check in the last PR
I have a lots of state tests errors. And please remove the commented out code. |
Codecov Report
@@ Coverage Diff @@
## develop #4039 +/- ##
===========================================
+ Coverage 65.63% 65.71% +0.07%
===========================================
Files 309 309
Lines 22722 22698 -24
===========================================
+ Hits 14914 14915 +1
+ Misses 7808 7783 -25
|
libethashseal/Ethash.cpp
Outdated
u256 startGasUsed = _env.gasUsed(); | ||
if (startGasUsed + (bigint)_t.gas() > _env.gasLimit()) | ||
{ | ||
//clog(ExecutiveWarnChannel) << "Cannot fit tx in block" << _env.number() << ": Require <" << (_env.gasLimit() - startGasUsed) << " Got" << _t.gas(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove this
EVMJIT build is failing now |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, just one comment about a field name.
u256 m_timestamp; | ||
u256 m_difficulty; | ||
int64_t m_gasLimit; | ||
BlockHeader m_headerInfo; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would just name it as m_header
.
connects to #4038
refactor envInfo
split LastHashes and envInfo
next step is to replace envInfo with BlockHeader
updated test branch
ethereum/tests#151
@vbuterin
all of the state tests that used blockhash are now useless and should be migrated into blockchain tests.