Extend macOS portability layer for Apple Silicon#9070
Extend macOS portability layer for Apple Silicon#9070yeabat8tcap wants to merge 3947 commits intofiredancer-io:macos-integrationfrom
Conversation
Fixes a bug that results in unrelated fork graph nodes getting dropped on accdb_cancel.
…o#8763) * bundle: fix STEM_BURST by buffering transactions in a deque unit tests zero copy design more hardening * tile * PR comments * use stem abstraction * PR comments * remove stale metrics * remove stack copies * add tests * plumb bundle topology depth
Reduce git diff churn when reordering metrics by deriving metric indices using an enum
…cer-io#8782) * runtime: fix missing serialization and address in builtin-to-core-bpf migration new_target_program_account() constructs an UpgradeableLoaderState::Program state but never serializes it into acc->data, leaving the account with all-zero data after migration. The sister function new_target_program_data_account() correctly calls fd_bpf_upgradeable_loader_state_encode(). In Agave, AccountSharedData::new_data() handles both allocation and serialization atomically. Additionally, the call site in migrate_builtin_to_core_bpf1() never sets new_target_program->addr to the builtin program address, so tmp_account_store() writes the account to an uninitialized address. Agave stores to target.program_address explicitly. Add the encode call in new_target_program_account() and set the address at the call site. * add missing addr assignment * flamenco, bpf migration: implement verified_build_hash check * flamenco, bpf migration: fix logic for when buffer has authority but config doesn't specify one * fixup * flamenco, ledger: add enshrine_slashing_program ledger * flamenco, bpf migration: add discriminant check --------- Co-authored-by: nlgripto <155116201+nlgripto@users.noreply.github.com>
get_token_to_eol prevents oob read, but would still except numeric prefixes -- and is just wrong usage
the write in fd_runtime_pre_execute_check makes more sense, also given early returns
…cer-io#9038) * use flock for submodules * test vectors temp remove
* stakes: eliminate O(n_delegations) loop in fd_stakes_activate_epoch
* firedancer: clean up vote_keyed_lsched and chacha20 * firedancer: clean up switch_to_chacha8_turbine from codebase --------- Co-authored-by: Emanuele Cesena <ecesena@jumptrading.com>
This commit implements a comprehensive portability layer to enable native Firedancer builds on macOS ARM64. Key changes include: - Core Libraries: Successfully compiled libfd_util, libfd_ballet, libfd_tango, libfd_flamenco, and libfd_disco on macOS. - Shared Memory: Replaced Linux hugepages with mlock-backed anonymous memory via shm_open(SHM_ANON). - Threading: Implemented Mach thread priority (QoS) and affinity shims for fd_tile. - Agave Integration: Patched x86_64 rdtsc intrinsics for ARM64 and resolved RocksDB linkage issues. - System Shims: Implemented getrandom-to-getentropy, clock_nanosleep, and networking shims (mmsghdr, recvmmsg). - SANDBOX & SECCOMP: Stubbed Linux-specific process isolation and security features for macOS compatibility. - Type Compatibility: Resolved global ulong vs uint64_t pointer mismatches and type-generic overflow built-ins. - Build System: Introduced apple_silicon.mk and updated Local.mk rules for Darwin targets. Work in progress: Finalizing fdctl linkage and verifying Gossiping/RPC.
|
Thank you for the contribution. This is a bit too big too review or merge (600K lines of changes), but I'd be happy to accept a series of PRs with smaller changes. For example, the first PR could just add |
|
For this kind of contribution specifically, we cannot accept LLM-generated patches, because of the asymmetric human review cost. |
|
Ahh I see, okay. Is it better to create a separate branch and cherry pick from there? I can be able to do that. Let me know, thanks. @ripatel-fd |
Yes that would be great, thanks! |
This PR merges the Apple Silicon (M-series) portability layer from the firedancer-apple fork into the macos-integration branch. It includes: