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: Provide access to some more block header values #6107

Merged
merged 4 commits into from
Sep 3, 2024

Conversation

jannotti
Copy link
Contributor

@jannotti jannotti commented Aug 21, 2024

Because of block incentives, there are good reasons to expose the FeeSink and the ProposerPayout from the block header to AVM using the block opcode. While doing that, we can consider a few more things that might be useful.

Currently this PR exposes these.

// BlkBranch is the hash of the previous block
BlkBranch

// BlkFeeSink is the fee sink for the given round
BlkFeeSink

// BlkProtocol is the ConsensusVersion of the block.
BlkProtocol

// BlkTxnCounter is the number of the next transaction after the block
BlkTxnCounter

// BlkProposerPayout is the actual amount moved from feesink to proposer
BlkProposerPayout

@jannotti jannotti self-assigned this Aug 21, 2024
Copy link

codecov bot commented Aug 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 56.27%. Comparing base (4990077) to head (4fdcff6).
Report is 10 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6107      +/-   ##
==========================================
- Coverage   56.27%   56.27%   -0.01%     
==========================================
  Files         490      490              
  Lines       69710    69720      +10     
==========================================
+ Hits        39230    39234       +4     
- Misses      27817    27819       +2     
- Partials     2663     2667       +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

algorandskiy
algorandskiy previously approved these changes Aug 23, 2024
Copy link
Contributor

@jasonpaulos jasonpaulos left a comment

Choose a reason for hiding this comment

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

Looks good but I did want to call attention to the change in values for the other v11 block fields

data/transactions/logic/fields.go Show resolved Hide resolved
data/transactions/logic/fields.go Outdated Show resolved Hide resolved
@jannotti jannotti merged commit 43cb563 into algorand:master Sep 3, 2024
18 checks passed
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.

4 participants