-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CT: no code stop effect #958
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -471,12 +471,6 @@ func (g *StateGenerator) generateWith(rnd *rand.Rand, assignment Assignment) (*s | |
// Generate return data of last call | ||
resultLastCallReturnData := RandomBytes(rnd, st.MaxDataSize) | ||
|
||
// Generate return data for terminal states. | ||
var resultReturnData Bytes | ||
if resultStatus == st.Stopped || resultStatus == st.Reverted { | ||
resultReturnData = RandomBytes(rnd, st.MaxDataSize) | ||
} | ||
|
||
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. As discussed, I have a concern about removing the generation of resutlReturnData.
The later is a state that would require the generation of a returned data buffer. Right? 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. In the specification, the data returned by a call and the data returned by the current contract execution are stored in different fields of the state (see here). For instance, if you look into the specification of the RETURNDATASIZE here, it is reading the size of the state's The fact that all implementations use the same field for the last call return data and the return data of the current call is a (valid) optimization, but not reflected in the specification. |
||
// Invoke SelfDestructedGenerator | ||
resultHasSelfdestructed, err := g.hasSelfDestructedGen.Generate(rnd) | ||
if err != nil { | ||
|
@@ -534,6 +528,7 @@ func (g *StateGenerator) generateWith(rnd *rand.Rand, assignment Assignment) (*s | |
|
||
resultRevision := GetRevisionForBlock(resultBlockContext.BlockNumber) | ||
|
||
// Return data is not set as it should only be set by RETURN/REVERT opcodes. | ||
result := st.NewState(resultCode) | ||
result.Status = resultStatus | ||
result.Revision = resultRevision | ||
|
@@ -552,7 +547,6 @@ func (g *StateGenerator) generateWith(rnd *rand.Rand, assignment Assignment) (*s | |
result.TransactionContext = resultTransactionContext | ||
result.CallData = resultCallData | ||
result.LastCallReturnData = resultLastCallReturnData | ||
result.ReturnData = resultReturnData | ||
result.HasSelfDestructed = resultHasSelfdestructed | ||
result.RecentBlockHashes = resultRecentBlockHashes | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"Status": "running", | ||
"Revision": "Berlin", | ||
"ReadOnly": false, | ||
"Pc": 0 , | ||
"Gas": 766154147, | ||
"GasRefund": -386980389124, | ||
"Code": "", | ||
"Stack": [ | ||
"73d98e21930ee3c4 9adfe6af5c3129a6 14d8827ba8c91ac6 aad5465e39e7224f", | ||
"fbe73cec10215f25 b4b4cdc59461cf5e 0bdbdfbd8bb66463 8d8f315fa500dfd2", | ||
"44e536d9beb6692f f1771bc7786d984f e8121ed7845eb679 7481234b5f8357fc", | ||
"a4908db06f82ce80 fa765578d53df1b1 79aa3a06d8ea630a 5946bb7a396ca860", | ||
"5567e6eac386c167 503cbc87f4045ae3 03416fcf004cb556 f2339e0f9dad807a" | ||
] | ||
} |
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.
Just to be sure: please update this once the corresponding go-ethereum-sonic change is merged to make sure the version number points to a commit on a non-development branch of
go-ethereum-sonic
.