This repository has been archived by the owner on Oct 28, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Eip86 CREATE #4046
Closed
Closed
Eip86 CREATE #4046
Changes from 7 commits
Commits
Show all changes
30 commits
Select commit
Hold shift + click to select a range
4167f7c
Improve ccache usage
chfast f2b1b1a
change create tx
yann300 26b2f33
eip86_create
yann300 52422f5
thrown if address already used
yann300 88df551
move transaction verification checks to sealEngine
8201381
use BlockHeader in EnvInfo
winsvega d4b41c0
fixes
winsvega e4db842
json tests
winsvega d0d8fc3
MetropolisFakeExtVM
yann300 c348678
Merge pull request #4039 from winsvega/develop
winsvega de767ca
remove blockHash tests from stateTests
winsvega 09f8b94
jsontests
winsvega 995dbdb
remove (void)var
yann300 e95fdbb
check already used address only if after metropolis
yann300 231394a
Merge pull request #4047 from winsvega/remhash
winsvega 6c30f3c
properly implement CREATE_PSH
yann300 ca3f062
remove MetropolisFakeExtVM
yann300 cf0bb90
fix build (evmjit)
yann300 d491c9d
Merge pull request #4042 from ethereum/ccache
chfast 98b2371
change create tx
yann300 9931b85
eip86_create
yann300 8eeeace
thrown if address already used
yann300 22bae65
MetropolisFakeExtVM
yann300 406e4fd
remove (void)var
yann300 1fa7213
check already used address only if after metropolis
yann300 ffc5996
properly implement CREATE_PSH
yann300 4b2f69a
remove MetropolisFakeExtVM
yann300 99768e2
fix build (evmjit)
yann300 a0b8dbe
rename CREATE_PSH => CREATE_P2SH
yann300 dc795fd
Merge branch 'eip86_create' of github.com:ethereum/cpp-ethereum into …
yann300 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -211,6 +211,14 @@ void VM::interpretCases() | |
// | ||
// Call-related instructions | ||
// | ||
|
||
CASE(CREATE_PSH) | ||
{ | ||
if (!m_schedule->haveCreatePsh) | ||
throwBadInstruction(); | ||
m_bounce = &VM::caseCreate; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It should be available only after Metropolis and generate BadInstruction before. See for example how REVERT handles this |
||
} | ||
BREAK | ||
|
||
CASE(CREATE) | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -54,7 +54,7 @@ class FakeExtVM: public eth::ExtVMFace | |
virtual void suicide(Address _a) override { std::get<0>(addresses[_a]) += std::get<0>(addresses[myAddress]); addresses.erase(myAddress); } | ||
virtual bytes const& codeAt(Address _a) override { return std::get<3>(addresses[_a]); } | ||
virtual size_t codeSizeAt(Address _a) override { return std::get<3>(addresses[_a]).size(); } | ||
virtual h160 create(u256 _endowment, u256& io_gas, bytesConstRef _init, eth::OnOpFunc const&) override; | ||
virtual h160 create(u256 _endowment, u256& io_gas, bytesConstRef _init, eth::OnOpFunc const&, eth::Instruction) override; | ||
virtual std::pair<bool, eth::owning_bytes_ref> call(eth::CallParameters&) override; | ||
void setTransaction(Address _caller, u256 _value, u256 _gasPrice, bytes const& _data); | ||
void setContract(Address _myAddress, u256 _myBalance, u256 _myNonce, std::map<u256, u256> const& _storage, bytes const& _code); | ||
|
@@ -80,5 +80,12 @@ class FakeExtVM: public eth::ExtVMFace | |
u256 execGas; | ||
}; | ||
|
||
class MetropolisFakeExtVM: public FakeExtVM | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This class looks not used There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yep we will try to remove the entire fakeExtVM with @winsvega |
||
{ | ||
public: | ||
MetropolisFakeExtVM(eth::EnvInfo const& _envInfo, unsigned _depth = 0); | ||
virtual h160 create(u256 _endowment, u256& io_gas, bytesConstRef _init, eth::OnOpFunc const&, eth::Instruction) override; | ||
}; | ||
|
||
|
||
} } // Namespace Close |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 better make
OnOpFunc
parameter the last one, because it's kind of different than all the others - all others are configuring the creation and this one is a callback