feat(executor): expose return codec in ApplyRet#2264
Merged
Conversation
68c5bce to
0ca9e00
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2264 +/- ##
==========================================
- Coverage 77.59% 77.58% -0.02%
==========================================
Files 147 147
Lines 15851 15865 +14
==========================================
+ Hits 12300 12309 +9
- Misses 3551 3556 +5
🚀 New features to boost your workflow:
|
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the FVM executor API to expose the IPLD codec associated with top-level return data, addressing a long-standing TODO and aligning ApplyRet with existing syscall-level return metadata.
Changes:
- Add a new
return_codec: u64field toApplyRet(with0indicating no return data). - Plumb the return codec through the default executor by extracting it from the invocation return block and returning it alongside the receipt.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
fvm/src/executor/mod.rs |
Extends ApplyRet with a return_codec field and initializes it in prevalidation_fail. |
fvm/src/executor/default.rs |
Extracts the codec from the invocation return block and propagates it into the produced ApplyRet. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
rvagg
added a commit
to filecoin-project/filecoin-ffi
that referenced
this pull request
Mar 4, 2026
Ref: filecoin-project/ref-fvm#2264 Add return_codec to FvmMachineExecuteResponse and populate it from the FVM ApplyRet. The v2/v3 engine adapters default to 0. The Go bindings read it into the ApplyRet.ReturnCodec field.
This was referenced Mar 4, 2026
LesnyRumcajs
reviewed
Mar 4, 2026
LesnyRumcajs
approved these changes
Mar 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is part of FIP-0107 which may or may not be accepted, but it's also independent because this is a long-standing TODO. I attempted to find a good way to test this but currently we have no infra that runs a test actor returning a result with a known codec. I judged this trivial enough to just go ahead with without the test.
This is a breaking API change though because of the addition to
ApplyRet. I have a follow-up for filecoin-ffi but Forest will need to deal with it separately.