-
Notifications
You must be signed in to change notification settings - Fork 666
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: global contract distribution using receipts #12793
base: master
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #12793 +/- ##
==========================================
- Coverage 70.51% 70.50% -0.02%
==========================================
Files 846 846
Lines 174906 175047 +141
Branches 174906 175047 +141
==========================================
+ Hits 123341 123419 +78
- Misses 46311 46374 +63
Partials 5254 5254
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
|
||
impl fmt::Debug for GlobalContractData { | ||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { | ||
f.debug_struct("GlobalContractData").finish() |
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.
include code hash and id here
)] | ||
pub struct GlobalContractData { | ||
#[serde_as(as = "Base64")] | ||
pub code: Vec<u8>, |
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.
let's use Arc<[u8]>
to avoid copying contracts when routing receipt to all shards
@@ -98,6 +100,7 @@ fn total_accounts_balance( | |||
enum PostponedReceiptType { | |||
Action, | |||
PromiseYield, | |||
GlobalContractDistribution, |
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.
global contract distribution receipt cannot be postponed since it doesn't have any dependencies
@@ -138,6 +138,7 @@ pub(crate) enum ActionType { | |||
Delegate, | |||
DeployGlobalContract, | |||
UseGlobalContract, | |||
GlobalContractDistributionReceipt, |
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 is not an action hence it should not have a dedicated ActionType
No description provided.