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: Use scrypto_decode_with_nice_error and backwards compatability #1010

Merged
merged 1 commit into from
Oct 31, 2024

Conversation

dhedey
Copy link
Contributor

@dhedey dhedey commented Oct 21, 2024

Summary

(Blocked on #1008 for merging into develop)

  • Uses scrypto_decode_with_nice_error in a few places where a mis-decode will result in a panic... To help us debug if something bad goes wrong.
  • Adds CheckedBackwardsCompatibleSchema requirements and assertions to all SBOR-based field codecs.

Testing

Existing and new tests pass

Copy link

Phylum Report Link

@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 68.18182% with 14 lines in your changes missing coverage. Please review.

Project coverage is 43.3%. Comparing base (fc84b46) to head (f138bf2).

Files with missing lines Patch % Lines
...pi-server/src/engine_state_api/attached_modules.rs 0.0% 6 Missing ⚠️
...col/protocol_updates/protocol_update_definition.rs 0.0% 5 Missing ⚠️
core-rust/state-manager/src/store/rocks_db.rs 50.0% 3 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@                          Coverage Diff                           @@
##             feature/genesis-is-a-protocol-update   #1010   +/-   ##
======================================================================
  Coverage                                    43.3%   43.3%           
+ Complexity                                   4614    4612    -2     
======================================================================
  Files                                        1730    1730           
  Lines                                       53278   53300   +22     
  Branches                                     1517    1517           
======================================================================
+ Hits                                        23077   23096   +19     
- Misses                                      29723   29726    +3     
  Partials                                      478     478           
Flag Coverage Δ
rust 43.3% <68.1%> (+<0.1%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
core-rust/node-common/src/store/typed_cf_api.rs 79.5% <100.0%> (ø)
core-rust/p2p/src/address_book_components.rs 22.2% <100.0%> (+22.2%) ⬆️
core-rust/p2p/src/migration.rs 100.0% <100.0%> (+100.0%) ⬆️
core-rust/p2p/src/safety_store_components.rs 5.5% <100.0%> (+5.5%) ⬆️
...protocol_updates/definitions/babylon_definition.rs 88.3% <100.0%> (+0.1%) ⬆️
core-rust/state-manager/src/receipt.rs 77.5% <100.0%> (+0.5%) ⬆️
core-rust/state-manager/src/staging/result.rs 84.2% <100.0%> (+<0.1%) ⬆️
core-rust/state-manager/src/store/traits.rs 37.0% <100.0%> (+2.1%) ⬆️
core-rust/state-manager/src/types.rs 50.8% <100.0%> (+0.1%) ⬆️
core-rust/state-manager/src/store/rocks_db.rs 48.1% <50.0%> (+<0.1%) ⬆️
... and 2 more

... and 2 files with indirect coverage changes

Copy link

Docker tags
docker.io/radixdlt/private-babylon-node:pr-1010
docker.io/radixdlt/private-babylon-node:101740795e
docker.io/radixdlt/private-babylon-node:sha-1017407

Copy link

Base automatically changed from feature/genesis-is-a-protocol-update to develop October 31, 2024 12:08
@dhedey dhedey merged commit ae2ed91 into develop Oct 31, 2024
22 checks passed
@dhedey dhedey deleted the tweak/cuttlefish-sbor-improvements branch October 31, 2024 12:11
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