Skip to content

Only store block harness inputs at the parent slot - #15796

Merged
roryharr merged 1 commit into
anza-xyz:masterfrom
roryharr:remove_duplicate_store
Oct 6, 2026
Merged

roryharr merged 1 commit into
anza-xyz:masterfrom
roryharr:remove_duplicate_store

Conversation

@roryharr

@roryharr roryharr commented Oct 5, 2026 •

Copy link
Copy Markdown

Problem

#13910 Stores the starting state of the test at both the parent_slot and the current_slot. This seems incorrect: The purpose of the test should be to build the current_slot on top of the parent_slot. Since this also inserts the parent_slots accounts into the current_slot, the parent_slot is unused.

Note: This helps simplify #15749

Summary of Changes

  • Since the purpose of the test is to build current_slot on top of parent_slot, remove the additional stores of parents_slots accounts into current_slot

Testing

  • Conformance testing passes with this change.

Fixes #

@roryharr
roryharr marked this pull request as ready for review October 5, 2026 21:53
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.7%. Comparing base (e903501) to head (1c1b8f7).
⚠️ Report is 51 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff            @@
##           master   #15796    +/-   ##
========================================
  Coverage    82.6%    82.7%            
========================================
  Files         935      935            
  Lines      373761   373756     -5     
========================================
+ Hits       309048   309192   +144     
+ Misses      64713    64564   -149     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@buffalojoec buffalojoec left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Seems okay to me. Any objections @mjain-jump?

@brooksprumo brooksprumo left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Works for me. I'll defer to the others for correctness of the test.

@mjain-jump mjain-jump left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This breaks the block test-vectors. I would investigate why it's breaking - this extra store was intentional when I first wrote this harness.

@roryharr

roryharr commented Oct 6, 2026

Copy link
Copy Markdown
Author

This breaks the block test-vectors. I would investigate why it's breaking - this extra store was intentional when I first wrote this harness.

Will take a look at the test and failures.

@roryharr

roryharr commented Oct 6, 2026 •

Copy link
Copy Markdown
Author

This breaks the block test-vectors. I would investigate why it's breaking - this extra store was intentional when I first wrote this harness.

Will take a look at the test and failures.

I found the issue. It's the incinerator. The incinerator account gets a set of lamports to burn. This runs during freeze, and reduces total capitalization. However, the balance is only burnt if the incinerator account was modified in the slot being frozen.

When the parent slot has a non zero balance in the incinerator, that value is also written to the current slot by the lines that were removed. When the current slot is frozen, it burns the lamports again, leading to the same lamports getting burned twice.

This seems more like a fixture bug?

@roryharr

roryharr commented Oct 6, 2026 •

Copy link
Copy Markdown
Author

This breaks the block test-vectors. I would investigate why it's breaking - this extra store was intentional when I first wrote this harness.

Will take a look at the test and failures.

I found the issue. It's the incinerator. The incinerator account gets a set of lamports to burn. This runs during freeze, and reduces total capitalization. However, the balance is only burnt if the incinerator account was modified in the slot being frozen.

When the parent slot has a non zero balance in the incinerator, that value is also written to the current slot by the lines that were removed. When the current slot is frozen, it burns the lamports again, leading to the same lamports getting burned twice.

This seems more like a fixture bug?

This doesn't end up causing a consensus bug, as the incinerator is zero at the end of slot. Seems like the fixture is generating input that diverges between agave and firedancer. Both validators zero out the incinerator at the end of every slot, but agave ignores previous versions entirely, while firedancer doesn't.

@roryharr
roryharr requested a review from mjain-jump October 6, 2026 17:32
@mjain-jump

Copy link
Copy Markdown

This breaks the block test-vectors. I would investigate why it's breaking - this extra store was intentional when I first wrote this harness.

Will take a look at the test and failures.

I found the issue. It's the incinerator. The incinerator account gets a set of lamports to burn. This runs during freeze, and reduces total capitalization. However, the balance is only burnt if the incinerator account was modified in the slot being frozen.
When the parent slot has a non zero balance in the incinerator, that value is also written to the current slot by the lines that were removed. When the current slot is frozen, it burns the lamports again, leading to the same lamports getting burned twice.
This seems more like a fixture bug?

This doesn't end up causing a consensus bug, as the incinerator is zero at the end of slot. Seems like the fixture is generating input that diverges between agave and firedancer. Both validators zero out the incinerator at the end of every slot, but agave ignores previous versions entirely, while firedancer doesn't.

Yea I think you're right. I think the fixtures need to be rewritten to forbid the incinerator account from existing/having any lamports before a block is executed? Would you agree this is the correct thing to do here?

@roryharr

roryharr commented Oct 6, 2026

Copy link
Copy Markdown
Author

This breaks the block test-vectors. I would investigate why it's breaking - this extra store was intentional when I first wrote this harness.

Will take a look at the test and failures.

I found the issue. It's the incinerator. The incinerator account gets a set of lamports to burn. This runs during freeze, and reduces total capitalization. However, the balance is only burnt if the incinerator account was modified in the slot being frozen.
When the parent slot has a non zero balance in the incinerator, that value is also written to the current slot by the lines that were removed. When the current slot is frozen, it burns the lamports again, leading to the same lamports getting burned twice.
This seems more like a fixture bug?

This doesn't end up causing a consensus bug, as the incinerator is zero at the end of slot. Seems like the fixture is generating input that diverges between agave and firedancer. Both validators zero out the incinerator at the end of every slot, but agave ignores previous versions entirely, while firedancer doesn't.

Yea I think you're right. I think the fixtures need to be rewritten to forbid the incinerator account from existing/having any lamports before a block is executed? Would you agree this is the correct thing to do here?

Yeah, I think so. Is this feasible or is that going to take a while? Effects ~300 fixtures.

The other option is changing either side to have identical behaviour: Either agave removes the check that only looks at the value from the current slot, or firedancer adds one in. But i would prefer not to change consensus code to fix the fixtures.

@mjain-jump

Copy link
Copy Markdown

This breaks the block test-vectors. I would investigate why it's breaking - this extra store was intentional when I first wrote this harness.

Will take a look at the test and failures.

I found the issue. It's the incinerator. The incinerator account gets a set of lamports to burn. This runs during freeze, and reduces total capitalization. However, the balance is only burnt if the incinerator account was modified in the slot being frozen.
When the parent slot has a non zero balance in the incinerator, that value is also written to the current slot by the lines that were removed. When the current slot is frozen, it burns the lamports again, leading to the same lamports getting burned twice.
This seems more like a fixture bug?

This doesn't end up causing a consensus bug, as the incinerator is zero at the end of slot. Seems like the fixture is generating input that diverges between agave and firedancer. Both validators zero out the incinerator at the end of every slot, but agave ignores previous versions entirely, while firedancer doesn't.

Yea I think you're right. I think the fixtures need to be rewritten to forbid the incinerator account from existing/having any lamports before a block is executed? Would you agree this is the correct thing to do here?

Yeah, I think so. Is this feasible or is that going to take a while? Effects ~300 fixtures.

The other option is changing either side to have identical behaviour: Either agave removes the check that only looks at the value from the current slot, or firedancer adds one in. But i would prefer not to change consensus code to fix the fixtures.

I'm fixing the fixtures right now. Should be done within the next 15 mins!

@mjain-jump

Copy link
Copy Markdown

All good @roryharr feel free to merge. Thanks for doing this !

@roryharr
roryharr added this pull request to the merge queue Oct 6, 2026
@roryharr

roryharr commented Oct 6, 2026

Copy link
Copy Markdown
Author

All good @roryharr feel free to merge. Thanks for doing this !

Awesome, thanks!

Merged via the queue into anza-xyz:master with commit 53af735 Oct 6, 2026
47 of 48 checks passed
@roryharr
roryharr deleted the remove_duplicate_store branch October 6, 2026 20:30
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.

5 participants