-
Notifications
You must be signed in to change notification settings - Fork 80
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
Parameterize Engine Access to Storage #314
Merged
Merged
Conversation
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
birchmd
added
C-enhancement
Category: New feature or request
A-connector
Area: Issues that relate to the connector.
A-storage
Area: Any changes that affect storage.
A-fungible-token
Area: Fungible token related.
labels
Oct 20, 2021
birchmd
commented
Oct 20, 2021
birchmd
force-pushed
the
sdk-refactor-revisited
branch
2 times, most recently
from
October 28, 2021 14:15
e6a58b1
to
3c7653a
Compare
joshuajbouw
approved these changes
Nov 4, 2021
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.
Don't really have any complaints here. Clean enough though, these always are not a treat to follow :D
birchmd
added a commit
to birchmd/aurora-engine
that referenced
this pull request
Nov 5, 2021
birchmd
force-pushed
the
sdk-refactor-revisited
branch
from
November 5, 2021 17:39
3c7653a
to
fb45551
Compare
birchmd
force-pushed
the
sdk-refactor-revisited
branch
from
November 9, 2021 18:46
fb45551
to
0d0be23
Compare
birchmd
added a commit
that referenced
this pull request
Nov 10, 2021
artob
pushed a commit
that referenced
this pull request
Dec 10, 2021
* Feat(engine): London hard fork support (#244) * Fix(exit precompile): Address to refund in case of error is an argument (#311) * Feat(engine): Make engine parametric in storage access (#314) * Test verifying the EVM log returns the correct address (#341) * Remove sdk::current_account_id usage from engine-precompiles (#346) * Remove Default trait bound from engine IO (#342) * Remove some sdk usage from core logic (#347) * Factor out blockchain environment variable access as a trait (#349) * Factor out NEAR promise host functions into a trait (#353) * Borsh deserialized value field for call args (#351) * Refactor(eth-connector): Use Result return values instead of panicking (#355) * Gate all NEAR host functions behind the contract feature (#356) * Bump @openzeppelin/contracts from 4.3.2 to 4.3.3 in /etc/eth-contracts * Chore: Newtypes for gas (#344) * Feat(standalone): Standalone (#345) * Minor fixes to sdk refactor (#359) * Refactor(engine): Move submit logic into engine module (#366) * Feat(standalone): Storage backend (#375) * NEAR random numbers from solidity contract (#368) * Feat(standalone): EVM tracing via SputnikVM (#383) * Feat(standalone): Bootstrap storage from relayer and state snapshots (#379) * Feat(standalone): Structures and logic for keeping storage in sync with the blockchain (#382) * Feat(standalone): Capture geth-like tracing from SputnikVM events (#384) * Connector cleanup (#374) * Remove betanet * Fix(engine): original_storage bug fix; more tracing tests (#390) * Increase NEAR Gas for ft_on_transfer (#389) Co-authored-by: Andrew Bednoff <andrew.bednoff@aurora.dev> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Evgeny Ukhanov <evgeny.ukhanov@aurora.dev> Co-authored-by: Marcelo Fornet <marcelo.fornet@aurora.dev> Co-authored-by: Michael Birch <michael.birch@aurora.dev>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-connector
Area: Issues that relate to the connector.
A-fungible-token
Area: Fungible token related.
A-storage
Area: Any changes that affect storage.
C-enhancement
Category: New feature or request
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.
The purpose of this PR is to start the long process of completely decoupling the Engine from the NEAR host functions. This will allow us to compile and run a native version of the Engine which will be useful in tests and in debugging.
In this PR we start by factoring out the I/O operations (storage, stdin and stdout) into a trait and having the engine be parametric in any type implementing this trait. We include an implementation for the NEAR Runtime, and in the future we can define an implementation backed by a database or something for the native version.
This is a large PR, but much of it arises from having the thread the new
IO
object through the Engine and eth-connector. I think it could be possible to limit how much of the code needs access toIO
if we structured it better (keeping pure logic separate from reading/writing storage), but that can be done as a future PR. For now I was aiming to only introduce theIO
trait without moving around too much code.The most important piece for reviewers to focus on is the new traits defined in
engine-sdk/src/io.rs
.