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: reject BlobTxs larger than 2 MiB (backport #4084) #4109

Merged
merged 1 commit into from
Dec 12, 2024

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Dec 11, 2024

Overview

Directly checks transaction sizes even before they're decoded and removes them if they exceed configured threshold.

We should add MaxTxSize constraint in ProcessProposal directly and consider removing the AnteHandler in v4.
Issue tracking this work: #4087

Testing

  • Check tx test asserts with logs that the expected error gets hit
  • Getting logs from prepare proposal was more challenging so i'm inserting a screenshot of application logs when the tests are run.
Screenshot 2024-12-06 at 12 27 03 Screenshot 2024-12-06 at 12 27 20

Proposal for improving robustness of our test suites

  • Open an issue to assert all logs in our integration tests.

This is an automatic backport of pull request #4084 done by [Mergify](https://mergify.com).

@mergify mergify bot added the conflicts label Dec 11, 2024
@mergify mergify bot requested review from liamsi and a team as code owners December 11, 2024 17:39
@mergify mergify bot requested a review from rootulp December 11, 2024 17:39
Copy link
Contributor Author

mergify bot commented Dec 11, 2024

Cherry-pick of 3751aac has failed:

On branch mergify/bp/v3.x/pr-4084
Your branch is up to date with 'origin/v3.x'.

You are currently cherry-picking commit 3751aacd.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	new file:   app/errors/errors.go
	new file:   pkg/appconsts/upgrade_heights.go
	new file:   scripts/single-node-upgrades.sh

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both added:      .github/CODEOWNERS
	both added:      .github/auto_request_review.yml
	both added:      .github/mergify.yml
	both added:      .github/workflows/lint.yml
	both added:      .github/workflows/pr-review-requester.yml
	both added:      .github/workflows/test.yml
	both added:      Makefile
	both added:      app/app.go
	both added:      app/benchmarks/README.md
	both added:      app/benchmarks/results.md
	both added:      app/check_tx.go
	both added:      app/square_size.go
	both added:      app/test/big_blob_test.go
	both added:      app/test/check_tx_test.go
	both added:      app/test/consistent_apphash_test.go
	both added:      app/test/prepare_proposal_test.go
	both added:      app/test/process_proposal_test.go
	both added:      app/test/upgrade_test.go
	both added:      cmd/celestia-appd/cmd/start.go
	both added:      docs/architecture/adr-011-optimistic-blob-size-independent-inclusion-proofs-and-pfb-fraud-proofs.md
	both added:      docs/architecture/adr-015-namespace-id-size.md
	both added:      docs/architecture/adr-021-restricted-block-size.md
	both added:      docs/maintainers/prebuilt-binaries.md
	both added:      docs/maintainers/release-guide.md
	both added:      docs/release-notes/release-notes.md
	both added:      go.mod
	both added:      go.sum
	both added:      pkg/appconsts/chain_ids.go
	both added:      pkg/appconsts/overrides.go
	both added:      pkg/appconsts/v1/app_consts.go
	both added:      pkg/appconsts/v2/app_consts.go
	both added:      pkg/appconsts/v3/app_consts.go
	both added:      pkg/appconsts/versioned_consts.go
	both added:      pkg/appconsts/versioned_consts_test.go
	both added:      scripts/single-node.sh
	both added:      specs/src/cat_pool.md
	both added:      specs/src/data_square_layout.md
	both added:      specs/src/parameters_v1.md
	both added:      specs/src/parameters_v2.md
	both added:      specs/src/parameters_v3.md
	both added:      test/e2e/benchmark/benchmark.go
	both added:      test/e2e/benchmark/throughput.go
	both added:      test/e2e/major_upgrade_v2.go
	both added:      test/e2e/major_upgrade_v3.go
	both added:      test/e2e/minor_version_compatibility.go
	both added:      test/e2e/readme.md
	both added:      test/e2e/simple.go
	both added:      test/e2e/testnet/node.go
	both added:      test/e2e/testnet/setup.go
	both added:      test/e2e/testnet/testnet.go
	both added:      test/e2e/testnet/txsimNode.go
	both added:      test/e2e/testnet/util.go
	both added:      test/interchain/go.mod
	both added:      test/interchain/go.sum
	both added:      test/util/blobfactory/payforblob_factory.go
	both added:      test/util/blobfactory/test_util.go
	both added:      test/util/testnode/comet_node_test.go
	both added:      test/util/testnode/config.go
	both added:      x/blob/ante/blob_share_decorator.go
	both added:      x/blob/ante/max_total_blob_size_ante.go
	both added:      x/tokenfilter/README.md

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

@mergify mergify bot requested a review from rach-id December 11, 2024 17:39
@github-actions github-actions bot added the bot item was created by a bot label Dec 11, 2024
Copy link

PR Preview Action v1.4.8
🚀 Deployed preview to https://celestiaorg.github.io/celestia-app/pr-preview/pr-4109/
on branch gh-pages at 2024-12-11 17:42 UTC

@ninabarbakadze ninabarbakadze force-pushed the mergify/bp/v3.x/pr-4084 branch from b5ddfd4 to 2135a84 Compare December 11, 2024 17:59
@cmwaters cmwaters merged commit c456d75 into v3.x Dec 12, 2024
28 of 29 checks passed
@cmwaters cmwaters deleted the mergify/bp/v3.x/pr-4084 branch December 12, 2024 09:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bot item was created by a bot
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants