-
Notifications
You must be signed in to change notification settings - Fork 69
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
feat: Add alternative snapshot design. #345
Conversation
Let us pause: Is it necessary to include this particular feature in the upcoming hard fork? |
I think this is just an added feature, if you don't use it, it won't affect existing features. Even if you use it in the code, it really is just an implementation detail that does not change any behavior. To answer the question more directly: tt depends on the CKB team if they want to use this in CKB. Maybe they want to use it, maybe not. |
Can you fix the conflict? |
I can but have we reached the decision to merge this to develop branch? Or are you merely meant to test this? |
I'm about to merge it into the develop branch. |
This change adds a different snapshot design, that takes advantage of a newly defined trait named `DataSource`. DataSource is modeled after environmental data that would stay the same and most likely immutable for the entire duration of a CKB-VM program's lifecycle. An example could be the enclosing transaction (`ResolvedTransaction` in CKB's term) for CKB's smart contracts. No matter where and when we are running the smart contract, the enclosing transaction is always the same. By exploiting this property, we can reduce the size of a snapshot greatly: when a piece of data already exist in the DataSource, we won't need to store the same data in the snapshot. As long as we maintain enough information to locate them from the DataSource, the snapshot can successfully be used to resume the full running state of a CKB-VM Machine.
Already rebased. |
…)" * feat: Add alternative snapshot design. This change adds a different snapshot design, that takes advantage of a newly defined trait named `DataSource`. DataSource is modeled after environmental data that would stay the same and most likely immutable for the entire duration of a CKB-VM program's lifecycle. An example could be the enclosing transaction (`ResolvedTransaction` in CKB's term) for CKB's smart contracts. No matter where and when we are running the smart contract, the enclosing transaction is always the same. By exploiting this property, we can reduce the size of a snapshot greatly: when a piece of data already exist in the DataSource, we won't need to store the same data in the snapshot. As long as we maintain enough information to locate them from the DataSource, the snapshot can successfully be used to resume the full running state of a CKB-VM Machine. * test: Ensure resumed VM has the same register and memory data * fix: Skip full memory comparison in chaos tests
…)" * feat: Add alternative snapshot design. This change adds a different snapshot design, that takes advantage of a newly defined trait named `DataSource`. DataSource is modeled after environmental data that would stay the same and most likely immutable for the entire duration of a CKB-VM program's lifecycle. An example could be the enclosing transaction (`ResolvedTransaction` in CKB's term) for CKB's smart contracts. No matter where and when we are running the smart contract, the enclosing transaction is always the same. By exploiting this property, we can reduce the size of a snapshot greatly: when a piece of data already exist in the DataSource, we won't need to store the same data in the snapshot. As long as we maintain enough information to locate them from the DataSource, the snapshot can successfully be used to resume the full running state of a CKB-VM Machine. * test: Ensure resumed VM has the same register and memory data * fix: Skip full memory comparison in chaos tests
…)" * feat: Add alternative snapshot design. This change adds a different snapshot design, that takes advantage of a newly defined trait named `DataSource`. DataSource is modeled after environmental data that would stay the same and most likely immutable for the entire duration of a CKB-VM program's lifecycle. An example could be the enclosing transaction (`ResolvedTransaction` in CKB's term) for CKB's smart contracts. No matter where and when we are running the smart contract, the enclosing transaction is always the same. By exploiting this property, we can reduce the size of a snapshot greatly: when a piece of data already exist in the DataSource, we won't need to store the same data in the snapshot. As long as we maintain enough information to locate them from the DataSource, the snapshot can successfully be used to resume the full running state of a CKB-VM Machine. * test: Ensure resumed VM has the same register and memory data * fix: Skip full memory comparison in chaos tests
* backport: Backport "Add alternative snapshot design. (#345)" * feat: Add alternative snapshot design. This change adds a different snapshot design, that takes advantage of a newly defined trait named `DataSource`. DataSource is modeled after environmental data that would stay the same and most likely immutable for the entire duration of a CKB-VM program's lifecycle. An example could be the enclosing transaction (`ResolvedTransaction` in CKB's term) for CKB's smart contracts. No matter where and when we are running the smart contract, the enclosing transaction is always the same. By exploiting this property, we can reduce the size of a snapshot greatly: when a piece of data already exist in the DataSource, we won't need to store the same data in the snapshot. As long as we maintain enough information to locate them from the DataSource, the snapshot can successfully be used to resume the full running state of a CKB-VM Machine. * test: Ensure resumed VM has the same register and memory data * fix: Skip full memory comparison in chaos tests * Let snapshots stores the load_reservation_address --------- Co-authored-by: Xuejie Xiao <xxuejie@gmail.com>
This change adds a different snapshot design, that takes advantage of a newly defined trait named
DataSource
. DataSource is modeled after environmental data that would stay the same and most likely immutable for the entire duration of a CKB-VM program's lifecycle. An example could be the enclosing transaction (ResolvedTransaction
in CKB's term) for CKB's smart contracts. No matter where and when we are running the smart contract, the enclosing transaction is always the same. By exploiting this property, we can reduce the size of a snapshot greatly: when a piece of data already exist in the DataSource, we won't need to store the same data in the snapshot. As long as we maintain enough information to locate them from the DataSource, the snapshot can successfully be used to resume the full running state of a CKB-VM Machine.