New/Upgraded Module
The micro service ms-new-modules has a subscription to the MQTT channel heartbeat/module/new and starts processing when a new message arrives. The message contains the module_ref.
Steps¶
Metadata¶
In this step, the service will ask the node (GetModuleSource) for the WebAssembly source bytes and parse this with a WebAssembly Decoder. If this succeeds, it will proceed to extract the method names from the source bytes.
Verification¶
The final step is veryfying a module. To capture this, we’ve added a verification object:
ModuleVerification represents the verification details of a module.
Attributes:
| Name | Type | Description |
|---|---|---|
verified |
Optional[bool]
|
Indicates if the module is verified. Defaults to False. |
verification_status |
str
|
The status of the verification process. |
verification_timestamp |
Optional[datetime]
|
The timestamp when the verification was performed. Defaults to None. |
explanation |
Optional[str]
|
An optional explanation of the verification status. Defaults to None. |
build_image_used |
Optional[str]
|
The build image used during verification. Defaults to None. |
build_command_used |
Optional[str]
|
The build command used during verification. Defaults to None. |
archive_hash |
Optional[str]
|
The hash of the archive used during verification. Defaults to None. |
link_to_source_code |
Optional[str]
|
A link to the source code of the module. Defaults to None. |
source_code_at_verification_time |
Optional[str]
|
The source code at the time of verification. Defaults to None. |
Source code in .venv/lib/python3.13/site-packages/ccdexplorer/domain/mongo.py
648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 | |
Dockerfile
To facilitate the verification process, both Concordium-client and cargo Concordium (and Rust) are included in the Dockerfile.
Verification Steps¶
- Save the module to disk. Command:
module show module_ref —-out tmp/filename.out - Print build info: Command:
cargo concordium print-build-info —-module tmp/filename.out - Retrieve source from url. Use
httpxto download contents from url. - Unpack downloaded tar file to disk (module_path)
- Start verification process. Command:
cargo concordium verify-build —-module module_path - Store verification results in
modulescollection
Result¶
The result of the verification process is shown on the module page in the Explorer.