Skip to content

Use transaction compute spend helper - #4348

Open
eranrund wants to merge 1 commit into
ProvableHQ:stagingfrom
eranrund:compute-spend-helper
Open

Use transaction compute spend helper#4348
eranrund wants to merge 1 commit into
ProvableHQ:stagingfrom
eranrund:compute-spend-helper

Conversation

@eranrund

@eranrund eranrund commented Jul 9, 2026

Copy link
Copy Markdown

Motivation

DRYing things up, see #4253

Test Plan

Relying on existing tests.

Documentation

N/A

Backwards compatibility

Logic should be identical so no backwards compatibility issues expected.

Transaction::Execute(_, _, execution, _) => {
let (_, cost_details) = execution_cost(self.ledger.vm().process(), execution, consensus_version)?;
let compute_spend = execute_compute_cost_in_microcredits(cost_details, consensus_version);
if consensus_version >= ConsensusVersion::V11 {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Is this consensus version gate still active with this refactor? Does transaction_compute_spend_in_microcredits exhibit the same behavior?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Even if it isn't, it would be harmless to remove it as the network is already past that consensus version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants