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

Fix allowlist checks #2819

Merged
merged 23 commits into from Apr 12, 2024
Merged

Fix allowlist checks #2819

merged 23 commits into from Apr 12, 2024

Conversation

grarco
Copy link
Contributor

@grarco grarco commented Mar 5, 2024

Describe your changes

Closes #2770.

Moves the check on the tx allowlist to always enforce fee payment. Also performs this check after the check on the code section commitment to allow replay protection to do some optimizations.

Indicate on which release or other PRs this topic is based on

#2627 (diff: https://github.com/anoma/namada/pull/2819/files/e138cfb7604744a45b8a84fc16a52ae86ec1c73f..c76beadbe7c3f524be175a1dfbf7b2a229039bd8)

Checklist before merging to draft

  • I have added a changelog
  • Git history is in acceptable state

Copy link

codecov bot commented Mar 5, 2024

Codecov Report

Attention: Patch coverage is 68.36903% with 192 lines in your changes are missing coverage. Please review.

Project coverage is 53.56%. Comparing base (2ba001d) to head (c76bead).
Report is 18 commits behind head on main.

Files Patch % Lines
crates/sdk/src/masp.rs 0.00% 95 Missing ⚠️
...s/apps/src/lib/node/ledger/shell/finalize_block.rs 88.15% 18 Missing ⚠️
crates/apps/src/lib/bench_utils.rs 0.00% 16 Missing ⚠️
crates/sdk/src/tx.rs 0.00% 14 Missing ⚠️
...ates/apps/src/lib/node/ledger/shell/block_alloc.rs 89.47% 12 Missing ⚠️
crates/apps/src/lib/client/rpc.rs 0.00% 8 Missing ⚠️
crates/apps/src/lib/node/ledger/shell/mod.rs 36.36% 7 Missing ⚠️
.../apps/src/lib/node/ledger/shell/vote_extensions.rs 66.66% 6 Missing ⚠️
...apps/src/lib/node/ledger/shell/process_proposal.rs 77.27% 5 Missing ⚠️
...tes/apps/src/lib/node/ledger/shell/testing/node.rs 0.00% 3 Missing ⚠️
... and 8 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2819      +/-   ##
==========================================
- Coverage   53.88%   53.56%   -0.32%     
==========================================
  Files         308      307       -1     
  Lines      100154    99228     -926     
==========================================
- Hits        53966    53156     -810     
+ Misses      46188    46072     -116     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

grarco added a commit that referenced this pull request Mar 6, 2024
@grarco grarco marked this pull request as ready for review March 6, 2024 09:32
@grarco grarco requested a review from tzemanovic March 6, 2024 09:33
tzemanovic
tzemanovic previously approved these changes Mar 18, 2024
@tzemanovic
Copy link
Member

I rebased on updated #2627

tzemanovic added a commit that referenced this pull request Mar 18, 2024
* grarco/allowlist-fix:
  Changelog #2819
  Fixes and improves allowlist test
  Improves tx allowlist error. Tx allowlist check in mempool and `process_proposal`
  Moves tx allowlist check to allow replay protection optimizations
  Ensures fee payment even in case of unallowed wasm code
  Updates governance test to cover vp allowlist
@grarco grarco mentioned this pull request Mar 18, 2024
2 tasks
grarco added a commit that referenced this pull request Mar 18, 2024
tzemanovic added a commit that referenced this pull request Mar 19, 2024
* grarco/allowlist-fix:
  Changelog #2819
  Fixes and improves allowlist test
  Improves tx allowlist error. Tx allowlist check in mempool and `process_proposal`
  Moves tx allowlist check to allow replay protection optimizations
  Ensures fee payment even in case of unallowed wasm code
  Updates governance test to cover vp allowlist
grarco added a commit that referenced this pull request Mar 25, 2024
tzemanovic added a commit that referenced this pull request Apr 10, 2024
* origin/grarco/allowlist-fix:
  Changelog #2819
  Fixes and improves allowlist test
  Improves tx allowlist error. Tx allowlist check in mempool and `process_proposal`
  Moves tx allowlist check to allow replay protection optimizations
  Ensures fee payment even in case of unallowed wasm code
  Updates governance test to cover vp allowlist

# Conflicts:
#	wasm_for_tests/tx_fail.wasm
#	wasm_for_tests/tx_memory_limit.wasm
#	wasm_for_tests/tx_mint_tokens.wasm
#	wasm_for_tests/tx_no_op.wasm
#	wasm_for_tests/tx_proposal_code.wasm
#	wasm_for_tests/tx_proposal_masp_reward.wasm
#	wasm_for_tests/tx_read_storage_key.wasm
#	wasm_for_tests/tx_write.wasm
#	wasm_for_tests/tx_write_storage_key.wasm
#	wasm_for_tests/vp_always_false.wasm
#	wasm_for_tests/vp_always_true.wasm
#	wasm_for_tests/vp_eval.wasm
#	wasm_for_tests/vp_memory_limit.wasm
#	wasm_for_tests/vp_read_storage_key.wasm
@tzemanovic tzemanovic merged commit 2c2d796 into main Apr 12, 2024
12 of 19 checks passed
@tzemanovic tzemanovic deleted the grarco/allowlist-fix branch April 12, 2024 10:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allowlists checks
4 participants