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

Record net value asset only when explicitly set by user when adding marker #2030

Closed
4 tasks
nullpointer0x00 opened this issue Jun 12, 2024 · 1 comment · Fixed by #2160
Closed
4 tasks

Record net value asset only when explicitly set by user when adding marker #2030

nullpointer0x00 opened this issue Jun 12, 2024 · 1 comment · Fixed by #2160
Labels
enhancement New feature or request marker Marker Module
Milestone

Comments

@nullpointer0x00
Copy link
Contributor

Summary

Determine if the net asset value needs to be written as a record when adding a marker, based on whether it was explicitly set by the user.

Problem Definition

Currently, the net asset value is being written on an add marker transaction even if it hasn't been set by the user. This can cause confusion as it is unclear whether the value was intentionally left unset by the user or if they are using an older proto version that does not include these fields.

Proposal

Implement a mechanism to check if the volume and usd_mills fields have been explicitly set by the user before writing them as a record in the add marker transaction. This could involve:

  1. Checking for default values and determining if the fields are explicitly set.
  2. Using wrapper types to better handle the presence or absence of these fields.
  3. Adding version checks or flags to differentiate between different proto versions.

This enhancement will help prevent confusion and ensure that only intended values are recorded.


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned
@iramiller
Copy link
Member

Probably work on this at the same time as #2029

@SpicyLemon SpicyLemon added this to the backlog milestone Aug 19, 2024
@iramiller iramiller linked a pull request Sep 24, 2024 that will close this issue
8 tasks
iramiller added a commit that referenced this issue Sep 24, 2024
iramiller added a commit that referenced this issue Oct 2, 2024
* add expanded nav documentation for scope

* changelog

* add volume to metadata nav protos

* add volume parameter to metadata nav

* add another changelog for nav example

* Record net value asset only when explicitly set
by user when adding marker #2030

* fix metadata nav test argument format

* lint

* ensure metadata nav uses volume of 1
special handling of unset volume in nav to be one but allow zero for backwards compatibility

* fix nav event volume

* metadata scope set nav event documentation

---------

Co-authored-by: Carlton Hanna <[email protected]>
@github-project-automation github-project-automation bot moved this from In Progress to Done in Provenance Core Protocol Team Oct 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request marker Marker Module
Projects
Development

Successfully merging a pull request may close this issue.

3 participants