Skip to content

Conversation

@topointon-jump
Copy link
Contributor

@topointon-jump topointon-jump force-pushed the firedancer-auditor-internal-371 branch from 4334ed5 to ee89363 Compare January 28, 2026 20:38
@topointon-jump topointon-jump force-pushed the firedancer-auditor-internal-371 branch from ee89363 to e5564b5 Compare January 28, 2026 23:35
@topointon-jump topointon-jump changed the title [WIP] flamenco, runtime, vm: fix accounts_resize_delta to use signed arithmetic flamenco, runtime, vm: fix accounts_resize_delta to use signed arithmetic Jan 28, 2026
@ibhatt-jumptrading
Copy link
Contributor

feels weird that we just cast down ulong to long in some places now

@topointon-jump
Copy link
Contributor Author

The casts are disgusting but unfortunately necessary to support negative resize deltas.

Agave has the same casts:
https://github.com/anza-xyz/agave/blob/v2.1.14/sdk/src/transaction_context.rs#L1103C9-L1103C82

let length_delta = (new_length as i64).saturating_sub(old_length as i64);

Also added a unit test for this case specifically.

@topointon-jump topointon-jump merged commit be8a7cf into firedancer-io:main Jan 29, 2026
13 checks passed
@topointon-jump topointon-jump deleted the firedancer-auditor-internal-371 branch January 29, 2026 16:37
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.

4 participants