Skip to content
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): Add computation_cost_burned field to GasCostSummary #3944

Merged
merged 28 commits into from
Nov 11, 2024

Conversation

cyberphysic4l
Copy link
Contributor

Description of change

Added field computation_cost_burned to the widely used GasCostSummary type to prevent creating V2 of this type in upcoming protocol changes to burn a fixed base fee for all transactions.

Links to any relevant issues

Foundations for #3122

How the change has been tested

Existing tests pass

@miker83z miker83z marked this pull request as ready for review November 7, 2024 16:13
@miker83z miker83z requested review from a team as code owners November 7, 2024 16:13
@@ -43,7 +43,7 @@ pub const APPROX_SIZE_OF_EXECUTION_STATUS: usize = 120;
// Approximate size of `EpochId` type in bytes
pub const APPROX_SIZE_OF_EPOCH_ID: usize = 10;
// Approximate size of `GasCostSummary` type in bytes
pub const APPROX_SIZE_OF_GAS_COST_SUMMARY: usize = 40;
pub const APPROX_SIZE_OF_GAS_COST_SUMMARY: usize = 40; // TODO: Update this
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we have an issue to track this maybe?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well I actually think we can update this and get rid of the TODO. Do you know if this estimation of size is as simple as 10 bytes per u64 value of something? We have one additional u64 field so perhaps the new approx size is just 50 instead of 40...

@@ -203,6 +203,9 @@ impl TryFrom<StoredCheckpoint> for RpcCheckpoint {
end_of_epoch_data,
epoch_rolling_gas_cost_summary: GasCostSummary {
computation_cost: checkpoint.computation_cost as u64,
// TODO_FIXED_BASE_FEE: update computation cost burned in checkpoint to be used
// here.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A link to an issue maybe?

Copy link
Member

@alexsporn alexsporn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, lets merge it after
#3831
and
iotaledger/iota-rust-sdk#20
since this will require updated expectations and snapshots.

Copy link
Member

@lzpap lzpap left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, lets merge it after #3831 and iotaledger/iota-rust-sdk#20 since this will require updated expectations and snapshots.

Second that.

@DaughterOfMars
Copy link
Contributor

I removed the current light client checkpoints so those tests will fail again. I'd like to wait for #3926 to re-do those

@muXxer muXxer force-pushed the feat/gascostsummaryburned branch from 8756c8d to 0e5aca9 Compare November 8, 2024 17:19
@muXxer muXxer force-pushed the feat/gascostsummaryburned branch from d173ef1 to 8e46236 Compare November 8, 2024 18:40
@muXxer muXxer requested review from a team as code owners November 11, 2024 08:45
Copy link
Contributor

github-actions bot commented Nov 11, 2024

⚠️ 🦋 Changesets Warning: This PR has changes to public npm packages, but does not contain a changeset. You can create a changeset easily by running pnpm changeset in the root of the IOTA repo, and following the prompts. If your change does not need a changeset (e.g. a documentation-only change), you can ignore this message. This warning will be removed when a changeset is added to this pull request.

Learn more about Changesets.

Copy link
Contributor

This pull request has been deployed to Vercel.

Latest commit: afe08dc

✅ Preview: https://apps-backend-29a719c9ccbdb9b80c97b599a599d8953354da-2r7af1m9v.vercel.app

Copy link
Contributor

This pull request has been deployed to Vercel.

Latest commit: afe08dc

✅ Preview: https://iota-rebased-explorer-092603f1de8088243ccb8b861b23e-lw8ngr03w.vercel.app

Copy link
Contributor

This pull request has been deployed to Vercel.

Latest commit: afe08dc

✅ Preview: https://wallet-dashboard-a225fcfa1e2f852205a61a7cd1d5d93e92-i199qhj5s.vercel.app

Copy link
Contributor

This pull request has been deployed to Vercel.

Latest commit: 42c4fde

✅ Preview: https://apps-backend-29a719c9ccbdb9b80c97b599a599d8953354da-9pjvb3gx1.vercel.app

Copy link
Contributor

This pull request has been deployed to Vercel.

Latest commit: 42c4fde

✅ Preview: https://wallet-dashboard-a225fcfa1e2f852205a61a7cd1d5d93e92-bof8u39qe.vercel.app

Copy link
Contributor

This pull request has been deployed to Vercel.

Latest commit: 42c4fde

✅ Preview: https://iota-rebased-explorer-092603f1de8088243ccb8b861b23e-342vqbvc4.vercel.app

Copy link
Contributor

This pull request has been deployed to Vercel.

Latest commit: 2bb867e

✅ Preview: https://iota-rebased-explorer-092603f1de8088243ccb8b861b23e-qems1j3b3.vercel.app

Copy link
Contributor

This pull request has been deployed to Vercel.

Latest commit: 2bb867e

✅ Preview: https://wallet-dashboard-a225fcfa1e2f852205a61a7cd1d5d93e92-p4130azn5.vercel.app

Copy link
Contributor

This pull request has been deployed to Vercel.

Latest commit: 2bb867e

✅ Preview: https://apps-backend-29a719c9ccbdb9b80c97b599a599d8953354da-2xwb4nv88.vercel.app

@lzpap lzpap merged commit cf5995b into develop Nov 11, 2024
38 of 40 checks passed
@lzpap lzpap deleted the feat/gascostsummaryburned branch November 11, 2024 12:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tokenomics Issues related to tokenomics and gas price modulation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants