Skip to content
This repository has been archived by the owner on Dec 26, 2024. It is now read-only.

fix(execution): execution of declare txs - fetch the class from the r… #1236

Merged
merged 1 commit into from
Oct 4, 2023

Conversation

yair-starkware
Copy link
Contributor

@yair-starkware yair-starkware commented Oct 2, 2023

…ight block

Pull Request type

Please check the type of change your PR introduces:

  • Bugfix
  • Feature
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no API changes)
  • Build-related changes
  • Documentation content changes
  • Other (please describe):

What is the current behavior?

Issue Number: N/A

What is the new behavior?

Does this introduce a breaking change?

  • Yes
  • No

Other information


This change is Reviewable

@yair-starkware yair-starkware self-assigned this Oct 2, 2023
dan-starkware
dan-starkware previously approved these changes Oct 2, 2023
Copy link
Collaborator

@dan-starkware dan-starkware left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewable status: 0 of 1 files reviewed, all discussions resolved (waiting on @yair-starkware)


crates/papyrus_rpc/src/v0_4_0/api/mod.rs line 378 at r1 (raw file):

// For re-execution (traceTransaction, traceBlockTransactions) we need to get the class definition
// of declare transactions from the storage before the execution. They are stored in the state after
// the block, so we need to get it from the state after given block.

Suggestion:

the block in wich they appear, so we need to get it from the state after given block.

crates/papyrus_rpc/src/v0_4_0/api/mod.rs line 385 at r1 (raw file):

) -> Result<starknet_api::deprecated_contract_class::ContractClass, ErrorObjectOwned> {
    // The class is stored in the state after the block, so we need to get it from the state after
    // given block.

How is that different from the comment above? Consider deleting.

Code quote:

    // The class is stored in the state after the block, so we need to get it from the state after
    // given block.

Copy link
Contributor Author

@yair-starkware yair-starkware left a comment

Choose a reason for hiding this comment

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

Reviewable status: 0 of 1 files reviewed, all discussions resolved


crates/papyrus_rpc/src/v0_4_0/api/mod.rs line 378 at r1 (raw file):

// For re-execution (traceTransaction, traceBlockTransactions) we need to get the class definition
// of declare transactions from the storage before the execution. They are stored in the state after
// the block, so we need to get it from the state after given block.

done


crates/papyrus_rpc/src/v0_4_0/api/mod.rs line 385 at r1 (raw file):

Previously, dan-starkware wrote…

How is that different from the comment above? Consider deleting.

done

@codecov
Copy link

codecov bot commented Oct 2, 2023

Codecov Report

Merging #1236 (2484265) into main (58dba19) will increase coverage by 0.02%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##             main    #1236      +/-   ##
==========================================
+ Coverage   71.69%   71.72%   +0.02%     
==========================================
  Files          82       82              
  Lines        7851     7848       -3     
  Branches     7851     7848       -3     
==========================================
  Hits         5629     5629              
+ Misses       1315     1313       -2     
+ Partials      907      906       -1     
Files Coverage Δ
crates/papyrus_rpc/src/v0_4_0/api/mod.rs 50.00% <0.00%> (+0.81%) ⬆️

... and 1 file with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@yair-starkware yair-starkware force-pushed the yair/fix_declare_execution branch from 65662c9 to 2484265 Compare October 4, 2023 06:56
Copy link
Collaborator

@dan-starkware dan-starkware left a comment

Choose a reason for hiding this comment

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

Reviewed 1 of 1 files at r2, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @yair-starkware)

@yair-starkware yair-starkware added this pull request to the merge queue Oct 4, 2023
Merged via the queue into main with commit 1c639f1 Oct 4, 2023
19 checks passed
@yair-starkware yair-starkware deleted the yair/fix_declare_execution branch October 4, 2023 07:26
@github-actions github-actions bot locked and limited conversation to collaborators Oct 5, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants