-
Notifications
You must be signed in to change notification settings - Fork 11.2k
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
[programmability] connect authority to adapter #43
Conversation
@@ -555,8 +555,8 @@ where | |||
self.next_sequence_number = new_next_sequence_number; | |||
// Sanity check | |||
assert_eq!( | |||
self.sent_certificates.len(), | |||
self.next_sequence_number.into() |
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.
For some reason I do not understand, the compiler becomes unhappy with this into()
after my PR! Perhaps it has a resource budget for inference (into()
is pretty magical) and I've exceeded it with my changes elsewhere?
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.
In those cases, you can just mention the qualified syntax of the instance of From
/ Into
that you plan to use:
https://github.com/sblackshear/fastnft/pull/1
b3e73be
to
4241266
Compare
fd1ee2a
to
3a3656d
Compare
Lots more to be done here, but this is a start at finally connecting these two key components! - Add `Storage` trait + implement it for `AuthorityState` - Implement the `ResourceResolver` and `ModuleResolver` traits for `AuthorityState` so it can be used as a DB by the Move VM - Generalize adapter to operate over `Storage` trait rather than `FastXStateView` - Add logic for handling `MoveCall` order type in the authority - Add e2e test that creates a `MoveCall` order invoking a nonexistent module that fails appropriately Note: this temporarily breaks the CLI version of the fastX adapter. It can be fixed by implementing the `Storage` trait for `FastXStateView` + doing a few other things, but I left it broken for now since this PR is already quite meaty.
3a3656d
to
62260a1
Compare
@@ -169,6 +182,9 @@ impl Authority for AuthorityState { | |||
let output_sequence_number = input_sequence_number.increment()?; | |||
output_object.next_sequence_number = output_sequence_number; | |||
|
|||
let input_ref = input_object.to_object_reference(); | |||
let output_ref = output_object.to_object_reference(); |
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.
Do we plan to pass input_ref to adaptor call as well and generate output_ref based on adaptor call result?
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 code will change a lot... see #39 for a peek into the future.
The order should carry a list of input ObjectRef
's, and executing the order will create a list of output ObjectRef
's (as you suggest).
Lots more to be done here, but this is a start at finally connecting these two key components!
Storage
trait + implement it forAuthorityState
ResourceResolver
andModuleResolver
traits forAuthorityState
so it can be used as a DB by the Move VMStorage
trait rather thanFastXStateView
MoveCall
order type in the authorityMoveCall
order invoking a nonexistent module that fails appropriatelyNote: this temporarily breaks the CLI version of the fastX adapter (which is not hooked up to tests anyway). It can be fixed by implementing the
Storage
trait forFastXStateView
+ doing a few other things, but I left it broken for now since this PR is already quite meaty.