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

Feat/bill-tx-fee-before-processing #3233

Merged
merged 16 commits into from
Aug 4, 2022
Merged

Conversation

jcnelson
Copy link
Member

@jcnelson jcnelson commented Aug 1, 2022

This addresses #3213. Transactions in 2.1 will pay their fees before being processed.

Nearly all of this PR is just making it so that all transaction unit tests will run against burn DB instances from each epoch. The new stuff is in ::process_transaction() and the tests process_fee_gating() and process_fee_gating_sponsored()

…coverage to verify that this only happens in 2.1. Also, test all transaction unit tests on each epoch for good measure.
@codecov
Copy link

codecov bot commented Aug 1, 2022

Codecov Report

Merging #3233 (14ea30a) into next (b684ad0) will increase coverage by 0.70%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             next    #3233      +/-   ##
==========================================
+ Coverage   83.90%   84.61%   +0.70%     
==========================================
  Files         276      276              
  Lines      221014   221917     +903     
==========================================
+ Hits       185450   187772    +2322     
+ Misses      35564    34145    -1419     
Impacted Files Coverage Δ
src/chainstate/stacks/db/transactions.rs 98.12% <ø> (+0.05%) ⬆️
src/chainstate/stacks/events.rs 66.66% <ø> (ø)
src/chainstate/stacks/db/blocks.rs 89.56% <100.00%> (+0.01%) ⬆️
clarity/src/vm/database/sqlite.rs 78.47% <0.00%> (-1.39%) ⬇️
src/chainstate/stacks/index/file.rs 90.12% <0.00%> (-1.28%) ⬇️
src/net/dns.rs 90.25% <0.00%> (-0.86%) ⬇️
src/burnchains/bitcoin/blocks.rs 92.37% <0.00%> (-0.41%) ⬇️
clarity/src/vm/database/structures.rs 88.27% <0.00%> (-0.40%) ⬇️
src/burnchains/burnchain.rs 89.65% <0.00%> (-0.30%) ⬇️
src/chainstate/stacks/index/cache.rs 97.32% <0.00%> (-0.17%) ⬇️
... and 40 more

📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more

Copy link
Member

@kantai kantai left a comment

Choose a reason for hiding this comment

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

LGTM!

…t caught at runtime (but as a String, since they don't serialize)
…the transaction will not invalidate the block. Add testing for this gate.
…dies in tests; test `contract-call?` within a smart contract for runtime checkerrors
… new fee-handling logic causes this test to pass
…e changes materialize when a transaction fails due to an analysis error found at runtime
@jcnelson
Copy link
Member Author

jcnelson commented Aug 3, 2022

Going to wait until #3234 is approved, so I can merge it into this PR, and then merge both into next.

@jcnelson jcnelson merged commit 2f866f0 into next Aug 4, 2022
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.

None yet

3 participants