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

Have exchange module update marker net-asset-value entries #1741

Merged
merged 15 commits into from
Nov 10, 2023

Conversation

SpicyLemon
Copy link
Contributor

Description

closes: #1736

During a settlement, update the marker's net-asset-value.


Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.

  • Targeted PR against correct branch (see CONTRIBUTING.md)
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
  • Wrote unit and integration tests
  • Updated relevant documentation (docs/) or specification (x/<module>/spec/)
  • Added relevant godoc comments.
  • Added a relevant changelog entry to the Unreleased section in CHANGELOG.md
  • Re-reviewed Files changed in the Github PR explorer
  • Review Codecov Report in the comment section below once CI passes

@SpicyLemon SpicyLemon requested a review from a team as a code owner November 9, 2023 01:13
@SpicyLemon SpicyLemon changed the title Dwedul/1736 exchange nav Have exchange module update marker net-asset-value entries. Nov 9, 2023
Copy link

codecov bot commented Nov 9, 2023

Codecov Report

Merging #1741 (a02901f) into main (5128186) will increase coverage by 0.04%.
The diff coverage is 95.69%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1741      +/-   ##
==========================================
+ Coverage   72.88%   72.93%   +0.04%     
==========================================
  Files         289      289              
  Lines       42129    42221      +92     
==========================================
+ Hits        30704    30792      +88     
- Misses      10070    10073       +3     
- Partials     1355     1356       +1     
Files Coverage Δ
app/app.go 84.89% <100.00%> (ø)
x/exchange/fulfillment.go 92.38% <100.00%> (+0.49%) ⬆️
x/exchange/keeper/keeper.go 94.70% <100.00%> (+0.10%) ⬆️
x/exchange/keeper/fulfillment.go 98.61% <92.59%> (-1.39%) ⬇️

@SpicyLemon SpicyLemon changed the title Have exchange module update marker net-asset-value entries. Have exchange module update marker net-asset-value entries Nov 9, 2023
iramiller
iramiller previously approved these changes Nov 9, 2023
Copy link
Member

@iramiller iramiller left a comment

Choose a reason for hiding this comment

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

This looks like it will be a good first step in this process

Taztingo
Taztingo previously approved these changes Nov 9, 2023
nullpointer0x00
nullpointer0x00 previously approved these changes Nov 9, 2023
iramiller
iramiller previously approved these changes Nov 10, 2023
@iramiller iramiller dismissed stale reviews from Taztingo, nullpointer0x00, and themself via f9ed531 November 10, 2023 17:51
iramiller
iramiller previously approved these changes Nov 10, 2023
@iramiller iramiller enabled auto-merge (squash) November 10, 2023 18:47
@iramiller iramiller merged commit b740e92 into main Nov 10, 2023
40 checks passed
@iramiller iramiller deleted the dwedul/1736-exchange-nav branch November 10, 2023 18:48
SpicyLemon added a commit that referenced this pull request Nov 10, 2023
* [1736]: Properly wrap the errors in AddSetNetAssetValues.

* [1736]: Reorg SetNetAssetValue to emit the event last and create the key and store closer to where they're used.

* [1736]: Move the NAV event back up to earlier and add a comment on why its not at the end like most other events.

* [1736]: Add the marker keeper to the exchange keeper.

* [1736]: Generate and record the NAVs with the marker module after a settlement.

* [1736]: Unit tests on GetNAVs.

* [1736]: update GetNAVs to use asks if there aren't any bids.

* [1736]: Unit tests on the keeper changes and fix the ones that broke.

* [1736]: Update the msg server tests too.

* [1736]: Undo the marker keeper changes since it basically just boiled down to the addition of a comment.

* [1736]: Update the changelog to mark v1.17.0-rc2 and also include an entry for this PR.

---------

Co-authored-by: Ira Miller <72319+iramiller@users.noreply.github.com>
iramiller added a commit that referenced this pull request Nov 10, 2023
…1743)

* Add the spec docs for the exchange module (#1729)

* [1700]: make update-tocs to fix some existing TOCs.

* [1700]: First crack at the exchange spec main README.

* [1700]: First crack at the concepts spec doc.

* [1700]: First crack at the state spec doc.

* [1700]: Add empty place-holder files for the rest of the exchange spec docs.

* [1700]: Initial write-up of messages spec doc.

* [1700]: Events spec doc.

* [1700]: Standardize the hr below the tocs.

* [1700]: in the messages spec doc, include more sub-message content and add link references to those sections.

* [1700]: Spec doc on the queries.

* [1700]: Params spec doc.

* [1700]: Turn lots of stuff into links and fix some inconsistent spacing.

* [1700]: Reorder some market state entries.

* [1700]: Add some missing blurbs under L1 headings. Remove the hrs above the L2 headings, and put a hr above each TOC. A L2 heading is underlined, so it looks weird when there's an hr above them too.

* [1700]: Some updates to concepts from proof-reading them. Should be pretty solid now.

* [1700]: Tweaks to state doc upon proof-reading.

* [1700]: Proof reading of messages spec.

* [1700]: Proof-read of the queries spec doc.

* [1700]: Small tweak to the params spec doc upon proofreading.

* Update x/exchange/spec/03_messages.md

Co-authored-by: Jason Talis <jason.talis@gmail.com>

---------

Co-authored-by: Jason Talis <jason.talis@gmail.com>

* Fixed denom metadata source chain-id retrieval for new ibc markers (#1738)

* should be using packet dest port and channel to get the correct source chain id

* fix compile error

* add upgrade handler for rc3, add changelog

* add generated nav map

* Add upgrade handler to add marker navs for pio-mainnet-1 (#1712)

* add upgrade handler for net asset values

* add upgrade handler for nav

* add upgrade test

* add more test cases

* add changelog entry

* check iterate error

* add custom list processing, add a few examples for testnet

* fix default logic and change log

* fix test

* Add new navs for mainnet in list

* Update tests

* update method comment

* Rename update function, add detailed comments

---------

Co-authored-by: Ira Miller <72319+iramiller@users.noreply.github.com>

* Add additional trigger module logging (#1742)

* Add additional logging.

* Update logging to show success.

* Update changelog.

* Have exchange module update marker net-asset-value entries (#1741)

* [1736]: Properly wrap the errors in AddSetNetAssetValues.

* [1736]: Reorg SetNetAssetValue to emit the event last and create the key and store closer to where they're used.

* [1736]: Move the NAV event back up to earlier and add a comment on why its not at the end like most other events.

* [1736]: Add the marker keeper to the exchange keeper.

* [1736]: Generate and record the NAVs with the marker module after a settlement.

* [1736]: Unit tests on GetNAVs.

* [1736]: update GetNAVs to use asks if there aren't any bids.

* [1736]: Unit tests on the keeper changes and fix the ones that broke.

* [1736]: Update the msg server tests too.

* [1736]: Undo the marker keeper changes since it basically just boiled down to the addition of a comment.

* [1736]: Update the changelog to mark v1.17.0-rc2 and also include an entry for this PR.

---------

Co-authored-by: Ira Miller <72319+iramiller@users.noreply.github.com>

* Add additional trigger events (#1740)

* Create new events and generate protos.

* Add events to emit.

* Update tests for processing to test new dispatched event.

* Add tests for EventTriggerDetection.

* Update specs for events.

* Update changelog.

* Change EventTriggerExecuted to contain a success flag rather than an error string. It's possible for the error to be non-deterministic.

* Update assert.

---------

Co-authored-by: Ira Miller <72319+iramiller@users.noreply.github.com>

* Mark v1.17.0-rc3 in the changelog and release notes.

---------

Co-authored-by: Jason Talis <jason.talis@gmail.com>
Co-authored-by: Carlton Hanna <nullpointer0x00@gmail.com>
Co-authored-by: Ira Miller <72319+iramiller@users.noreply.github.com>
Co-authored-by: Matt Witkowski <mwitkowski@provenance.io>
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.

Update Marker NAV with exchange settlement
4 participants