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

Add gas param for data bytes in orders #869

Merged
merged 1 commit into from
Jun 12, 2023
Merged

Add gas param for data bytes in orders #869

merged 1 commit into from
Jun 12, 2023

Conversation

codchen
Copy link
Collaborator

@codchen codchen commented Jun 12, 2023

Describe your changes and provide context

We are not charging gas based on data bytes contained in order payload which may open up a ddos attack vector (https://linear.app/seilabs/issue/SEI-4441/7ba-02-or-potential-dos-attack-and-loss-of-contract-rent-balance-via)

This PR adds a param and ante logic to require fee per byte in order data.

Testing performed to validate your change

unit test

@codchen codchen requested a review from LCyson June 12, 2023 03:03
@codecov
Copy link

codecov bot commented Jun 12, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.24 🎉

Comparison is base (530877c) 63.30% compared to head (4c8bc37) 63.54%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #869      +/-   ##
==========================================
+ Coverage   63.30%   63.54%   +0.24%     
==========================================
  Files         249      250       +1     
  Lines       15499    15510      +11     
==========================================
+ Hits         9811     9856      +45     
+ Misses       5225     5187      -38     
- Partials      463      467       +4     
Impacted Files Coverage Δ
x/dex/ante.go 67.52% <100.00%> (+0.85%) ⬆️
x/dex/migrations/v15_to_v16.go 100.00% <100.00%> (ø)
x/dex/types/params.go 79.31% <100.00%> (+0.73%) ⬆️

... and 3 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@LCyson LCyson merged commit 8863dbf into master Jun 12, 2023
@LCyson LCyson deleted the tony-chen-dex-data branch June 12, 2023 21:14
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.

2 participants