Skip to content

fix(tip-1017): remove field param from NotIpPort and NotIp errors#2869

Open
howydev wants to merge 1 commit intomainfrom
howy/fix-zellic-65-not-ip-port-field-mismatch
Open

fix(tip-1017): remove field param from NotIpPort and NotIp errors#2869
howydev wants to merge 1 commit intomainfrom
howy/fix-zellic-65-not-ip-port-field-mismatch

Conversation

@howydev
Copy link
Contributor

@howydev howydev commented Feb 26, 2026

Summary

Aligns TIP-1017 spec and Solidity ref-impl with the Rust V2 implementation.

Before (spec/Solidity):

error NotIpPort(string field, string input, string backtrace);
error NotIp(string field, string input, string backtrace);

After (matches Rust):

error NotIpPort(string input, string backtrace);
error NotIp(string input, string backtrace);

Changes

  • tips/tip-1017.md — Removed field param from NotIpPort spec
  • IValidatorConfigV2.sol — Removed field from NotIpPort and NotIp declarations
  • ValidatorConfigV2.sol — Removed field from all 7 internal validation function signatures, call sites, and ~35 revert statements

V1 files untouched (V1 Rust and Solidity both have field and are consistent).

Resolves ZELLIC-65

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>
@howydev howydev force-pushed the howy/fix-zellic-65-not-ip-port-field-mismatch branch from a7bfabe to 1fa266c Compare February 26, 2026 00:37
@github-actions
Copy link

github-actions bot commented Feb 26, 2026

📊 Tempo Precompiles Coverage

precompiles

Coverage: 20753/21815 lines (95.13%)

File details
File Lines Coverage
src/account_keychain/dispatch.rs 36/41 87.80%
src/account_keychain/mod.rs 1131/1150 98.35%
src/error.rs 139/158 87.97%
src/ip_validation.rs 10/10 100.00%
src/lib.rs 328/339 96.76%
src/nonce/dispatch.rs 19/23 82.61%
src/nonce/mod.rs 252/260 96.92%
src/stablecoin_dex/dispatch.rs 349/353 98.87%
src/stablecoin_dex/error.rs 51/51 100.00%
src/stablecoin_dex/mod.rs 2997/3093 96.90%
src/stablecoin_dex/order.rs 362/362 100.00%
src/stablecoin_dex/orderbook.rs 651/683 95.31%
src/storage/evm.rs 321/347 92.51%
src/storage/hashmap.rs 128/140 91.43%
src/storage/mod.rs 5/5 100.00%
src/storage/packing.rs 526/552 95.29%
src/storage/thread_local.rs 146/195 74.87%
src/storage/types/array.rs 211/262 80.53%
src/storage/types/bytes_like.rs 323/338 95.56%
src/storage/types/mapping.rs 148/148 100.00%
src/storage/types/mod.rs 67/91 73.63%
src/storage/types/primitives.rs 564/567 99.47%
src/storage/types/set.rs 454/474 95.78%
src/storage/types/slot.rs 282/296 95.27%
src/storage/types/vec.rs 1078/1095 98.45%
src/test_util.rs 194/231 83.98%
src/tip20/dispatch.rs 584/616 94.81%
src/tip20/mod.rs 1783/1854 96.17%
src/tip20/rewards.rs 444/487 91.17%
src/tip20/roles.rs 187/206 90.78%
src/tip20_factory/dispatch.rs 26/29 89.66%
src/tip20_factory/mod.rs 543/555 97.84%
src/tip403_registry/dispatch.rs 406/443 91.65%
src/tip403_registry/mod.rs 1338/1423 94.03%
src/tip_fee_manager/amm.rs 1111/1147 96.86%
src/tip_fee_manager/dispatch.rs 278/289 96.19%
src/tip_fee_manager/mod.rs 495/510 97.06%
src/validator_config/dispatch.rs 210/221 95.02%
src/validator_config/mod.rs 606/692 87.57%
src/validator_config_v2/dispatch.rs 201/214 93.93%
src/validator_config_v2/mod.rs 1769/1865 94.85%

contracts

Coverage: 209/383 lines (54.57%)

File details
File Lines Coverage
src/lib.rs 1/71 1.41%
src/precompiles/account_keychain.rs 24/30 80.00%
src/precompiles/nonce.rs 9/18 50.00%
src/precompiles/stablecoin_dex.rs 36/48 75.00%
src/precompiles/tip20.rs 52/70 74.29%
src/precompiles/tip20_factory.rs 6/12 50.00%
src/precompiles/tip403_registry.rs 12/15 80.00%
src/precompiles/tip_fee_manager.rs 21/45 46.67%
src/precompiles/validator_config.rs 12/26 46.15%
src/precompiles/validator_config_v2.rs 36/48 75.00%

Total: 20962/22198 lines (94.43%)

📦 Download full HTML report

@howydev howydev marked this pull request as ready for review February 26, 2026 02:14
@howydev howydev requested a review from a team February 26, 2026 02:14
Copy link
Contributor

@SuperFluffy SuperFluffy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could call this error IngressNotIpPort - or just error InvalidIngress?

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.

2 participants