-
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
Remove Default trait bound from engine IO #342
Remove Default trait bound from engine IO #342
Conversation
@@ -62,11 +61,15 @@ pub struct OnTransferMessageData { | |||
pub fee: U256, | |||
} | |||
|
|||
impl<I: IO + Default + Copy> EthConnectorContract<I> { | |||
impl<I: IO + Copy> EthConnectorContract<I> { |
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.
Copy
(or at the very least Clone
) is still required, unfortunately. The reason is because the engine and connector sub-components benefit from having a handle to the IO
they can access in self
methods (otherwise we end up passing in io
all over the place and it's pretty messy). I think it might be ok if this ends up remaining the case in the long term, but perhaps in a future PR I'll see if I can sort out all the lifetimes to be able to pass a reference down instead of the actual object.
f077841
to
fe13e1d
Compare
fe13e1d
to
6d621a6
Compare
339dc43
to
490d586
Compare
* 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>
The primary goal of this PR is to remove the
Default
trait bound that was required on theIO
type after #314 . The primary reason for this trait bound was the usage ofDefault
inLookupMap
andBijectionMap
. As a result, this PR removesLookupMap
and refactorsBijectionMap
to no longer have aDefault
implementation, as well as to be more type-safe.This is change does not impact the runtime behaviour of the engine in any way. It is continuing the path towards being able to run the engine without the NEAR runtime (ie as a standalone binary).