fix(tip-1017): remove field param from NotIpPort and NotIp errors#2869
Open
fix(tip-1017): remove field param from NotIpPort and NotIp errors#2869
Conversation
Align TIP-1017 spec and Solidity ref-impl with the Rust V2 implementation which defines: error NotIpPort(string input, string backtrace); error NotIp(string input, string backtrace); Previously the spec and Solidity had an extra 'field' parameter that the Rust precompile never included. Resolves ZELLIC-65 Amp-Thread-ID: https://ampcode.com/threads/T-019c974c-ecce-74e1-bec5-2ecec8c53ee6 Co-authored-by: Amp <amp@ampcode.com>
a7bfabe to
1fa266c
Compare
📊 Tempo Precompiles CoverageprecompilesCoverage: 20753/21815 lines (95.13%) File details
contractsCoverage: 209/383 lines (54.57%) File details
Total: 20962/22198 lines (94.43%) |
SuperFluffy
approved these changes
Feb 26, 2026
Contributor
SuperFluffy
left a comment
There was a problem hiding this comment.
Change makes sense to match impl and spec.
Should we rename the error to make it ingress-specific (similarly, make NotIp egress-specific)?
| /// @param input The invalid input that was provided | ||
| /// @param backtrace Additional error context | ||
| error NotIpPort(string field, string input, string backtrace); | ||
| error NotIpPort(string input, string backtrace); |
Contributor
There was a problem hiding this comment.
Could call this error IngressNotIpPort - or just error InvalidIngress?
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.
Summary
Aligns TIP-1017 spec and Solidity ref-impl with the Rust V2 implementation.
Before (spec/Solidity):
After (matches Rust):
Changes
tips/tip-1017.md— Removedfieldparam fromNotIpPortspecIValidatorConfigV2.sol— RemovedfieldfromNotIpPortandNotIpdeclarationsValidatorConfigV2.sol— Removedfieldfrom all 7 internal validation function signatures, call sites, and ~35 revert statementsV1 files untouched (V1 Rust and Solidity both have
fieldand are consistent).Resolves ZELLIC-65