-
Couldn't load subscription status.
- Fork 15
Sertn -> Inference Network #27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
🛡️ Immunefi PR ReviewsThis pull request is not eligible for a PR Reviews review. Please contact Immunefi support. Reason: This PR exceeds the maximum size supported by your current plan (250 lines). Please reduce the number of lines or contact your admin for plan options. |
WalkthroughProject-wide rename from “Sertn” to “Inference,” updating interfaces, contracts, ABIs, client code, workflows, and deployment scripts/addresses. Adds InferenceAggregator contract and new ABIs for Inference* managers; removes SertnAggregator. Deployment tooling and JSON outputs switch to inference naming and paths. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor User
participant Client as Client CLI/Service
participant Agg as InferenceAggregator
participant TM as InferenceTaskManager
participant NM as InferenceNodesManager
participant SM as InferenceServiceManager
User->>Client: Provide task + proof
Client->>Agg: submitTask(task, proof)
Agg->>Agg: Verify ECDSA signer == aggregatorEOA
alt valid signature
Agg->>TM: sendTask(task)
TM->>NM: allocateFucusForTask(operator, modelId, required)
TM-->>Client: TaskCreated/Assigned events
note over TM,NM: Task lifecycle (outputs/proofs/challenges)
TM->>SM: pullFeeFromUser/TaskCompleted/submitRewardsForInterval
else invalid
Agg-->>Client: revert InvalidEOASignature
end
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 Pylint (3.3.8)client/src/common/abis.pyclient/src/avs_operator/main.pyclient/src/common/auto_update.py
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🧪 Early access (Sonnet 4.5): enabledWe are currently testing the Sonnet 4.5 model, which is expected to improve code review quality. However, this model may lead to increased noise levels in the review comments. Please disable the early access features if the noise level causes any inconvenience. Note:
Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 8
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
contracts/deployments/sertnDeployment.json (1)
1-13: Critical: Duplicate deployment artifacts detected.Both
contracts/deployments/inferenceDeployment.json(used by the deployer) andcontracts/deployments/sertnDeployment.jsonexist, causing ambiguity. RemovesertnDeployment.jsonor rename/merge it toinferenceDeployment.jsonto align with the rebrand.
🧹 Nitpick comments (10)
client/src/common/config.py (1)
151-155: Consider updating OwnerConfig docstring for consistency.While this line wasn't marked as changed, the docstring still references "AVS Owner" rather than "Inference Network Owner". For consistency with the other configuration classes (OperatorConfig and AggregatorConfig), consider updating this to match the rebranding effort.
Apply this diff to align with the rebranding:
- """Configuration for AVS Owner operations.""" + """Configuration for Inference Network Owner operations.""".github/workflows/test.yml (1)
35-37: Consider quoting variable in PATH assignment.The shellcheck hint suggests double-quoting
$HOMEto prevent potential word splitting, though this is unlikely to cause issues in practice.Apply this diff if you want to address the shellcheck hint:
- name: Install uv run: | curl -LsSf https://astral.sh/uv/install.sh | sh - echo "$HOME/.cargo/bin" >> $GITHUB_PATH + echo "${HOME}/.cargo/bin" >> $GITHUB_PATHcontracts/script/utils/SertnDeploymentLib.sol (1)
1-192: Consider removing this commented-out file.The entire file is commented out and appears to be legacy code. Since this is a rebranding PR, consider whether this file should be deleted entirely rather than maintaining commented code with updated names.
contracts/deployments/inferenceDeployment.json (1)
1-12: LGTM! Deployment configuration updated with Inference naming.The new deployment configuration file correctly uses the "inference" prefix for all renamed components:
inferenceRegistrarinferenceServiceManagerinferenceTaskManagerThe JSON structure is valid and the addresses are properly formatted.
Optional: Consider adding trailing newline.
The file ends without a trailing newline at Line 12. While not required, adding a trailing newline is a common convention that can prevent diff issues in some tools.
Apply this diff to add a trailing newline:
"strategy_2": "0x5B494da05Fe18De2Fb15393360625D9FC4BcA5EF" } +contracts/anvil/deploy-el.sh (1)
5-5: Add error handling for directory changes.Both
cdcommands lack error handling. If either fails, the script will continue in the wrong directory, potentially causing thesourceorforgecommands to fail silently or behave unexpectedly.Apply this diff to add error handling:
parent_path=$( - cd "$(dirname "${BASH_SOURCE[0]}")" + cd "$(dirname "${BASH_SOURCE[0]}")" || exit 1 pwd -P ) # Load environment variables from the script's directory source "$parent_path/load-env.sh" -cd "$parent_path/../" +cd "$parent_path/../" || exit 1Also applies to: 12-12
contracts/anvil/deploy-inference.sh (2)
5-5: Add error handling for directory changes.Both
cdcommands lack error handling. If either fails, subsequent commands will execute in the wrong directory, potentially causing silent failures.Apply this diff to add error handling:
parent_path=$( - cd "$(dirname "${BASH_SOURCE[0]}")" + cd "$(dirname "${BASH_SOURCE[0]}")" || exit 1 pwd -P ) # Load environment variables from the script's directory source "$parent_path/load-env.sh" -cd "$parent_path/../" +cd "$parent_path/../" || exit 1Also applies to: 12-12
17-28: Consider extracting the JSON formatting logic.The inline Python snippet works well, but if this pattern is used in multiple deployment scripts (like
deploy-el.sh), consider extracting it to a shared utility script for consistency and maintainability.For example, create
anvil/format-json.sh:#!/usr/bin/env bash # Usage: format-json.sh <json-file-path> if [ -f "$1" ]; then python3 -c " import json import sys with open('$1', 'r') as f: data = json.load(f) with open('$1', 'w') as f: json.dump(data, f, indent=4) " echo "Formatted $1" else echo "$1 not found!" exit 1 fiThen simplify this script:
./anvil/format-json.sh deployments/inferenceDeployment.jsoncontracts/src/InferenceAggregator.sol (3)
24-29: Consider emitting an event for aggregator EOA updates.While the function correctly validates the zero address and restricts access to the owner, emitting an event would improve transparency and enable off-chain tracking of aggregator changes.
Consider adding an event:
+ event AggregatorEOAUpdated(address indexed oldEOA, address indexed newEOA); + function updateAggregatorEOA(address _aggregatorEOA) external onlyOwner { if (_aggregatorEOA == address(0)) { revert ZeroAddress(); } + emit AggregatorEOAUpdated(aggregatorEOA, _aggregatorEOA); aggregatorEOA = _aggregatorEOA; }
31-36: Consider emitting an event for task manager updates.Similar to the aggregator EOA update, emitting an event would improve transparency when the task manager address changes.
Consider adding an event:
+ event InferenceTaskManagerUpdated(address indexed oldManager, address indexed newManager); + function updateInferenceTaskManager(address _inferenceTaskManager) external onlyOwner { if (_inferenceTaskManager == address(0)) { revert ZeroAddress(); } + emit InferenceTaskManagerUpdated(address(inferenceTaskManager), _inferenceTaskManager); inferenceTaskManager = IInferenceTaskManager(_inferenceTaskManager); }
38-48: Consider following checks-effects-interactions pattern.The function emits the
TaskSubmittedevent after the external call toinferenceTaskManager.sendTask(). While the re-entrancy risk is minimal here (trusted contract, no value transfer, no exploitable state changes), following the checks-effects-interactions (CEI) pattern is a best practice.Apply this diff to emit the event before the external call:
function submitTask(IInferenceTaskManager.Task memory _task, bytes memory _proof) external { bytes32 messageHash = keccak256(abi.encode(_task)); address signer = ECDSA.recover(ECDSA.toEthSignedMessageHash(messageHash), _proof); if (signer != aggregatorEOA) { revert InvalidEOASignature(); } + emit TaskSubmitted(messageHash, msg.sender); inferenceTaskManager.sendTask(_task); - emit TaskSubmitted(messageHash, msg.sender); }
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
client/uv.lockis excluded by!**/*.lock
📒 Files selected for processing (62)
.devcontainer/devcontainer.json(2 hunks).env.example(1 hunks).github/workflows/test.yml(2 hunks).github/workflows/upgrade-holesky.yml(1 hunks)Makefile(2 hunks)README.md(3 hunks)abis/InferenceNodesManager.abi.json(1 hunks)abis/InferenceServiceManager.abi.json(1 hunks)abis/InferenceTaskManager.abi.json(1 hunks)abis/SertnNodesManager.abi.json(2 hunks)abis/SertnServiceManager.abi.json(3 hunks)abis/SertnTaskManager.abi.json(9 hunks)client/README.md(1 hunks)client/pyproject.toml(2 hunks)client/src/aggregator/main.py(1 hunks)client/src/avs_operator/main.py(3 hunks)client/src/common/abis.py(2 hunks)client/src/common/auto_update.py(1 hunks)client/src/common/config.py(3 hunks)client/src/common/constants.py(1 hunks)client/src/common/contract_constants.py(2 hunks)client/src/common/eth.py(2 hunks)client/src/common/logging.py(2 hunks)client/src/main.py(2 hunks)client/src/management/commands.py(2 hunks)client/src/models/execution_layer/model_config.py(1 hunks)contracts/anvil/build-state.sh(1 hunks)contracts/anvil/deploy-el.sh(1 hunks)contracts/anvil/deploy-inference.sh(1 hunks)contracts/anvil/deploy-sertn.sh(0 hunks)contracts/anvil/stop-anvil.sh(2 hunks)contracts/deployments/core/31337.json(1 hunks)contracts/deployments/inferenceDeployment.json(1 hunks)contracts/deployments/sertnDeployment.json(1 hunks)contracts/interfaces/IInferenceAggregator.sol(3 hunks)contracts/interfaces/IInferenceNodesManager.sol(1 hunks)contracts/interfaces/IInferenceRegistrar.sol(1 hunks)contracts/interfaces/IInferenceServiceManager.sol(2 hunks)contracts/interfaces/IInferenceTaskManager.sol(1 hunks)contracts/script/DeployHolesky.s.sol(4 hunks)contracts/script/InferenceDeployer.s.sol(3 hunks)contracts/script/InitLocalWorkers.t.sol(4 hunks)contracts/script/LocalnetDeploy.s.sol(2 hunks)contracts/script/UpgradeHolesky.s.sol(4 hunks)contracts/script/utils/SertnDeploymentLib.sol(7 hunks)contracts/src/InferenceAggregator.sol(1 hunks)contracts/src/InferenceNodesManager.sol(5 hunks)contracts/src/InferenceRegistrar.sol(1 hunks)contracts/src/InferenceServiceManager.sol(15 hunks)contracts/src/InferenceTaskManager.sol(9 hunks)contracts/src/ModelRegistry.sol(1 hunks)contracts/src/SertnAggregator.sol(0 hunks)contracts/test/AVS.t.sol(24 hunks)contracts/test/InferenceNodesManager.t.sol(28 hunks)contracts/test/InferenceServiceManager.t.sol(18 hunks)contracts/test/InferenceTaskManager.t.sol(17 hunks)contracts/test/mockContracts/AllocationManagerMock.sol(3 hunks)contracts/test/mockContracts/InferenceNodesManagerMock.sol(1 hunks)contracts/test/mockContracts/InferenceServiceManagerMock.sol(1 hunks)contracts/test/mockContracts/InferenceTaskManagerMock.sol(1 hunks)contracts/test/mockContracts/RegistrarMock.sol(1 hunks)cspell.json(1 hunks)
💤 Files with no reviewable changes (2)
- contracts/src/SertnAggregator.sol
- contracts/anvil/deploy-sertn.sh
🧰 Additional context used
🧬 Code graph analysis (3)
client/src/main.py (1)
client/src/common/logging.py (1)
debug(49-51)
client/src/avs_operator/main.py (1)
client/src/common/logging.py (1)
info(54-56)
client/src/aggregator/main.py (1)
client/src/common/logging.py (1)
info(54-56)
🪛 actionlint (1.7.7)
.github/workflows/test.yml
35-35: shellcheck reported issue in this script: SC2086:info:2:28: Double quote to prevent globbing and word splitting
(shellcheck)
🪛 Shellcheck (0.11.0)
contracts/anvil/deploy-inference.sh
[warning] 5-5: Use 'cd ... || exit' or 'cd ... || return' in case cd fails.
(SC2164)
[warning] 12-12: Use 'cd ... || exit' or 'cd ... || return' in case cd fails.
(SC2164)
contracts/anvil/deploy-el.sh
[warning] 12-12: Use 'cd ... || exit' or 'cd ... || return' in case cd fails.
(SC2164)
🔇 Additional comments (94)
client/src/models/execution_layer/model_config.py (1)
5-5: LGTM! Documentation updated for rebrand.The docstring correctly reflects the Inference Network rebrand. The change is purely documentary with no functional impact.
cspell.json (1)
37-37: LGTM! Spell checker dictionary updated for rebranding.The addition of "Inference" to the cspell word list correctly supports the project-wide rebranding from Sertn to Inference Network. This ensures the spell checker won't flag the new brand name as a typo.
.github/workflows/upgrade-holesky.yml (1)
55-55: LGTM! Label correctly updated for rebranding.The workflow output label has been properly updated from "Sertn AVS URL" to "Inference AVS URL", consistent with the PR's rebranding objective.
.devcontainer/devcontainer.json (2)
4-4: LGTM! Rebrand applied correctly.The devcontainer name has been updated from "Sertn Dev" to "Inference Dev", consistent with the PR objective.
55-56: Good addition of trailing newline.Adding the trailing newline follows POSIX text file conventions and is a minor formatting improvement.
contracts/test/mockContracts/AllocationManagerMock.sol (1)
12-12: LGTM! Doc comment updated for rebrand.The documentation correctly references the rebranded manager names.
client/src/avs_operator/main.py (3)
27-27: LGTM! Rebranding applied correctly.The startup log message has been successfully updated to reflect the new "Inference" branding.
100-100: LGTM! Comment updated to reflect the renamed interface.The comment correctly documents the task struct type from the renamed
IInferenceTaskManagerinterface.
125-125: LGTM! Comment consistently updated.The comment correctly documents the task struct type, maintaining consistency with the rebranding changes elsewhere in the file.
client/src/common/config.py (3)
1-6: LGTM! Module docstring successfully rebranded.The module docstring has been correctly updated to reference "Inference Network" instead of "Sertn AVS", aligning with the PR's rebranding objective.
107-109: LGTM! OperatorConfig docstring successfully rebranded.The class docstring has been correctly updated to reference "Inference Network Operator" instead of "Sertn AVS Operator", maintaining consistency with the rebranding effort.
132-134: LGTM! AggregatorConfig docstring successfully rebranded.The class docstring has been correctly updated to reference "Inference Network Aggregator" instead of "Sertn AVS Aggregator", completing the rebranding for this configuration class.
contracts/anvil/stop-anvil.sh (1)
36-36: LGTM! Good UX improvement.Adding this completion message provides clear feedback to users that the entire shutdown sequence has finished successfully.
contracts/src/ModelRegistry.sol (1)
10-10: LGTM! Documentation updated to reflect the rebrand.The
@noticedocumentation correctly references the Inference network, consistent with the project-wide rename..env.example (1)
16-16: LGTM! Path updated to match new deployment naming.The deployment output path correctly references
inference_network_deployment_output.json, aligning with the project-wide rename from Sertn to Inference.client/src/management/commands.py (2)
56-56: LGTM! CLI example updated for the rebrand.The example command correctly references
inference manage sync-models, consistent with the CLI rename from Sertn to Inference.
126-126: LGTM! CLI example updated for the rebrand.The example command correctly references
inference manage submit-rewards, consistent with the CLI rename from Sertn to Inference.contracts/interfaces/IInferenceTaskManager.sol (1)
4-4: LGTM! Interface renamed to reflect the rebrand.The interface name
IInferenceTaskManagercorrectly reflects the project-wide rename from Sertn to Inference. All function signatures, events, errors, and structs remain consistent.client/src/common/contract_constants.py (2)
6-7: LGTM! Docstring updated to reference renamed interface.The docstring correctly references
IInferenceTaskManager.solandIInferenceTaskManager.Task, maintaining synchronization with the renamed Solidity interface.
25-26: LGTM! Docstring updated to reference renamed interface.The docstring correctly references
IInferenceTaskManager.solandIInferenceTaskManager.TaskState, maintaining synchronization with the renamed Solidity interface.client/src/common/auto_update.py (1)
12-12: LGTM! Repository URL updated consistently.The repository URL change aligns with the Sertn to Inference Network rebrand and is used correctly in the GitHub API calls throughout the file.
contracts/interfaces/IInferenceServiceManager.sol (2)
7-7: Interface rename aligns with rebrand.The interface rename from
ISertnServiceManagertoIInferenceServiceManageris consistent with the broader Inference Network rebrand.
27-29: Parameter rename maintains consistency.The parameter name change from
_sertnTaskManagerto_inferenceTaskManagermaintains consistency with the rebranded Inference terminology.client/pyproject.toml (2)
2-4: Package metadata updated consistently.The package name and description have been updated from Sertn to Inference Network, aligning with the rebrand.
46-46: CLI entry point renamed—verify documentation
The CLI command changed fromsertntoinference; please confirm all documentation, deployment guides, scripts, and workflows referencingsertnare updated accordingly..github/workflows/test.yml (1)
84-85: Deployment step renamed consistently.The step name and make target have been updated from "sertn contracts" to "inference contracts", aligning with the rebrand.
client/src/common/logging.py (2)
6-6: Logger namespace updated to Inference.The root logger name has been changed from
sertntoinference, aligning with the rebrand.If you have log monitoring, alerting, or parsing tools that filter on the
sertnlogger namespace, ensure they are updated to useinferenceinstead.
44-44: Child logger prefix updated consistently.The child logger naming now uses the
inferenceprefix instead ofsertn, maintaining consistency with the root logger change.client/README.md (1)
1-1: LGTM!Documentation text updated correctly to reflect the new branding.
client/src/aggregator/main.py (1)
34-34: LGTM!Startup log message correctly updated to reflect the new branding.
README.md (3)
1-1: LGTM!Project title correctly updated to reflect the new branding.
43-43: LGTM!Make target reference updated consistently with the build-state.sh script changes.
52-52: Approve CLI command name. Theinferenceentry point inclient/pyproject.tomlunder[project.scripts](line 46) aligns with the README.md.contracts/anvil/build-state.sh (1)
19-20: Approve make target updateMake target
deploy-inference-contractsis defined in the Makefile (line 51).contracts/test/mockContracts/InferenceServiceManagerMock.sol (1)
4-4: LGTM! Contract rename aligns with the rebrand.The rename from
MockSertnServiceManagertoMockInferenceServiceManageris consistent with the project-wide rebrand to "Inference Network". The mock's internal behavior remains unchanged, which is appropriate for a rebrand.contracts/interfaces/IInferenceRegistrar.sol (1)
6-6: LGTM! Interface rename is consistent with the rebrand.The interface rename from
ISertnRegistrartoIInferenceRegistrarcorrectly maintains the inheritance fromIAVSRegistrarwhile aligning with the Inference Network rebrand.abis/SertnNodesManager.abi.json (2)
321-321: LGTM! Parameter rename aligns with the rebrand.The parameter name
_inferenceTaskManagercorrectly reflects the rename from Sertn to Inference in theinitializefunction signature.
580-586: LGTM! Function and type rename is consistent.The function rename from
sertnTaskManagertoinferenceTaskManagerand the updated return typecontract IInferenceTaskManagerboth align with the project-wide rebrand to Inference Network.client/src/common/eth.py (2)
15-15: LGTM! Import updated for the rebrand.The import statement correctly references
INFERENCE_NODES_MANAGER_ABIinstead of the previous Sertn equivalent.
120-124: LGTM! Client code updated consistently.The nodes manager initialization has been updated correctly:
- Comment updated to "Inference nodes manager"
- Function call updated to
inferenceNodesManager()- ABI reference updated to
INFERENCE_NODES_MANAGER_ABIAll changes align with the Inference Network rebrand.
contracts/anvil/deploy-el.sh (1)
9-12: Approve the improved path resolution approach.The updated approach using
$parent_pathmakes the script more portable and correctly resolves the environment file relative to the script's location.contracts/interfaces/IInferenceNodesManager.sol (1)
7-11: LGTM!The interface rename from
ISertnNodesManagertoIInferenceNodesManageris clean and consistent with the rebranding effort. The documentation has been appropriately updated to reflect the Inference network.contracts/deployments/core/31337.json (1)
1-1: LGTM!The deployment data update reflects a fresh deployment of the rebranded contracts on the local Anvil network (chain ID 31337). The timestamp and block number progression indicate this is a new deployment consistent with the Inference Network rebranding.
contracts/anvil/deploy-inference.sh (1)
1-28: Well-structured deployment script.The script properly handles path resolution, environment loading, deployment execution, and JSON formatting. The conditional formatting of the deployment JSON is a nice touch for readability.
client/src/common/constants.py (1)
23-26: inferenceDeployment.json verified and code approved.All required keys are present in contracts/deployments/inferenceDeployment.json and align with the rebranding changes.
client/src/main.py (2)
13-14: LGTM! Clean rebrand of CLI interface.The Typer app name and help text have been correctly updated to reflect the Inference Network branding.
53-53: LGTM! Log message updated consistently.The startup log message correctly reflects the new Inference branding.
contracts/test/mockContracts/InferenceTaskManagerMock.sol (1)
4-9: LGTM! Mock contract renamed consistently.The contract name and variable references have been correctly updated from Sertn to Inference naming throughout the mock.
contracts/src/InferenceRegistrar.sol (1)
8-13: LGTM! Contract documentation and declaration updated consistently.The contract name, NatSpec documentation, and inline comments have been correctly updated to reflect the Inference Network branding. The contract's interface implementations remain unchanged.
contracts/script/InitLocalWorkers.t.sol (4)
24-26: LGTM! Imports updated to Inference naming.The import statements have been correctly updated to reference InferenceRegistrar, InferenceServiceManager, and IInferenceTaskManager.
42-42: LGTM! Service manager variable type updated.The serviceManager variable type has been correctly changed to InferenceServiceManager.
103-116: LGTM! Deployment file path and JSON keys updated consistently.The deployment file path has been correctly changed from
sertnDeployment.jsontoinferenceDeployment.json, and all JSON field names have been updated to use the "inference" prefix (inferenceServiceManager, inferenceTaskManager, inferenceRegistrar).
129-134: LGTM! Contract instantiations and comments updated.The contract instantiations and related comments have been correctly updated to reference Inference* types throughout.
contracts/script/UpgradeHolesky.s.sol (4)
13-14: LGTM! Imports updated to Inference naming.The import statements have been correctly updated to reference InferenceServiceManager and InferenceTaskManager.
48-54: LGTM! Deployment path and log message updated.The deployment JSON path has been correctly changed from
deployments/sertn/todeployments/inference/, and the log message has been updated to reference "Inference deployment".
82-89: LGTM! Contract instantiations and logging updated.The contract instantiations have been correctly updated to use InferenceServiceManager and InferenceTaskManager, with corresponding log messages updated appropriately.
117-117: LGTM! Output deployment path updated consistently.The final deployment path has been correctly changed from
deployments/sertn/todeployments/inference/to match the read path.contracts/test/mockContracts/InferenceNodesManagerMock.sol (1)
4-4: LGTM! Mock contract properly renamed.The mock contract has been consistently updated from
SertnNodesManagerMocktoInferenceNodesManagerMock, including the import, contract declaration, interface implementation, and documentation. The implementation logic remains unchanged.Also applies to: 7-8, 11-11
contracts/test/mockContracts/RegistrarMock.sol (1)
4-4: LGTM! Mock registrar updated consistently.The mock contract has been properly updated to reference
IInferenceRegistrarinstead ofISertnRegistrar. The event declaration formatting change on Line 13 is a cosmetic improvement.Also applies to: 6-6, 13-13
Makefile (2)
51-53: Deployment script exists
Confirmedcontracts/anvil/deploy-inference.shis present; approve code changes.
35-36: ABI files presence verifiedInferenceTaskManager.abi.json, InferenceServiceManager.abi.json, and InferenceNodesManager.abi.json are present in the abis/ directory; no further action required.
client/src/common/abis.py (1)
11-11: No remaining references to old ABI constantsAll occurrences of
SERTN_*identifiers and filenames have been updated to the newINFERENCE_*versions.contracts/test/AVS.t.sol (4)
4-8: LGTM! Import and declaration updates are consistent.The imports and type declarations have been correctly updated from
Sertn*toInference*naming throughout the file.Also applies to: 71-73
100-143: LGTM! Initialization flow correctly updated.All manager instantiations and initialization calls have been properly updated to use the new
Inference*types and variable names. The dependency wiring between managers remains correct.
353-625: LGTM! Test implementations correctly updated.All test methods have been properly updated to use the new
IInferenceTaskManagerinterface and the renamed manager instances. Event expectations and assertions remain logically correct.
186-188: LGTM! Debug labels updated consistently.The VM labels have been correctly updated to reflect the new
Inference*naming convention.contracts/script/DeployHolesky.s.sol (3)
6-8: LGTM! Imports and environment variable updated correctly.The import statements have been updated to use the new
Inference*contracts, and the environment variable has been renamed fromSERTN_REGISTRARtoINFERENCE_REGISTRAR, maintaining consistency with the rebrand.Also applies to: 23-23
32-34: LGTM! Implementation deployments updated correctly.All implementation contracts are now instantiated using the new
Inference*types.
70-92: LGTM! Proxy initialization correctly updated.All proxy initialization calls have been properly updated to cast to the new
Inference*types and use the renamedinferenceRegistraraddress. The initialization parameters remain correct.contracts/script/LocalnetDeploy.s.sol (2)
5-5: LGTM! Deployment script correctly updated.All references to
SertnServiceManagerhave been properly updated toInferenceServiceManager, including imports, variable names, logging, and comments. The FIXME comments appropriately indicate placeholder values for local testing.Also applies to: 40-51
55-56: LGTM! Logging output updated consistently.The console logging has been correctly updated to reference
InferenceServiceManager.contracts/interfaces/IInferenceAggregator.sol (2)
4-4: LGTM! Interface declaration correctly updated.The interface has been properly renamed from
ISertnAggregatortoIInferenceAggregator, and the import statement correctly referencesIInferenceTaskManager.Also applies to: 7-11
34-34: LGTM! Function signatures correctly updated.All function signatures have been properly updated to use
IInferenceTaskManager.Taskand the function name has been changed fromupdateSertnTaskManagertoupdateInferenceTaskManagerwith corresponding parameter and comment updates.Also applies to: 43-46
contracts/script/InferenceDeployer.s.sol (1)
1-167: LGTM! Systematic rebrand completed successfully.The file has been thoroughly updated from
SertnDeployertoInferenceDeployerwith consistent renaming across:
- Contract name and all type references
- Import statements
- State variables
- Instance creation and initialization
- JSON serialization keys
- Output file path
All changes align with the PR objective to rebrand from Sertn to Inference Network.
contracts/src/InferenceNodesManager.sol (1)
1-528: LGTM! Complete and consistent rebrand.The contract has been successfully renamed from
SertnNodesManagertoInferenceNodesManagerwith all related updates:
- Contract name, interface, and imports
- State variable
sertnTaskManager→inferenceTaskManager- Initialization parameters and zero-address checks
- Access control checks in
allocateFucusForTaskandreleaseFucusForTask- Documentation and comments
The logic and functionality remain unchanged, confirming this is a pure rebrand.
contracts/src/InferenceServiceManager.sol (1)
4-7: LGTM! Consistent rebrand from Sertn to Inference Network.The rename has been applied systematically across imports, contract declaration, state variables, function parameters, internal references, and user-facing strings. All changes align with the PR objective to rebrand "Sertn" to "Inference Network."
Also applies to: 29-30, 42-42, 44-44, 84-84, 94-94, 113-113, 126-127, 130-130, 157-157, 319-321
contracts/test/InferenceNodesManager.t.sol (3)
6-6: LGTM! Test file properly updated for the rebrand.All test code has been systematically updated to reference the new Inference naming convention, including imports, contract types, mock objects, and console logs.
Also applies to: 8-8, 11-11, 15-15, 19-19, 21-21, 36-36, 42-42, 79-79
95-95: LGTM! Event references correctly updated.All event expectations have been updated from
ISertnNodesManagertoIInferenceNodesManager, maintaining correct event signatures.Also applies to: 171-171, 243-243, 252-252, 290-290, 353-353, 439-439, 478-478, 529-529, 575-575
130-130: LGTM! Error selector references properly updated.All error expectations have been updated from
ISertnNodesManagertoIInferenceNodesManager, maintaining correct error signatures.Also applies to: 155-155, 201-201, 208-210, 224-224, 270-270, 276-276, 295-295, 312-312, 339-341, 378-380, 391-391, 404-404, 422-422, 459-463, 494-498, 511-511, 559-559
contracts/test/InferenceServiceManager.t.sol (6)
6-8: LGTM! Import statements correctly updated.The imports have been consistently renamed from
SertnServiceManager,ISertnServiceManager, andISertnTaskManagerto theirInference*equivalents.
14-14: LGTM! Mock contracts renamed consistently.All mock contract imports, declarations, and instantiations have been updated from
MockSertnTaskManagerandMockSertnRegistrartoMockInferenceTaskManagerandMockInferenceRegistrar.Also applies to: 54-56, 63-64, 88-89
58-59: LGTM! Test contract and service manager renamed correctly.The test contract name and the service manager type have been updated from
SertnServiceManagerTestandSertnServiceManagertoInferenceServiceManagerTestandInferenceServiceManager.Also applies to: 102-102
122-124: LGTM! Getter methods renamed correctly.All references to
sertnTaskManager()andsertnRegistrar()have been updated toinferenceTaskManager()andinferenceRegistrar().Also applies to: 136-136
140-140: LGTM! Error selectors updated consistently.All error selector references have been updated from
ISertnServiceManager.*toIInferenceServiceManager.*, including:
ZeroAddressAggregatorAlreadyExistsNotAggregatorNotTaskManagerAlso applies to: 161-161, 180-180, 189-189, 217-217, 270-270, 290-290, 317-317, 341-341, 381-381
256-256: LGTM! Mock call signature updated.The mock call signature has been correctly updated from
sertnServiceManager()toinferenceServiceManager().contracts/src/InferenceTaskManager.sol (4)
14-20: LGTM! Contract and interface imports renamed correctly.The contract declaration and all interface imports have been consistently updated:
InferenceTaskManagerimplementsIInferenceTaskManager- Imports for
IInferenceServiceManager,IInferenceTaskManager,IInferenceNodesManager, andInferenceNodesManagerare correctAlso applies to: 22-22
40-41: LGTM! State variables and initialization updated correctly.All state variable declarations and initialization parameters have been renamed from
sertn*toinference*:
inferenceNodesManagerandinferenceServiceManagerstate variables- Corresponding initialization parameters and assignments
Also applies to: 45-45, 55-57, 63-65
81-81: LGTM! Service manager function calls updated correctly.All calls to the service manager have been updated to use the new
inferenceServiceManagervariable:
pullFeeFromUser()taskCompleted()slashOperator()(multiple occurrences)Also applies to: 138-143, 167-172, 176-181
262-266: LGTM! Nodes manager function calls and error references updated correctly.All calls to the nodes manager and related error references have been updated:
inferenceNodesManager.allocateFucusForTask()inferenceNodesManager.releaseFucusForTask()IInferenceTaskManager.InsufficientFucusCapacityerror referenceAlso applies to: 269-269, 286-286
contracts/test/InferenceTaskManager.t.sol (4)
12-14: LGTM! Test file imports updated correctly.All imports have been renamed from
Sertn*toInference*:
InferenceTaskManagerIInferenceTaskManagerIInferenceServiceManagerMockInferenceServiceManagerInferenceNodesManagerMockAlso applies to: 20-21
34-40: LGTM! Test contract and variables renamed correctly.The test contract and all mock variable declarations have been updated:
InferenceTaskManagerTesttest contractInferenceTaskManager taskManagervariableMockInferenceServiceManager mockServiceManagervariableInferenceNodesManagerMock mockNodesManagervariableAlso applies to: 61-62, 87-87
116-116: LGTM! Type references updated consistently throughout tests.All type references have been updated from
ISertnTaskManager.*toIInferenceTaskManager.*:
IInferenceTaskManager.Taskfor task structuresIInferenceTaskManager.TaskState.*for state enums- Helper function
_createValidTask()returnsIInferenceTaskManager.Task memoryAlso applies to: 122-122, 124-124, 141-142, 149-149, 157-157, 172-172, 199-199, 211-211, 231-231, 259-259, 291-291, 308-308, 327-327, 359-359, 403-403, 418-418, 432-434, 443-443
127-127: LGTM! Event and error selectors updated consistently.All event and error selector references have been updated from
ISertnTaskManager.*toIInferenceTaskManager.*, including:
- Events:
TaskCreated,TaskAssigned,TaskCompleted,TaskChallenged,ProofSubmitted,TaskResolved,TaskRejected- Errors:
NotAggregator,InvalidModelId,TaskDoesNotExist,NotAssignedToTask,TaskStateIncorrectAlso applies to: 130-130, 151-151, 160-160, 166-166, 179-179, 192-192, 204-204, 221-222, 239-239, 246-246, 252-252, 272-272, 284-284, 301-301, 317-318, 343-343, 375-375, 390-390, 396-396, 409-410
abis/InferenceNodesManager.abi.json (1)
1-1027: Do not rename “Fucus”—it’s intentional
“Fucus” is the camel-cased plural of FUCU (Functional Compute Unit), not a typo, and is used consistently across contracts, ABIs, tests, interfaces, and client code.Likely an incorrect or invalid review comment.
| "name": "ser", | ||
| "inputs": [], | ||
| "outputs": [ | ||
| { | ||
| "name": "", | ||
| "type": "address", | ||
| "internalType": "contract IERC20" | ||
| } | ||
| ], | ||
| "stateMutability": "view" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion | 🟠 Major
🧩 Analysis chain
Verify if "ser" function name is a rebrand remnant.
The function name ser returns an IERC20 contract and may be an abbreviation of "Sertn" that was missed during the rebrand to "Inference Network."
Verify whether this function should be renamed to align with the new branding:
🏁 Script executed:
#!/bin/bash
# Search for references to the "ser" token/function across the codebase
rg -n -C3 '\bser\b' --type=sol --type=py --type=tsLength of output: 27
🏁 Script executed:
#!/bin/bash
# Search for "ser" entry in all ABI JSON files
rg -n '"name":\s*"ser"' -g '*.json'
# Find Solidity file(s) defining the InferenceTaskManager contract
rg -l 'contract\s+InferenceTaskManager' -g '*.sol'
# Search for a function named "ser" in all Solidity sources
rg -nP 'function\s+ser\s*\(' -g '*.sol'Length of output: 192
🏁 Script executed:
#!/bin/bash
# Search for IERC20 occurrences in the InferenceTaskManager contract
rg -n 'IERC20' -C3 contracts/src/InferenceTaskManager.sol || true
# Find all functions returning IERC20
rg -nP 'function\s+\w+.*returns.*IERC20' -C3 contracts/src/InferenceTaskManager.sol || true
# Look for any occurrences of ser( in the Solidity source
rg -n 'ser\(' -C3 contracts/src/InferenceTaskManager.sol || trueLength of output: 1474
Rename public IERC20 variable ser to reflect new branding
The ABI entry ser() is the auto-generated getter for the IERC20 public ser state variable in contracts/src/InferenceTaskManager.sol (line 35); rename this variable (e.g. to inferenceToken) and update the ABI and any consumers to remove the “Sertn” remnant.
🤖 Prompt for AI Agents
In abis/InferenceTaskManager.abi.json around lines 349 to 358, the ABI exposes a
getter named "ser" (from the public IERC20 variable `ser`) which still reflects
old branding; rename the Solidity state variable (e.g., to `inferenceToken`) in
contracts/src/InferenceTaskManager.sol, update the ABI entry name from "ser" to
the new variable name and adjust any outputs/types if necessary, then update all
contract consumers (frontend, scripts, tests) to call the new getter name so the
ABI, contract code, and callers remain consistent.
| }, | ||
| { | ||
| "type": "error", | ||
| "name": "InsufficientFucusCapacity", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo in error name: "Fucus" should likely be "Focus".
The error name InsufficientFucusCapacity contains a typo. This should likely be InsufficientFocusCapacity.
Apply this diff to fix the typo:
- "name": "InsufficientFucusCapacity",
+ "name": "InsufficientFocusCapacity",Note: If "Fucus" is intentional project terminology, please disregard. However, this appears throughout multiple ABIs and is likely a systematic typo that should be corrected across the codebase.
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| "name": "InsufficientFucusCapacity", | |
| "name": "InsufficientFocusCapacity", |
🤖 Prompt for AI Agents
In abis/InferenceTaskManager.abi.json around line 677, the error name
"InsufficientFucusCapacity" contains a typo; rename it to
"InsufficientFocusCapacity" throughout this ABI file (and search/replace across
other ABI files if present) so the error identifier is correct; update any
occurrences in the file and run a quick grep/replace across the repo to fix
systematic instances, then re-run ABI validation/tests to ensure no downstream
breakages.
| }, | ||
| { | ||
| "name": "_sertnRegistrar", | ||
| "name": "_inferenceRegistrar", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion | 🟠 Major
🧩 Analysis chain
Verify this ABI file should be removed or renamed.
The ABI contents have been updated to reference Inference* types, but the filename itself is still SertnServiceManager.abi.json. Based on the PR objective to rebrand from Sertn to Inference, this file should likely be removed entirely in favor of InferenceServiceManager.abi.json.
Run the following script to check if the new Inference ABI file exists and if this Sertn file is still referenced:
Also applies to: 360-366, 373-379, 484-484
🏁 Script executed:
#!/bin/bash
# Description: Verify InferenceServiceManager.abi.json exists and check for references to SertnServiceManager.abi.json
# Check if InferenceServiceManager.abi.json exists
echo "Checking for InferenceServiceManager.abi.json:"
fd -t f "InferenceServiceManager.abi.json" abis/
# Check for any code references to SertnServiceManager.abi.json
echo -e "\nChecking for references to SertnServiceManager.abi.json:"
rg -n "SertnServiceManager\.abi\.json"
# List all ABI files to see what's present
echo -e "\nAll ABI files:"
fd -t f "\.abi\.json$" abis/ | sortLength of output: 590
Remove deprecated ABI file SertnServiceManager.abi.json. Delete abis/SertnServiceManager.abi.json; it’s fully replaced by abis/InferenceServiceManager.abi.json and no references remain.
🤖 Prompt for AI Agents
In abis/SertnServiceManager.abi.json around line 191, the file is deprecated and
should be removed because it has been fully replaced by
abis/InferenceServiceManager.abi.json; delete the entire
abis/SertnServiceManager.abi.json file from the repo and ensure no lingering
references remain (update any build/config scripts if they still list this ABI).
| "name": "", | ||
| "type": "tuple", | ||
| "internalType": "struct ISertnTaskManager.Task", | ||
| "internalType": "struct IInferenceTaskManager.Task", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion | 🟠 Major
🧩 Analysis chain
Verify filename consistency with the rebrand.
The ABI content has been updated to use IInferenceTaskManager, IInferenceServiceManager, and IInferenceNodesManager types, but the filename remains SertnTaskManager.abi.json. According to the AI summary, a new InferenceTaskManager.abi.json should be introduced in this PR.
Please confirm whether this file should be:
- Renamed to
InferenceTaskManager.abi.json - Removed in favor of a new
InferenceTaskManager.abi.json - Kept as-is for backward compatibility
Run the following script to check the ABI file structure:
Also applies to: 113-113, 150-150, 160-160, 258-258, 303-303, 336-336, 342-342, 349-349, 355-355, 482-482, 755-755
🏁 Script executed:
#!/bin/bash
# Check for Inference and Sertn ABI files to verify the rename status
echo "=== Checking for Sertn ABI files ==="
fd -e json "Sertn" abis/
echo -e "\n=== Checking for Inference ABI files ==="
fd -e json "Inference" abis/
echo -e "\n=== Content check: Verifying internal types in SertnTaskManager.abi.json ==="
rg -n "ISertn" abis/SertnTaskManager.abi.json || echo "No ISertn references found (good)"
rg -n "IInference" abis/SertnTaskManager.abi.json | head -5Length of output: 729
Rename or remove abis/SertnTaskManager.abi.json.
This file’s contents now reference IInferenceTaskManager and fully duplicate InferenceTaskManager.abi.json; either drop the obsolete SertnTaskManager.abi.json or rename it to match the new ABI.
🤖 Prompt for AI Agents
In abis/SertnTaskManager.abi.json around line 68, this ABI references
IInferenceTaskManager and fully duplicates InferenceTaskManager.abi.json; either
delete abis/SertnTaskManager.abi.json if it’s obsolete, or rename it and update
its contents to reflect the correct contract/ABI name (e.g., rename file to
InferenceTaskManager.abi.json or adjust internal names to match
SertnTaskManager) so the repo no longer contains a duplicated/misnamed ABI file.
Rebrand
SertntoInference Networkthroughout the codebaseSummary by CodeRabbit
New Features
Refactor
Documentation
Chores