-
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
[RPC API Improvement] - Add object type to transaction effect [SUI-62] #6636
Conversation
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.
Looking good so far, you are on the right track.
@@ -316,7 +316,7 @@ pub enum MoveFunctionArgType { | |||
Object(ObjectValueKind), | |||
} | |||
|
|||
#[derive(Serialize, Deserialize, Debug, JsonSchema)] | |||
#[derive(Serialize, Deserialize, Debug)] |
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.
Shouldn't remove JsonSchema
@@ -98,7 +99,7 @@ pub struct TemporaryStore<S> { | |||
// into written directly. | |||
written: BTreeMap<ObjectID, (SingleTxContext, Object, WriteKind)>, // Objects written | |||
/// Objects actively deleted. | |||
deleted: BTreeMap<ObjectID, (SingleTxContext, SequenceNumber, DeleteKind)>, | |||
deleted: BTreeMap<ObjectID, (SingleTxContext, SequenceNumber, DeleteKind, Object)>, |
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.
we don't need to store the whole Object, which can be quite big, storing the type information should be enough
@@ -449,6 +449,15 @@ impl Object { | |||
(self.id(), self.version(), self.digest()) | |||
} | |||
|
|||
pub fn compute_object_type(&self) -> ObjectType{ |
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.
compute imply getting the object type need computation and could be expansive (e.g. compute digest), we can simply call this get_object_type
we cannot doen all actions properly |
nice |
Closing as stale! I believe, we have this change today. |
Made some initial changes towards the addition of object type to transaction effect.
@patrickkuo Please review my progress til now and confirm that I am on the right path.
I know that those changes don't pass all the test yet.