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(amino): Add TypeDesc Amino implementation and TypedValue marshaler #2113

Closed
wants to merge 11 commits into from

Conversation

gfanton
Copy link
Member

@gfanton gfanton commented May 15, 2024

PS: This PR is still in draft, but I would welcome any feedback on it

This PR has two main objectives. The first is to add a TypeDesc method implementation to Amino, allowing a type to self-describe. The second is to introduce a new package, gnoamino, dedicated to (un)marshaling Gno types, starting with gnolang.TypedValue and its TypedValueWrapper, which implements the TypeDesc Amino method.

Most of the methods in TypedValueWrapper are inspired by or copied from gnonative.go. They are exported here for several reasons:

  1. The methods in gnonative are intended for general use and may be removed later, while the ones here are focused solely on marshaling and unmarshaling.
  2. These methods can be simpler, as they do not require the full support of reflection, enabling a more detailed implementation.
  3. We assume prior knowledge of the type of the TypedValue, simplifying its management.
  4. We will likely implement gas consumption calculations within those methods.
Contributors' checklist...
  • Added new tests, or not needed, or not feasible
  • Provided an example (e.g. screenshot) to aid review or the PR is self-explanatory
  • Updated the official documentation or not needed
  • No breaking changes were made, or a BREAKING CHANGE: xxx message was included in the description
  • Added references to related issues and PRs
  • Provided any useful hints for running manual tests
  • Added new benchmarks to generated graphs, if any. More info here.

gfanton added 5 commits May 14, 2024 09:32
Signed-off-by: gfanton <8671905+gfanton@users.noreply.github.com>
Signed-off-by: gfanton <8671905+gfanton@users.noreply.github.com>
Signed-off-by: gfanton <8671905+gfanton@users.noreply.github.com>
Signed-off-by: gfanton <8671905+gfanton@users.noreply.github.com>
Signed-off-by: gfanton <8671905+gfanton@users.noreply.github.com>
@github-actions github-actions bot added 📦 🤖 gnovm Issues or PRs gnovm related 📦 🌐 tendermint v2 Issues or PRs tm2 related labels May 15, 2024
Copy link

codecov bot commented May 15, 2024

gfanton added 6 commits May 15, 2024 11:44
Signed-off-by: gfanton <8671905+gfanton@users.noreply.github.com>
Signed-off-by: gfanton <8671905+gfanton@users.noreply.github.com>
Signed-off-by: gfanton <8671905+gfanton@users.noreply.github.com>
Signed-off-by: gfanton <8671905+gfanton@users.noreply.github.com>
Signed-off-by: gfanton <8671905+gfanton@users.noreply.github.com>
Copy link

This PR is stale because it has been open 3 months with no activity. Remove stale label or comment or this will be closed in 3 months.

@github-actions github-actions bot added Stale and removed Stale labels Nov 16, 2024
@jefft0 jefft0 added the Stale label Nov 28, 2024
@github-actions github-actions bot removed the Stale label Nov 29, 2024
@aeddi aeddi mentioned this pull request Dec 4, 2024
@thehowl
Copy link
Member

thehowl commented Jan 23, 2025

@gfanton I have this PR in my review queue from forever ago. Do you still need reviews?

@Gno2D2
Copy link
Collaborator

Gno2D2 commented Jan 23, 2025

🛠 PR Checks Summary

All Automated Checks passed. ✅

Manual Checks (for Reviewers):
  • IGNORE the bot requirements for this PR (force green CI check)
Read More

🤖 This bot helps streamline PR reviews by verifying automated checks and providing guidance for contributors and reviewers.

✅ Automated Checks (for Contributors):

🟢 Maintainers must be able to edit this pull request (more info)

☑️ Contributor Actions:
  1. Fix any issues flagged by automated checks.
  2. Follow the Contributor Checklist to ensure your PR is ready for review.
    • Add new tests, or document why they are unnecessary.
    • Provide clear examples/screenshots, if necessary.
    • Update documentation, if required.
    • Ensure no breaking changes, or include BREAKING CHANGE notes.
    • Link related issues/PRs, where applicable.
☑️ Reviewer Actions:
  1. Complete manual checks for the PR, including the guidelines and additional checks if applicable.
📚 Resources:
Debug
Automated Checks
Maintainers must be able to edit this pull request (more info)

If

🟢 Condition met
└── 🟢 The pull request was created from a fork (head branch repo: gfanton/gno)

Then

🟢 Requirement satisfied
└── 🟢 Maintainer can modify this pull request

Manual Checks
**IGNORE** the bot requirements for this PR (force green CI check)

If

🟢 Condition met
└── 🟢 On every pull request

Can be checked by

  • Any user with comment edit permission

@gfanton
Copy link
Member Author

gfanton commented Jan 23, 2025

@thehowl we can close it, it have been replaced by #2652

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📦 🌐 tendermint v2 Issues or PRs tm2 related 📦 🤖 gnovm Issues or PRs gnovm related
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants