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

Pass L1 fee rate through Context and modify Stf ( and its blueprint) #1053

Merged
merged 18 commits into from
Aug 30, 2024

Conversation

eyusufatik
Copy link
Member

@eyusufatik eyusufatik commented Aug 29, 2024

Description

We used to write L1 fee rate to state and read from it in EVM's sov-call function. Now we pass it through the context which is passed to dispatch of sov-calls. Everywhere else can access the L1 fee rate throught HooksSoftConfirmatinInfo.

While working on the PR I realized we made some mistakes on the typings of hooks and functions of the StfBluePrint so I also fixed that.

Linked Issues

Testing

Will fix test compilation errors

@eyusufatik eyusufatik marked this pull request as draft August 29, 2024 09:17
@eyusufatik eyusufatik marked this pull request as ready for review August 29, 2024 12:00
@auto-assign auto-assign bot requested a review from kpp August 29, 2024 12:00
@eyusufatik eyusufatik mentioned this pull request Aug 29, 2024
49 tasks
@eyusufatik eyusufatik force-pushed the esad/modify-context branch from ae60f60 to 2d0176a Compare August 29, 2024 14:52
@eyusufatik eyusufatik added the HOLD-MERGE PR is not draft but should not be merged yet label Aug 29, 2024
@eyusufatik
Copy link
Member Author

#1051 (comment)

@eyusufatik eyusufatik force-pushed the esad/modify-context branch from 70a5400 to ad2ec14 Compare August 30, 2024 07:53
Copy link
Contributor

@rakanalh rakanalh left a comment

Choose a reason for hiding this comment

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

LGTM

@rakanalh
Copy link
Contributor

To resolve RPC tests:

TRYBUILD=overwrite cargo test rpc_tests

@eyusufatik
Copy link
Member Author

To resolve RPC tests:

TRYBUILD=overwrite cargo test rpc_tests

no I really broke them this time :D

fixing one by one

@eyusufatik
Copy link
Member Author

To resolve RPC tests:

TRYBUILD=overwrite cargo test rpc_tests

ok. in the end, I really needed it because I added a line to a file and all the numbers in the expected output was shifted by one

Copy link

codecov bot commented Aug 30, 2024

Codecov Report

Attention: Patch coverage is 85.95506% with 25 lines in your changes missing coverage. Please review.

Project coverage is 77.6%. Comparing base (624250b) to head (49e883b).
Report is 1 commits behind head on nightly.

Files with missing lines Patch % Lines
...dule-system/sov-modules-api/src/default_context.rs 58.3% 15 Missing ⚠️
crates/evm/src/query.rs 72.7% 6 Missing ⚠️
...reign-sdk/full-node/sov-stf-runner/src/mock/mod.rs 0.0% 2 Missing ⚠️
...module-system/sov-modules-stf-blueprint/src/lib.rs 96.8% 1 Missing ⚠️
crates/sovereign-sdk/rollup-interface/src/spec.rs 0.0% 1 Missing ⚠️
Additional details and impacted files
Files with missing lines Coverage Δ
bin/citrea/src/test_rpc.rs 98.9% <100.0%> (+<0.1%) ⬆️
crates/citrea-stf/src/hooks_impl.rs 20.8% <ø> (ø)
crates/evm/src/call.rs 94.7% <100.0%> (-0.2%) ⬇️
crates/evm/src/hooks.rs 66.6% <ø> (ø)
crates/evm/src/lib.rs 100.0% <ø> (ø)
crates/prover/src/runner.rs 83.6% <100.0%> (ø)
crates/sequencer-client/src/lib.rs 100.0% <100.0%> (ø)
crates/sequencer/src/sequencer.rs 90.9% <100.0%> (-0.1%) ⬇️
...rates/soft-confirmation-rule-enforcer/src/hooks.rs 100.0% <ø> (ø)
...ereign-sdk/full-node/db/sov-db/src/schema/types.rs 65.5% <100.0%> (+0.2%) ⬆️
... and 16 more

... and 2 files with indirect coverage changes

@rakanalh rakanalh merged commit 3f60968 into nightly Aug 30, 2024
12 checks passed
@rakanalh rakanalh deleted the esad/modify-context branch August 30, 2024 09:54
jfldde pushed a commit that referenced this pull request Aug 30, 2024
…1053)

* rename SignedSoftConfirmationBatch to SignedSoftConfirmation

* rename UnignedSoftConfirmationBatch to UnsignedSoftConfirmation

* add l2 height to soft confirmations

* add l1 fee rate and active spec to context

* fixes for the last commit

* modify ApplySoftConfirmationHooks and StfBluePrint function so that types make more sense

* make new changes work in the sequencer

* test and lint fixes

* remove l1 fee rate from evm state

* fix ci

* remove comment and unnecessary clone

* fix ci again

* fix ci again

* change function signature of ApplySoftConfirmationHooks

* Inline verify_txs_stateless and decode_txs to reduce .collect()

* fix rpc tests, add issue urls to TODOs

* trybuild=overwrite

---------

Co-authored-by: Roman Proskuryakoff <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
HOLD-MERGE PR is not draft but should not be merged yet
Projects
None yet
4 participants