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

Generate Tx Borsh schema #2931

Merged
merged 2 commits into from
Apr 12, 2024
Merged

Generate Tx Borsh schema #2931

merged 2 commits into from
Apr 12, 2024

Conversation

murisi
Copy link
Contributor

@murisi murisi commented Mar 21, 2024

Describe your changes

Made the necessary changes to successfully generate an accurate Tx Borsh schema. This is useful for describing the transaction format to external collaborators. More specifically, the changes were as follows:

  • Now using the latest MASP crate, which has the correct Borsh schemas
  • Renaming certain structures to avoid name collisions in the Schema
  • Adding an example to the repo allowing the generation of a Tx schema to a file

Note: Because the MASP crate update fixes serialization of a certain Transaction component in corner cases, this PR is breaking.

Indicate on which release or other PRs this topic is based on

Namada v0.32.0

Checklist before merging to draft

  • I have added a changelog
  • Git history is in acceptable state

Copy link

codecov bot commented Mar 21, 2024

Codecov Report

Attention: Patch coverage is 66.66667% with 40 lines in your changes are missing coverage. Please review.

Project coverage is 53.44%. Comparing base (5e0b162) to head (3636c41).
Report is 4 commits behind head on main.

Files Patch % Lines
crates/light_sdk/src/transaction/pos.rs 0.00% 12 Missing ⚠️
crates/tx/src/types.rs 45.00% 11 Missing ⚠️
crates/light_sdk/src/transaction/account.rs 0.00% 3 Missing ⚠️
crates/light_sdk/src/transaction/mod.rs 0.00% 3 Missing ⚠️
crates/apps/src/lib/bench_utils.rs 0.00% 2 Missing ⚠️
crates/apps/src/lib/client/tx.rs 0.00% 2 Missing ⚠️
crates/light_sdk/src/transaction/pgf.rs 0.00% 2 Missing ⚠️
crates/apps/src/lib/config/genesis/transactions.rs 0.00% 1 Missing ⚠️
crates/light_sdk/src/transaction/bridge.rs 0.00% 1 Missing ⚠️
crates/light_sdk/src/transaction/governance.rs 0.00% 1 Missing ⚠️
... and 2 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2931      +/-   ##
==========================================
- Coverage   53.44%   53.44%   -0.01%     
==========================================
  Files         310      310              
  Lines      101574   101580       +6     
==========================================
+ Hits        54288    54289       +1     
- Misses      47286    47291       +5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@sug0 sug0 left a comment

Choose a reason for hiding this comment

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

a couple of suggestions

crates/core/src/key/common.rs Outdated Show resolved Hide resolved
crates/core/src/key/common.rs Outdated Show resolved Hide resolved
crates/core/src/key/common.rs Outdated Show resolved Hide resolved
crates/core/src/key/common.rs Outdated Show resolved Hide resolved
tzemanovic added a commit that referenced this pull request Apr 1, 2024
* murisi/generate-tx-schema:
  Added a changelog entry.
  Generate Tx Borsh schema using the latest MASP schema, whilst avoiding name collissions.
tzemanovic added a commit that referenced this pull request Apr 10, 2024
* origin/murisi/generate-tx-schema:
  Added a changelog entry.
  Generate Tx Borsh schema using the latest MASP schema, whilst avoiding name collissions.

# Conflicts:
#	crates/apps/src/lib/bench_utils.rs
#	crates/apps/src/lib/node/ledger/shell/finalize_block.rs
#	crates/apps/src/lib/node/ledger/shell/prepare_proposal.rs
#	crates/apps/src/lib/node/ledger/shell/process_proposal.rs
#	crates/sdk/src/tx.rs
#	crates/tx/src/data/mod.rs
@tzemanovic tzemanovic merged commit c3bf795 into main Apr 12, 2024
18 of 19 checks passed
@tzemanovic tzemanovic deleted the murisi/generate-tx-schema branch April 12, 2024 10:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants