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

imp: transfer total escrow follow ups #3558

Merged
merged 19 commits into from
Jun 1, 2023

Conversation

colin-axner
Copy link
Contributor

@colin-axner colin-axner commented May 4, 2023

Description

feature branch containing changes approved in smaller prs:

ref: #3368

Commit Message / Changelog Entry

type: commit message

see the guidelines for commit messages. (view raw markdown for examples)


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.
  • Code follows the module structure standards and Go style guide.
  • Wrote unit and integration tests.
  • Updated relevant documentation (docs/) or specification (x/<module>/spec/).
  • Added relevant godoc comments.
  • Provide a commit message to be used for the changelog entry in the PR description for review.
  • Re-reviewed Files changed in the Github PR explorer.
  • Review Codecov Report in the comment section below once CI passes.

crodriguezvega and others added 3 commits April 27, 2023 18:37
* add docs for total escrow feature

* revert change

* fix tag

* Update docs/migrations/v7-to-v7_1.md

---------

Co-authored-by: colin axnér <25233464+colin-axner@users.noreply.github.com>
* some more review comments

* Rename pathAndEscrowAMount to pathAndEscrowAmount

---------

Co-authored-by: DimitrisJim <d.f.hilliard@gmail.com>
* add invariant for total escrow

* address review comment

* refactor: simplify logic for asserting invariant

* fix: use safeAdd instead of append

* Update modules/apps/transfer/keeper/keeper.go

Co-authored-by: Damian Nolan <damiannolan@gmail.com>

---------

Co-authored-by: Colin Axnér <25233464+colin-axner@users.noreply.github.com>
Co-authored-by: Damian Nolan <damiannolan@gmail.com>
# Conflicts:
#	modules/apps/transfer/keeper/migrations_test.go
#	modules/apps/transfer/keeper/relay_test.go
@codecov-commenter
Copy link

codecov-commenter commented May 15, 2023

Codecov Report

Merging #3558 (decbade) into main (ccfce10) will increase coverage by 0.03%.
The diff coverage is 90.00%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3558      +/-   ##
==========================================
+ Coverage   78.76%   78.80%   +0.03%     
==========================================
  Files         186      187       +1     
  Lines       12816    12847      +31     
==========================================
+ Hits        10095    10124      +29     
- Misses       2289     2292       +3     
+ Partials      432      431       -1     
Impacted Files Coverage Δ
modules/apps/transfer/keeper/invariants.go 85.71% <85.71%> (ø)
modules/apps/transfer/keeper/keeper.go 90.47% <100.00%> (+1.85%) ⬆️
modules/apps/transfer/module.go 52.63% <100.00%> (ø)

crodriguezvega and others added 4 commits May 16, 2023 14:33
* do not store 0 escrow amout

* adapt success test

* Update modules/apps/transfer/keeper/keeper.go

Co-authored-by: Jim Fasarakis-Hilliard <d.f.hilliard@gmail.com>

* Update modules/apps/transfer/keeper/keeper.go

Co-authored-by: Damian Nolan <damiannolan@gmail.com>

* add comments

---------

Co-authored-by: Jim Fasarakis-Hilliard <d.f.hilliard@gmail.com>
Co-authored-by: Damian Nolan <damiannolan@gmail.com>
Copy link
Member

Choose a reason for hiding this comment

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

One more to add here after conflicts are resolved #3553 (comment)

Copy link
Member

@damiannolan damiannolan left a comment

Choose a reason for hiding this comment

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

Everything in this PR looks good to me! Squeaky clean 🧽

Linter is failing but its likely trivial, maybe it could be the var block thing I mentioned 🤔

e2e/testvalues/values.go Outdated Show resolved Hide resolved
e2e/testvalues/values.go Outdated Show resolved Hide resolved
Copy link
Member

Choose a reason for hiding this comment

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

we could use a var block to declare all feature releases but I think having them separate is also nice and readable!

docs/apps/transfer/client.md Outdated Show resolved Hide resolved
docs/apps/transfer/client.md Outdated Show resolved Hide resolved
[For more information please refer to the 09-localhost light client module documentation](../ibc/light-clients/localhost/overview.md).
### Transfer migration

An automatic migration handler (TODO: add link after backport to v7.1.x is merged) is configured in the transfer module to set the total amount in escrow for all denominations of coins that have been sent out. For each denomination a state entry is added with the total amount of coins in escrow regardless of the channel from which they were transferred.
Copy link
Contributor

Choose a reason for hiding this comment

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

just dropping a comment here to make sure this TODO is not forgotten

crodriguezvega and others added 2 commits May 25, 2023 10:05
Co-authored-by: Jim Fasarakis-Hilliard <d.f.hilliard@gmail.com>
Co-authored-by: Damian Nolan <damiannolan@gmail.com>
crodriguezvega and others added 3 commits May 25, 2023 15:45
* docs: add adr 011 for total escrow state entry

* indentation

* code formatting

* Apply suggestions from code review

Co-authored-by: Damian Nolan <damiannolan@gmail.com>

* Apply suggestions from code review

Co-authored-by: Charly <charly@interchain.io>

---------

Co-authored-by: Damian Nolan <damiannolan@gmail.com>
Co-authored-by: Charly <charly@interchain.io>
Copy link
Contributor Author

@colin-axner colin-axner left a comment

Choose a reason for hiding this comment

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

ACK, LGTM

Copy link
Member

@damiannolan damiannolan left a comment

Choose a reason for hiding this comment

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

ayy! ACK latest commits since review. LGTM 🚀

@crodriguezvega crodriguezvega merged commit 6f628d9 into main Jun 1, 2023
@crodriguezvega crodriguezvega deleted the feat/total-escrow-state-entry branch June 1, 2023 07:05
mergify bot pushed a commit that referenced this pull request Jun 1, 2023
* transfer (total escrow): add documentation and migration docs (#3509)

* add docs for total escrow feature

* revert change

* fix tag

* Update docs/migrations/v7-to-v7_1.md

---------

Co-authored-by: colin axnér <25233464+colin-axner@users.noreply.github.com>

* transfer (total escrow): some more review comments (#3519)

* some more review comments

* Rename pathAndEscrowAMount to pathAndEscrowAmount

---------

Co-authored-by: DimitrisJim <d.f.hilliard@gmail.com>

* transfer (total escrow): add invariant for total escrow (#3506)

* add invariant for total escrow

* address review comment

* refactor: simplify logic for asserting invariant

* fix: use safeAdd instead of append

* Update modules/apps/transfer/keeper/keeper.go

Co-authored-by: Damian Nolan <damiannolan@gmail.com>

---------

Co-authored-by: Colin Axnér <25233464+colin-axner@users.noreply.github.com>
Co-authored-by: Damian Nolan <damiannolan@gmail.com>

* imp: do not store total escrow when amount is zero (#3585)

* do not store 0 escrow amout

* adapt success test

* Update modules/apps/transfer/keeper/keeper.go

Co-authored-by: Jim Fasarakis-Hilliard <d.f.hilliard@gmail.com>

* Update modules/apps/transfer/keeper/keeper.go

Co-authored-by: Damian Nolan <damiannolan@gmail.com>

* add comments

---------

Co-authored-by: Jim Fasarakis-Hilliard <d.f.hilliard@gmail.com>
Co-authored-by: Damian Nolan <damiannolan@gmail.com>

* add feature release for total escrow state entry to conditionally query the endpoint in e2e (#3605)

* fix total escrow cli documentation

* Apply suggestions from code review

Co-authored-by: Jim Fasarakis-Hilliard <d.f.hilliard@gmail.com>
Co-authored-by: Damian Nolan <damiannolan@gmail.com>

* address review comments

* docs: adr 011 total escrow state entry (#3641)

* docs: add adr 011 for total escrow state entry

* indentation

* code formatting

* Apply suggestions from code review

Co-authored-by: Damian Nolan <damiannolan@gmail.com>

* Apply suggestions from code review

Co-authored-by: Charly <charly@interchain.io>

---------

Co-authored-by: Damian Nolan <damiannolan@gmail.com>
Co-authored-by: Charly <charly@interchain.io>

---------

Co-authored-by: Carlos Rodriguez <carlos@interchain.io>
Co-authored-by: DimitrisJim <d.f.hilliard@gmail.com>
Co-authored-by: Damian Nolan <damiannolan@gmail.com>
Co-authored-by: Charly <charly@interchain.io>
(cherry picked from commit 6f628d9)

# Conflicts:
#	docs/architecture/README.md
#	docs/migrations/v7-to-v7_1.md
#	e2e/testconfig/testconfig.go
#	e2e/tests/transfer/base_test.go
crodriguezvega added a commit that referenced this pull request Jun 1, 2023
* imp: transfer total escrow follow ups (#3558)

* transfer (total escrow): add documentation and migration docs (#3509)

* add docs for total escrow feature

* revert change

* fix tag

* Update docs/migrations/v7-to-v7_1.md

---------

Co-authored-by: colin axnér <25233464+colin-axner@users.noreply.github.com>

* transfer (total escrow): some more review comments (#3519)

* some more review comments

* Rename pathAndEscrowAMount to pathAndEscrowAmount

---------

Co-authored-by: DimitrisJim <d.f.hilliard@gmail.com>

* transfer (total escrow): add invariant for total escrow (#3506)

* add invariant for total escrow

* address review comment

* refactor: simplify logic for asserting invariant

* fix: use safeAdd instead of append

* Update modules/apps/transfer/keeper/keeper.go

Co-authored-by: Damian Nolan <damiannolan@gmail.com>

---------

Co-authored-by: Colin Axnér <25233464+colin-axner@users.noreply.github.com>
Co-authored-by: Damian Nolan <damiannolan@gmail.com>

* imp: do not store total escrow when amount is zero (#3585)

* do not store 0 escrow amout

* adapt success test

* Update modules/apps/transfer/keeper/keeper.go

Co-authored-by: Jim Fasarakis-Hilliard <d.f.hilliard@gmail.com>

* Update modules/apps/transfer/keeper/keeper.go

Co-authored-by: Damian Nolan <damiannolan@gmail.com>

* add comments

---------

Co-authored-by: Jim Fasarakis-Hilliard <d.f.hilliard@gmail.com>
Co-authored-by: Damian Nolan <damiannolan@gmail.com>

* add feature release for total escrow state entry to conditionally query the endpoint in e2e (#3605)

* fix total escrow cli documentation

* Apply suggestions from code review

Co-authored-by: Jim Fasarakis-Hilliard <d.f.hilliard@gmail.com>
Co-authored-by: Damian Nolan <damiannolan@gmail.com>

* address review comments

* docs: adr 011 total escrow state entry (#3641)

* docs: add adr 011 for total escrow state entry

* indentation

* code formatting

* Apply suggestions from code review

Co-authored-by: Damian Nolan <damiannolan@gmail.com>

* Apply suggestions from code review

Co-authored-by: Charly <charly@interchain.io>

---------

Co-authored-by: Damian Nolan <damiannolan@gmail.com>
Co-authored-by: Charly <charly@interchain.io>

---------

Co-authored-by: Carlos Rodriguez <carlos@interchain.io>
Co-authored-by: DimitrisJim <d.f.hilliard@gmail.com>
Co-authored-by: Damian Nolan <damiannolan@gmail.com>
Co-authored-by: Charly <charly@interchain.io>
(cherry picked from commit 6f628d9)

# Conflicts:
#	docs/architecture/README.md
#	docs/migrations/v7-to-v7_1.md
#	e2e/testconfig/testconfig.go
#	e2e/tests/transfer/base_test.go

* fix conflicts

* remove dead links

---------

Co-authored-by: colin axnér <25233464+colin-axner@users.noreply.github.com>
Co-authored-by: Carlos Rodriguez <carlos@interchain.io>
@crodriguezvega crodriguezvega mentioned this pull request Jun 2, 2023
7 tasks
@faddat faddat mentioned this pull request Jun 23, 2023
9 tasks
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.

5 participants