Add sierra for predeployed contracts#4275
Conversation
|
This change is part of the following stack: Change managed by git-spice. |
0b069ee to
26eb6c2
Compare
4fca40d to
c10bf19
Compare
b9514d7 to
ea8f43a
Compare
5ed9c9d to
cb454a8
Compare
cb454a8 to
7b1d9b2
Compare
| name: ${{ inputs.artifact-name }} | ||
| path: crates/cheatnet/src/data/predeployed_contracts | ||
| if-no-files-found: error | ||
| compression-level: 0 |
There was a problem hiding this comment.
note: Intentional, because files are already stored as *.json.gz.
| println!("cargo:rerun-if-changed=build.rs"); | ||
|
|
There was a problem hiding this comment.
Can you provide some context this?
It could be reasonable to add a comment explaining this
There was a problem hiding this comment.
This is here so Cargo reruns the build script when the validation logic in build.rs changes, even if the generated artifacts themselves did not. I added a short comment to make that intent explicit.
There was a problem hiding this comment.
Good, makes sense.
I wonder though if we should also track the build script that emits the artifacts.
Since this does not currently catch the case where artifacts may become stale relative to the updated script logic (e.g. swapped ref)
There was a problem hiding this comment.
I agree, but the thing is that tracking the generator script here would only rerun this validation, but it still would not detect stale artifacts because the build script currently checks only for file presence. To actually cover cases like a swapped ref, we would need to persist some metadata/stamp from the generation step and validate it here as well.
There was a problem hiding this comment.
Hmmm, should we then perhaps make build.rs actually run the script itself?
There was a problem hiding this comment.
If this is tricky to set up though - it's fine as is, considering we don't envision often bumps
… into 3433-add-predeployed-contracts-sierra
| println!("cargo:rerun-if-changed=build.rs"); | ||
|
|
There was a problem hiding this comment.
Good, makes sense.
I wonder though if we should also track the build script that emits the artifacts.
Since this does not currently catch the case where artifacts may become stale relative to the updated script logic (e.g. swapped ref)

Closes #3433
Introduced changes
This PR adds sierra of predeployed contracts, allowing to properly display these contracts, when used with debugging features (backtrace and traces).
Backtrace
Before
Shown as forked contract
After
Properly displayed
Traces
Before
It was not even possible to display trace
After
Checklist
CHANGELOG.md