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

Hooks simplification #361

Merged
merged 23 commits into from
May 30, 2023
Merged

Hooks simplification #361

merged 23 commits into from
May 30, 2023

Conversation

bkolad
Copy link
Member

@bkolad bkolad commented May 30, 2023

Description

This PR introduces the following changes:

  1. The TxHooks has been split into two separate hooks: ApplyBlobTxHooks and ApplyBlobSequencerHooks. These hooks now belong to the sov-modules-api and are implemented in sov-accounts and sov-sequencer-registry. Consequently, the DempAppHook structure has been removed.
  2. The TxVerifier has been removed, and the stateless verification has been implemented in sov-default-stf. This verification only performs a signature check, and it makes sense to share it.

These two changes have simplified the AppTemplate since it no longer requires the aforementioned structures as parameters.

  1. The AppTemplate requires that Runtime implements ApplyBlobTxHooks and ApplyBlobSequencerHooks (the implementation is trivial).

Now ApplyBlobTxHooks implementation for Runtime has a well-defined structure and could be implemented as a macro, but it should be done in a separate PR.

Linked Issues

Testing

All relevant tests are updated.

Docs

Relevant readmes updated (the biggest change in demo-stf)

@bkolad bkolad changed the title Blaze/hooks macro Hooks simplification May 30, 2023
examples/demo-stf/README.md Outdated Show resolved Hide resolved
examples/demo-stf/README.md Outdated Show resolved Hide resolved
examples/demo-stf/README.md Outdated Show resolved Hide resolved
module-system/sov-default-stf/README.md Outdated Show resolved Hide resolved
@bkolad bkolad merged commit 7b314c0 into main May 30, 2023
@bkolad bkolad deleted the blaze/hooks_macro branch May 30, 2023 20:27
@preston-evans98 preston-evans98 mentioned this pull request Jun 28, 2023
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.

Create Default Tx Hooks and Default Tx Verifier
2 participants