-
Notifications
You must be signed in to change notification settings - Fork 17
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(protocol): PCR-2 iota-rest-api #5276
base: protocol/pcr2-clean
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -1922,6 +1922,76 @@ | |||||
} | ||||||
} | ||||||
}, | ||||||
{ | ||||||
"type": "object", | ||||||
"required": [ | ||||||
"computation_charge", | ||||||
"computation_charge_burned", | ||||||
"epoch", | ||||||
"epoch_start_timestamp_ms", | ||||||
"kind", | ||||||
"non_refundable_storage_fee", | ||||||
"protocol_version", | ||||||
"storage_charge", | ||||||
"storage_rebate", | ||||||
"system_packages" | ||||||
], | ||||||
"properties": { | ||||||
"computation_charge": { | ||||||
"description": "The total amount of gas charged for computation during the epoch.", | ||||||
"type": "string", | ||||||
"format": "u64" | ||||||
}, | ||||||
"computation_charge_burned": { | ||||||
"description": "The total amount of gas burned for computation during the epoch.", | ||||||
"type": "string", | ||||||
"format": "u64" | ||||||
}, | ||||||
"epoch": { | ||||||
"description": "The next (to become) epoch ID.", | ||||||
"type": "string", | ||||||
"format": "u64" | ||||||
}, | ||||||
"epoch_start_timestamp_ms": { | ||||||
"description": "Unix timestamp when epoch started", | ||||||
"type": "string", | ||||||
"format": "u64" | ||||||
}, | ||||||
"kind": { | ||||||
"type": "string", | ||||||
"enum": [ | ||||||
"change_epoch_v2" | ||||||
] | ||||||
}, | ||||||
"non_refundable_storage_fee": { | ||||||
"description": "The non-refundable storage fee.", | ||||||
"type": "string", | ||||||
"format": "u64" | ||||||
}, | ||||||
"protocol_version": { | ||||||
"description": "The protocol version in effect in the new epoch.", | ||||||
"type": "string", | ||||||
"format": "u64" | ||||||
}, | ||||||
"storage_charge": { | ||||||
"description": "The total amount of gas charged for storage during the epoch.", | ||||||
"type": "string", | ||||||
"format": "u64" | ||||||
}, | ||||||
"storage_rebate": { | ||||||
"description": "The amount of storage rebate refunded to the txn senders.", | ||||||
"type": "string", | ||||||
"format": "u64" | ||||||
}, | ||||||
"system_packages": { | ||||||
"description": "System packages (specifically framework and move stdlib) that are written before the new epoch starts. This tracks framework upgrades on chain. When executing the ChangeEpoch txn, the validator must write out the modules below. Modules are provided with the version they will be upgraded to, their modules in serialized form (which include their package ID), and a list of their transitive dependencies.", | ||||||
"type": "array", | ||||||
"items": { | ||||||
"$ref": "#/components/schemas/SystemPackage" | ||||||
} | ||||||
} | ||||||
} | ||||||
}, | ||||||
{ | ||||||
"type": "object", | ||||||
"required": [ | ||||||
|
@@ -3918,7 +3988,8 @@ | |||||
"protocol_version", | ||||||
"reference_gas_price", | ||||||
"safe_mode", | ||||||
"safe_mode_computation_rewards", | ||||||
"safe_mode_computation_charges", | ||||||
"safe_mode_computation_charges_burned", | ||||||
"safe_mode_non_refundable_storage_fee", | ||||||
"safe_mode_storage_charges", | ||||||
"safe_mode_storage_rebates", | ||||||
|
@@ -4054,11 +4125,16 @@ | |||||
"description": "Whether the system is running in a downgraded safe mode due to a non-recoverable bug. This is set whenever we failed to execute advance_epoch, and ended up executing advance_epoch_safe_mode. It can be reset once we are able to successfully execute advance_epoch.", | ||||||
"type": "boolean" | ||||||
}, | ||||||
"safe_mode_computation_rewards": { | ||||||
"safe_mode_computation_charges": { | ||||||
"description": "Amount of computation rewards accumulated (and not yet distributed) during safe mode.", | ||||||
"type": "string", | ||||||
"format": "u64" | ||||||
}, | ||||||
"safe_mode_computation_charges_burned": { | ||||||
"description": "Amount of burned computation rewards accumulated during safe mode.", | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
"type": "string", | ||||||
"format": "u64" | ||||||
}, | ||||||
"safe_mode_non_refundable_storage_fee": { | ||||||
"description": "Amount of non-refundable storage fee accumulated during safe mode.", | ||||||
"type": "string", | ||||||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -121,7 +121,11 @@ pub struct SystemStateSummary { | |||||
/// during safe mode. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. one line above |
||||||
#[serde_as(as = "iota_types::iota_serde::BigInt<u64>")] | ||||||
#[schemars(with = "crate::_schemars::U64")] | ||||||
pub safe_mode_computation_rewards: u64, | ||||||
pub safe_mode_computation_charges: u64, | ||||||
/// Amount of burned computation rewards accumulated during safe mode. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
#[serde_as(as = "iota_types::iota_serde::BigInt<u64>")] | ||||||
#[schemars(with = "crate::_schemars::U64")] | ||||||
pub safe_mode_computation_charges_burned: u64, | ||||||
/// Amount of storage rebates accumulated (and not yet burned) during safe | ||||||
/// mode. | ||||||
#[serde_as(as = "iota_types::iota_serde::BigInt<u64>")] | ||||||
|
@@ -443,7 +447,8 @@ impl From<iota_types::iota_system_state::iota_system_state_summary::IotaSystemSt | |||||
reference_gas_price, | ||||||
safe_mode, | ||||||
safe_mode_storage_charges, | ||||||
safe_mode_computation_rewards, | ||||||
safe_mode_computation_charges, | ||||||
safe_mode_computation_charges_burned, | ||||||
safe_mode_storage_rebates, | ||||||
safe_mode_non_refundable_storage_fee, | ||||||
epoch_start_timestamp_ms, | ||||||
|
@@ -480,7 +485,8 @@ impl From<iota_types::iota_system_state::iota_system_state_summary::IotaSystemSt | |||||
reference_gas_price, | ||||||
safe_mode, | ||||||
safe_mode_storage_charges, | ||||||
safe_mode_computation_rewards, | ||||||
safe_mode_computation_charges, | ||||||
safe_mode_computation_charges_burned, | ||||||
safe_mode_storage_rebates, | ||||||
safe_mode_non_refundable_storage_fee, | ||||||
epoch_start_timestamp_ms, | ||||||
|
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.
rewards
should becharges
.