[codex] Add Spark Name v2 registration payload support - #10
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 30c698b5dc
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
CodeAnt AI is reviewing your PR. |
User descriptionWhat changed
WhyFiro's Spark Name registration format now serializes registration data as v2 and includes an operation type. Stack Wallet only creates registrations, so this intentionally keeps transfer fields out of the mobile library. Review notesThis is the smallest native change needed for registration compatibility. Transfer support can be added later if mobile starts creating Spark Name transfers. Validation
CodeAnt-AI DescriptionUpdate Spark Name registrations to the new v2 format What Changed
Impact
💡 Usage GuideChecking Your Pull RequestEvery time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later. Talking to CodeAnt AIGot a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask: This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code. ExamplePreserve Org Learnings with CodeAntYou can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input: This helps CodeAnt AI learn and adapt to your team's coding style and standards. ExampleRetrigger reviewAsk CodeAnt AI to review the PR again, by typing: Check Your Repository HealthTo analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health. |
|
CodeAnt AI finished reviewing your PR. |
🤖 CodeAnt AI — Review Status
Updated in place by CodeAnt AI · last 5 reviews |
User descriptionWhat changed
Why / scopeThis aligns Spark Mobile with the existing Spark Name v2 payload format. The The recent v2.1 requirement relevant to the failure is a tagged registration-fee output. The caller constructs that output and must include its extra bytes in the miner-fee estimate, so the confirmation fix is in Stack Wallet PR #1413. The mobile serializer has no later consensus-validation step, so accepting every Related
Review notesThis intentionally remains registration-only. Transfer fields can be added if mobile begins creating Spark Name transfers. Validation
CodeAnt-AI DescriptionSupport Spark Name registration payload version 2 and reject invalid layouts What Changed
Impact
💡 Usage GuideChecking Your Pull RequestEvery time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later. Talking to CodeAnt AIGot a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask: This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code. ExamplePreserve Org Learnings with CodeAntYou can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input: This helps CodeAnt AI learn and adapt to your team's coding style and standards. ExampleRetrigger reviewAsk CodeAnt AI to review the PR again, by typing: Check Your Repository HealthTo analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health. |
What changed
CSparkNameTxData::CURRENT_VERSIONfrom 1 to 2.operationTypebyte, defaulting to registration (0).CURRENT_VERSIONconstant in that test.Why / scope
This aligns Spark Mobile with the existing Spark Name v2 payload format. The
operationTypefield predates the recent v2.1 hard fork and is not the fix for registrations remaining unconfirmed; Firo Core still accepts v1 registration payloads after v2 activation.The recent v2.1 requirement relevant to the failure is a tagged registration-fee output. The caller constructs that output and must include its extra bytes in the miner-fee estimate, so the confirmation fix is in Stack Wallet PR #1413.
The mobile serializer has no later consensus-validation step, so accepting every
nVersion >= 2could silently encode or decode an unknown future layout as v2. It now fails immediately unless the version is exactly 1 or 2.Related
Review notes
This intentionally remains registration-only. Transfer fields can be added if mobile begins creating Spark Name transfers.
Validation
git diff --checkpasses locally, with only Windows CRLF warnings.firoorg/flutter_libsparkmobile's Windows CMake build and linkedlibflutter_libsparkmobile.dll.spark_name_testsbuild remains blocked in the available Windows environment by its existing POSIXendian.hassumption; no build-system workaround is included in this PR.