Skip to content

Feature - Stricter ABI and runtime constraints#7113

Merged
Lichtso merged 5 commits intoanza-xyz:masterfrom
Lichtso:feature/stricter_abi_and_runtime_constraints
Aug 5, 2025
Merged

Feature - Stricter ABI and runtime constraints#7113
Lichtso merged 5 commits intoanza-xyz:masterfrom
Lichtso:feature/stricter_abi_and_runtime_constraints

Conversation

@Lichtso
Copy link
Copy Markdown

@Lichtso Lichtso commented Jul 23, 2025

Problem

It has been tricky to fuzz account data direct mapping because it comes with a lot of observable behavior changes which lead to expected divergence. However, telling expected and unexpected divergence apart has been problematic, especially as some unexpected divergence was declared to be expected by mistake.

Summary of Changes

All the observable behavior changes as specified in SIMD-0219 are moved into a feature gate called stricter_abi_and_runtime_constraints. The serialization vs mapping is toggled by a separate flag called account_data_direct_mapping. Meaning there are now three code paths:

  • stricter_abi_and_runtime_constraints OFF, (account_data_direct_mapping is ignored) in which only the old checks apply, account data is de/serialized and compared
  • stricter_abi_and_runtime_constraints ON, but account_data_direct_mapping OFF in which both old and new checks apply, account data is de/serialized
  • stricter_abi_and_runtime_constraints ON, and account_data_direct_mapping ON in which only the new checks apply, account data is mapped

Feature Gate Issue: #16

@mergify
Copy link
Copy Markdown

mergify Bot commented Jul 23, 2025

The Firedancer team maintains a line-for-line reimplementation of the
native programs, and until native programs are moved to BPF, those
implementations must exactly match their Agave counterparts.
If this PR represents a change to a native program implementation (not
tests), please include a reviewer from the Firedancer team. And please
keep refactors to a minimum.

@Lichtso Lichtso force-pushed the feature/stricter_abi_and_runtime_constraints branch 6 times, most recently from 36ebb8a to 7a1bb37 Compare July 23, 2025 20:13
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Jul 23, 2025

Codecov Report

❌ Patch coverage is 84.45748% with 53 lines in your changes missing coverage. Please review.
✅ Project coverage is 82.8%. Comparing base (1c9366c) to head (fff7be9).
⚠️ Report is 3 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff            @@
##           master    #7113    +/-   ##
========================================
  Coverage    82.8%    82.8%            
========================================
  Files         801      801            
  Lines      363392   363579   +187     
========================================
+ Hits       300960   301119   +159     
- Misses      62432    62460    +28     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Lichtso Lichtso force-pushed the feature/stricter_abi_and_runtime_constraints branch from 7a1bb37 to 0b635ec Compare July 28, 2025 16:59
@Lichtso Lichtso marked this pull request as ready for review August 1, 2025 13:59
@Lichtso Lichtso requested a review from a team as a code owner August 1, 2025 13:59
Comment thread program-runtime/src/serialization.rs Outdated
Comment thread programs/bpf_loader/src/lib.rs
Comment thread syscalls/src/cpi.rs
@Lichtso Lichtso force-pushed the feature/stricter_abi_and_runtime_constraints branch from 0b635ec to 6e84f6b Compare August 4, 2025 15:39
@Lichtso Lichtso force-pushed the feature/stricter_abi_and_runtime_constraints branch from 6e84f6b to fff7be9 Compare August 4, 2025 15:50
@Lichtso Lichtso requested a review from LucasSte August 4, 2025 17:49
@Lichtso Lichtso merged commit 898ded7 into anza-xyz:master Aug 5, 2025
41 checks passed
@Lichtso Lichtso deleted the feature/stricter_abi_and_runtime_constraints branch August 5, 2025 18:57
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.

3 participants