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

ADR 012: Handlers validation and execution separation #153

Merged
merged 28 commits into from
Oct 6, 2022

Conversation

hu55a1n1
Copy link
Contributor

@hu55a1n1 hu55a1n1 commented Oct 6, 2022

Closes: #10

Originally created as informalsystems/hermes#2631 and moved using ->

git remote add hermes git@github.com:informalsystems/hermes.git
git fetch hermes plafer/adr12-handlers-redesign

# git co -b plafer/adr12-handlers-redesign
git cherry-pick c0494b03bc6ba1195102199126ff376473b966a8^..d3e0c38ea98b8dcae5e895c93617ce91043e1dde

Rendered view


PR author checklist:

  • Added changelog entry, using unclog.
  • Added tests: integration (for Hermes) or unit/mock tests (for modules).
  • Linked to GitHub issue.
  • Updated code comments and documentation (e.g., docs/).
  • Tagged one reviewer who will be the one responsible for shepherding this PR.

Reviewer checklist:

  • Reviewed Files changed in the GitHub PR explorer.
  • Manually tested (in case integration/unit/mock tests are absent).

@hu55a1n1 hu55a1n1 marked this pull request as ready for review October 6, 2022 16:31
@hu55a1n1 hu55a1n1 changed the title Plafer/adr12 handlers redesign ADR 012: Handlers validation and execution separation Oct 6, 2022
docs/architecture/adr-005-handlers-redesign.md Outdated Show resolved Hide resolved
docs/architecture/README.md Outdated Show resolved Hide resolved
Change ADR status from Proposed to Accepted

Co-authored-by: Philippe Laferrière <plafer@protonmail.com>
Signed-off-by: Shoaib Ahmed <sufialhussaini@gmail.com>
@hu55a1n1 hu55a1n1 merged commit 1f75d55 into main Oct 6, 2022
@hu55a1n1 hu55a1n1 deleted the plafer/adr12-handlers-redesign branch October 6, 2022 17:03
plafer added a commit that referenced this pull request Oct 6, 2022
* init adr 12

* Host based API

* Add appendices

* Add section on event logging

* Add .changelog entry

* Fix TypedStore associated type (syntax only)

* Update docs/architecture/adr-012-handlers-redesign.md

Co-authored-by: Philippe Laferrière <plafer@protonmail.com>

* validation vs execution clarifications

* Move ValidationContext and ExecutionContext methods to appendix

* Context clarification

* Rework Host-based API section

* ValidationContext and ExecutionContext clarification

* Move Event logging section + misc

* typo

* Remove statement. Was mentioned earlier already.

* IbcStore blanket implementation

* IbcValueForPath rework

* Remove IbcSerde from main ADR

* TypedStore -> SubStore

* diagram

* Update docs/architecture/adr-012-handlers-redesign.md

Co-authored-by: Sean Chen <seanchen11235@gmail.com>

* Update docs/architecture/adr-012-handlers-redesign.md

Co-authored-by: Sean Chen <seanchen11235@gmail.com>

* Update docs/architecture/adr-012-handlers-redesign.md

Co-authored-by: Sean Chen <seanchen11235@gmail.com>

* add context for why the validation/execution split is necessary

* add trait bounds

* Rename ADR012 -> ADR005

* Apply suggestions from code review

Change ADR status from Proposed to Accepted

Co-authored-by: Philippe Laferrière <plafer@protonmail.com>
Signed-off-by: Shoaib Ahmed <sufialhussaini@gmail.com>

Signed-off-by: Shoaib Ahmed <sufialhussaini@gmail.com>
Co-authored-by: Philippe Laferriere <plafer@protonmail.com>
Co-authored-by: Sean Chen <seanchen11235@gmail.com>
plafer added a commit that referenced this pull request Oct 11, 2022
* client_id IbcEvent refactor

* Remove NewBlock and ChainError events

* Refactor update_client event

* clippy

* Improve CreateClient event type

* Improve UpdateClient event type

* refactor ClientMisbehaviour event

* UpgradeClient event refactor

* Remove Client Attributes

* Add EventMessage

* client handlers emit ibcevent message

* Copy relevant ADRs from hermes repository (#147)

* Add ADRs

* Update docs/architecture/adr-002-error.md

Co-authored-by: Shoaib Ahmed <sufialhussaini@gmail.com>
Signed-off-by: Philippe Laferrière <plafer@protonmail.com>

* Update docs/architecture/adr-003-ics20-implementation.md

Co-authored-by: Shoaib Ahmed <sufialhussaini@gmail.com>
Signed-off-by: Philippe Laferrière <plafer@protonmail.com>

* Update docs/architecture/adr-004-light-client-crates-extraction.md

Co-authored-by: Shoaib Ahmed <sufialhussaini@gmail.com>
Signed-off-by: Philippe Laferrière <plafer@protonmail.com>

* Update docs/architecture/adr-001-handler-implementation.md

Co-authored-by: Shoaib Ahmed <sufialhussaini@gmail.com>
Signed-off-by: Philippe Laferrière <plafer@protonmail.com>

* Update docs/architecture/adr-004-light-client-crates-extraction.md

Co-authored-by: Shoaib Ahmed <sufialhussaini@gmail.com>
Signed-off-by: Philippe Laferrière <plafer@protonmail.com>

Signed-off-by: Philippe Laferrière <plafer@protonmail.com>
Co-authored-by: Shoaib Ahmed <sufialhussaini@gmail.com>

* Fix CI (#151)

* std crate enabled for tests

* clippy no-default-features: still use clock feature

* patch ibc-proto to not use latest

* fix ibc-proto patch properly

* Allow deprecated (for crossing hellos fields)

* Remove ibc-proto rev for no-std

* fix no-std ibc-proto patch

* Remove comment

* fmt

* Fix tests

Events will be tested in their own test rather than spread across
all tests.

* ADR 012: Handlers validation and execution separation (#153)

* init adr 12

* Host based API

* Add appendices

* Add section on event logging

* Add .changelog entry

* Fix TypedStore associated type (syntax only)

* Update docs/architecture/adr-012-handlers-redesign.md

Co-authored-by: Philippe Laferrière <plafer@protonmail.com>

* validation vs execution clarifications

* Move ValidationContext and ExecutionContext methods to appendix

* Context clarification

* Rework Host-based API section

* ValidationContext and ExecutionContext clarification

* Move Event logging section + misc

* typo

* Remove statement. Was mentioned earlier already.

* IbcStore blanket implementation

* IbcValueForPath rework

* Remove IbcSerde from main ADR

* TypedStore -> SubStore

* diagram

* Update docs/architecture/adr-012-handlers-redesign.md

Co-authored-by: Sean Chen <seanchen11235@gmail.com>

* Update docs/architecture/adr-012-handlers-redesign.md

Co-authored-by: Sean Chen <seanchen11235@gmail.com>

* Update docs/architecture/adr-012-handlers-redesign.md

Co-authored-by: Sean Chen <seanchen11235@gmail.com>

* add context for why the validation/execution split is necessary

* add trait bounds

* Rename ADR012 -> ADR005

* Apply suggestions from code review

Change ADR status from Proposed to Accepted

Co-authored-by: Philippe Laferrière <plafer@protonmail.com>
Signed-off-by: Shoaib Ahmed <sufialhussaini@gmail.com>

Signed-off-by: Shoaib Ahmed <sufialhussaini@gmail.com>
Co-authored-by: Philippe Laferriere <plafer@protonmail.com>
Co-authored-by: Sean Chen <seanchen11235@gmail.com>

* Setup unclog based changelog (#152)

* Add filtered changelog with ibc relevant entries

* Init unclog

* Add unreleased changelog entries

* clippy

* Remove "message" ibc event

* update_client event test

* Remove unused function

* upgrade client event

* changelog

* Revert "Remove unused function"

This reverts commit 66459cc.

* Remove EMPTY event

* Use derive_more::From

* Remove Display from IbcEvent

* changelog

Signed-off-by: Philippe Laferrière <plafer@protonmail.com>
Signed-off-by: Shoaib Ahmed <sufialhussaini@gmail.com>
Co-authored-by: Shoaib Ahmed <sufialhussaini@gmail.com>
Co-authored-by: Sean Chen <seanchen11235@gmail.com>
Farhad-Shabani pushed a commit that referenced this pull request Sep 9, 2024
* init adr 12

* Host based API

* Add appendices

* Add section on event logging

* Add .changelog entry

* Fix TypedStore associated type (syntax only)

* Update docs/architecture/adr-012-handlers-redesign.md

Co-authored-by: Philippe Laferrière <plafer@protonmail.com>

* validation vs execution clarifications

* Move ValidationContext and ExecutionContext methods to appendix

* Context clarification

* Rework Host-based API section

* ValidationContext and ExecutionContext clarification

* Move Event logging section + misc

* typo

* Remove statement. Was mentioned earlier already.

* IbcStore blanket implementation

* IbcValueForPath rework

* Remove IbcSerde from main ADR

* TypedStore -> SubStore

* diagram

* Update docs/architecture/adr-012-handlers-redesign.md

Co-authored-by: Sean Chen <seanchen11235@gmail.com>

* Update docs/architecture/adr-012-handlers-redesign.md

Co-authored-by: Sean Chen <seanchen11235@gmail.com>

* Update docs/architecture/adr-012-handlers-redesign.md

Co-authored-by: Sean Chen <seanchen11235@gmail.com>

* add context for why the validation/execution split is necessary

* add trait bounds

* Rename ADR012 -> ADR005

* Apply suggestions from code review

Change ADR status from Proposed to Accepted

Co-authored-by: Philippe Laferrière <plafer@protonmail.com>
Signed-off-by: Shoaib Ahmed <sufialhussaini@gmail.com>

Signed-off-by: Shoaib Ahmed <sufialhussaini@gmail.com>
Co-authored-by: Philippe Laferriere <plafer@protonmail.com>
Co-authored-by: Sean Chen <seanchen11235@gmail.com>
Farhad-Shabani pushed a commit that referenced this pull request Sep 9, 2024
* client_id IbcEvent refactor

* Remove NewBlock and ChainError events

* Refactor update_client event

* clippy

* Improve CreateClient event type

* Improve UpdateClient event type

* refactor ClientMisbehaviour event

* UpgradeClient event refactor

* Remove Client Attributes

* Add EventMessage

* client handlers emit ibcevent message

* Copy relevant ADRs from hermes repository (#147)

* Add ADRs

* Update docs/architecture/adr-002-error.md

Co-authored-by: Shoaib Ahmed <sufialhussaini@gmail.com>
Signed-off-by: Philippe Laferrière <plafer@protonmail.com>

* Update docs/architecture/adr-003-ics20-implementation.md

Co-authored-by: Shoaib Ahmed <sufialhussaini@gmail.com>
Signed-off-by: Philippe Laferrière <plafer@protonmail.com>

* Update docs/architecture/adr-004-light-client-crates-extraction.md

Co-authored-by: Shoaib Ahmed <sufialhussaini@gmail.com>
Signed-off-by: Philippe Laferrière <plafer@protonmail.com>

* Update docs/architecture/adr-001-handler-implementation.md

Co-authored-by: Shoaib Ahmed <sufialhussaini@gmail.com>
Signed-off-by: Philippe Laferrière <plafer@protonmail.com>

* Update docs/architecture/adr-004-light-client-crates-extraction.md

Co-authored-by: Shoaib Ahmed <sufialhussaini@gmail.com>
Signed-off-by: Philippe Laferrière <plafer@protonmail.com>

Signed-off-by: Philippe Laferrière <plafer@protonmail.com>
Co-authored-by: Shoaib Ahmed <sufialhussaini@gmail.com>

* Fix CI (#151)

* std crate enabled for tests

* clippy no-default-features: still use clock feature

* patch ibc-proto to not use latest

* fix ibc-proto patch properly

* Allow deprecated (for crossing hellos fields)

* Remove ibc-proto rev for no-std

* fix no-std ibc-proto patch

* Remove comment

* fmt

* Fix tests

Events will be tested in their own test rather than spread across
all tests.

* ADR 012: Handlers validation and execution separation (#153)

* init adr 12

* Host based API

* Add appendices

* Add section on event logging

* Add .changelog entry

* Fix TypedStore associated type (syntax only)

* Update docs/architecture/adr-012-handlers-redesign.md

Co-authored-by: Philippe Laferrière <plafer@protonmail.com>

* validation vs execution clarifications

* Move ValidationContext and ExecutionContext methods to appendix

* Context clarification

* Rework Host-based API section

* ValidationContext and ExecutionContext clarification

* Move Event logging section + misc

* typo

* Remove statement. Was mentioned earlier already.

* IbcStore blanket implementation

* IbcValueForPath rework

* Remove IbcSerde from main ADR

* TypedStore -> SubStore

* diagram

* Update docs/architecture/adr-012-handlers-redesign.md

Co-authored-by: Sean Chen <seanchen11235@gmail.com>

* Update docs/architecture/adr-012-handlers-redesign.md

Co-authored-by: Sean Chen <seanchen11235@gmail.com>

* Update docs/architecture/adr-012-handlers-redesign.md

Co-authored-by: Sean Chen <seanchen11235@gmail.com>

* add context for why the validation/execution split is necessary

* add trait bounds

* Rename ADR012 -> ADR005

* Apply suggestions from code review

Change ADR status from Proposed to Accepted

Co-authored-by: Philippe Laferrière <plafer@protonmail.com>
Signed-off-by: Shoaib Ahmed <sufialhussaini@gmail.com>

Signed-off-by: Shoaib Ahmed <sufialhussaini@gmail.com>
Co-authored-by: Philippe Laferriere <plafer@protonmail.com>
Co-authored-by: Sean Chen <seanchen11235@gmail.com>

* Setup unclog based changelog (#152)

* Add filtered changelog with ibc relevant entries

* Init unclog

* Add unreleased changelog entries

* clippy

* Remove "message" ibc event

* update_client event test

* Remove unused function

* upgrade client event

* changelog

* Revert "Remove unused function"

This reverts commit 66459cc.

* Remove EMPTY event

* Use derive_more::From

* Remove Display from IbcEvent

* changelog

Signed-off-by: Philippe Laferrière <plafer@protonmail.com>
Signed-off-by: Shoaib Ahmed <sufialhussaini@gmail.com>
Co-authored-by: Shoaib Ahmed <sufialhussaini@gmail.com>
Co-authored-by: Sean Chen <seanchen11235@gmail.com>
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.

ADR for redesigning the modules' API
2 participants