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

AVM: Unify inner transaction ID calculation #3927

Merged
merged 24 commits into from
May 5, 2022

Conversation

jasonpaulos
Copy link
Member

Summary

Unifies the inner transaction ID calculation with a new consensus parameter, UnifyInnerTxIDs.

Supersedes #3806

Test Plan

Unit tests added for new and current behavior.

@jasonpaulos jasonpaulos changed the title Unify inner transaction ID calculation AVM: Unify inner transaction ID calculation Apr 27, 2022
@codecov-commenter
Copy link

codecov-commenter commented Apr 27, 2022

Codecov Report

Merging #3927 (b41bfb9) into master (12ded27) will decrease coverage by 0.00%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #3927      +/-   ##
==========================================
- Coverage   50.09%   50.09%   -0.01%     
==========================================
  Files         394      394              
  Lines       68456    68489      +33     
==========================================
+ Hits        34294    34309      +15     
- Misses      30465    30477      +12     
- Partials     3697     3703       +6     
Impacted Files Coverage Δ
config/consensus.go 85.58% <100.00%> (+0.04%) ⬆️
data/transactions/logic/eval.go 90.00% <100.00%> (+0.12%) ⬆️
ledger/blockqueue.go 82.18% <0.00%> (-2.88%) ⬇️
network/wsPeer.go 69.16% <0.00%> (-2.50%) ⬇️
catchup/peerSelector.go 98.95% <0.00%> (-1.05%) ⬇️
data/abi/abi_type.go 87.67% <0.00%> (-0.95%) ⬇️
cmd/tealdbg/debugger.go 72.69% <0.00%> (-0.81%) ⬇️
catchup/service.go 70.12% <0.00%> (+0.49%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 12ded27...b41bfb9. Read the comment docs.

jannotti
jannotti previously approved these changes Apr 28, 2022
Copy link
Contributor

@jannotti jannotti left a comment

Choose a reason for hiding this comment

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

I think this looks good. One thing that should maybe be noted somewhere - I had previously hoped that if this hits mainnet and there were still no examples of any code grabbing an inner txn id, we'd be able to remove this code. But even if that doesn't happen, group ids have been calculated, and appear in blocks using these ids as their input, so we're stuck forever, right?

data/transactions/logic/eval.go Outdated Show resolved Hide resolved
data/transactions/logic/eval.go Show resolved Hide resolved
data/transactions/logic/evalAppTxn_test.go Show resolved Hide resolved
data/transactions/logic/evalAppTxn_test.go Show resolved Hide resolved
@jasonpaulos
Copy link
Member Author

I think this looks good. One thing that should maybe be noted somewhere - I had previously hoped that if this hits mainnet and there were still no examples of any code grabbing an inner txn id, we'd be able to remove this code. But even if that doesn't happen, group ids have been calculated, and appear in blocks using these ids as their input, so we're stuck forever, right?

That's right, the new consensus param affects GroupID calculations, so we unfortunately have to keep at least some of the existing code around. But we could in theory fix the caching issue and different respones from itxn TxID vs an inner's txn TxID as long as these haven't been used.

@jasonpaulos jasonpaulos marked this pull request as ready for review April 28, 2022 17:21
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

4 participants