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

Charge gas for custom event attributes and messages #539

Merged
merged 5 commits into from
Jun 25, 2021
Merged

Conversation

alpe
Copy link
Contributor

@alpe alpe commented Jun 14, 2021

Features

  • Introduces GasRegister and extension point
  • Moved event emitting and charging gas into response handler method

@alpe alpe requested a review from ethanfrey June 14, 2021 09:43
@alpe alpe marked this pull request as draft June 14, 2021 10:18
@alpe alpe self-assigned this Jun 14, 2021
@alpe alpe removed the request for review from ethanfrey June 14, 2021 10:18
Copy link
Member

@ethanfrey ethanfrey left a comment

Choose a reason for hiding this comment

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

Nice start.
Added some comments.

What do you think of a price per attribute + price per byte (like iavl storage access)?

@alpe alpe added the extension point Makes the system easier to extend or test label Jun 18, 2021
@alpe alpe changed the title Charge gas for custom event attributes Charge gas for custom event attributes and messages Jun 18, 2021
@CosmWasm CosmWasm deleted a comment from codecov bot Jun 23, 2021
@codecov
Copy link

codecov bot commented Jun 23, 2021

Codecov Report

Merging #539 (f9521eb) into master (6a6d6c9) will increase coverage by 0.15%.
The diff coverage is 94.57%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #539      +/-   ##
==========================================
+ Coverage   58.51%   58.67%   +0.15%     
==========================================
  Files          43       44       +1     
  Lines        4532     4554      +22     
==========================================
+ Hits         2652     2672      +20     
- Misses       1662     1663       +1     
- Partials      218      219       +1     
Impacted Files Coverage Δ
x/wasm/keeper/msg_server.go 0.00% <0.00%> (ø)
x/wasm/types/types.go 51.35% <ø> (ø)
x/wasm/keeper/gas_register.go 96.00% <96.00%> (ø)
x/wasm/keeper/keeper.go 84.29% <100.00%> (-0.21%) ⬇️
x/wasm/keeper/options.go 72.50% <100.00%> (-3.59%) ⬇️
x/wasm/keeper/proposal_handler.go 68.42% <100.00%> (ø)
x/wasm/keeper/query_plugins.go 77.01% <100.00%> (ø)
x/wasm/keeper/relay.go 100.00% <100.00%> (ø)

@alpe alpe marked this pull request as ready for review June 23, 2021 12:22
@alpe alpe requested a review from ethanfrey June 23, 2021 12:22
Copy link
Member

@ethanfrey ethanfrey left a comment

Choose a reason for hiding this comment

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

Good stuff. I would just like Simon to review the proper max value

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
extension point Makes the system easier to extend or test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Let contracts not abuse the event system Limit init/migrate/execute payload message size
3 participants