Skip to content

Conversation

@aceppaluni
Copy link
Contributor

Related Issues

This PR aims to fix Issue #13256

Proposed Changes

This PR updates the lotus wallet sign command to implement FRC-102, allowing users to sign messages with an EIP-191 (Ethereum-style) prefix for FEVM compatibility.

Additional Info

  • Added --fevm flag to wallet sign command.
  • Prepends the appropriate prefix to messages before signing (EIP-191 for FEVM, Filecoin prefix for native messages).
  • Supports interoperability with other Filecoin wallets using FRC-102.
  • Returns signatures in the same format as the existing command.

Checklist

Before you mark the PR ready for review, please make sure that:

@aceppaluni aceppaluni force-pushed the feat/frc-102-signing branch from 1178fb7 to 07c15b7 Compare October 15, 2025 22:18
@aceppaluni
Copy link
Contributor Author

Hi all 👋 Just wanted to follow up on this PR.
No rush.
Please let me know if there’s anything I can update to help move it forward!

@rvagg
Copy link
Member

rvagg commented Nov 7, 2025

@hugomrdias @eshon @bumblefudge can you help us out here -- this PR does two things, it changes the default signature to be the version 0x45 (E) style signature but adds a --fevm argument to do the version 0x46 (F) style signature. I don't use this API for signing and I don't know what current users would expect but this would be a breaking change.
There are 4 variants in FRC-0102, should we support all of them and a bare form for backward compatibility? We could do --type=[0|1|E|F|bare] (defaulting to F perhaps?). What do ledger and filsnap do here?

@github-project-automation github-project-automation bot moved this from 📌 Triage to ⌨️ In Progress in FilOz Nov 7, 2025
@hugomrdias
Copy link

hugomrdias commented Nov 7, 2025

@hugomrdias @eshon @bumblefudge can you help us out here -- this PR does two things, it changes the default signature to be the version 0x45 (E) style signature but adds a --fevm argument to do the version 0x46 (F) style signature. I don't use this API for signing and I don't know what current users would expect but this would be a breaking change. There are 4 variants in FRC-0102, should we support all of them and a bare form for backward compatibility? We could do --type=[0|1|E|F|bare] (defaulting to F perhaps?). What do ledger and filsnap do here?

in this command we only care about 0x46 "personal_sign", filsnap and ledger only implement 0x46 for personal messages.

yes, its a breaking change there no more unprefixed signatures exactly frc-0102 purpose

https://github.com/hugomrdias/filecoin/blob/main/packages/iso-filecoin/src/wallet.js#L274-L285

@rvagg
Copy link
Member

rvagg commented Nov 24, 2025

in this command we only care about 0x46 "personal_sign", filsnap and ledger only implement 0x46 for personal messages.

OK, @aceppaluni would you mind please just removing the --fevm and the branch that allows that and just going with the 0x46 prefixed version for all signing.

But then also, we need to fix the "verify" command to be the reverse of "sign", so it also needs to know about the prefix. When you're done, you should be able to pass the output of "sign" to "verify" and it pass.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: ⌨️ In Progress

Development

Successfully merging this pull request may close these issues.

3 participants