The Solidity source for the two on-chain contracts that govern the DSV validator set.
These complete the validator side of the protocol and were not part of the earlier
published Powerloom protocol-contracts repository (which carries ProtocolState,
DataMarket, and the rest of the core set).
| Contract | File | Role |
|---|---|---|
PowerloomValidatorNodes |
ValidatorState.sol |
Validator node registry. Mints/burns nodes as non-transferable (soulbound) ERC-1155 tokens; manages owner/validator/signer roles; resolves signerToNodeId; handles burn + token claim. |
ValidatorPriorityAssigner |
ValidatorPriorityAssigner.sol |
Per-epoch validator priority assignment (the on-chain "sequencer election"). Enforces canValidatorSubmit (priority + submission window) for batch submission. |
Deployed addresses are in ../reference/addresses.md. The
design rationale and integration flow are described in
../vpa/multi-signer-integration.md and
../vpa/vpa-as-sequencer.md.
- Owner — token holder who owns one or more nodes (
nodeIdToOwner,userTokenIds). Controls mint, burn, and operator assignment; receives claimable tokens after burn. - Validator — address assigned to operate one or more nodes
(
assignValidatorToNode); one validator can operate N nodes. - Signer — address authorized to send on-chain submission transactions for a single
node (
signerToNodeId). The VPA / ProtocolState resolvenodeIdfrom the signer incanValidatorSubmit(msg.sender). Managed viaaddAuthorizedSigner/removeAuthorizedSigner.
signer (msg.sender)
└─ ValidatorState.signerToNodeId(signer) ─▶ nodeId
└─ VPA.getHistoricalPriority(dataMarket, epochId, nodeId) ─▶ priority
└─ priority + submission window ─▶ canValidatorSubmit == true
ProtocolState.submitSubmissionBatch calls
ValidatorPriorityAssigner.canValidatorSubmit(dataMarket, epochId, msg.sender), which
resolves the signer to a node, checks the assigned priority for that epoch, and verifies
the current time falls inside that priority's submission window
(preSubmissionWindow → p1SubmissionWindow → staggered pNSubmissionWindow per
priority).
These files are published as source artifacts, not as a standalone compilable project. To compile, place them alongside the rest of the protocol contracts:
ValidatorPriorityAssigner.solimports./DataMarket.soland./ValidatorState.sol.DataMarket.sol(andProtocolState.sol) are in the published Powerloom protocol contracts repository under github.com/powerloom.- Both use OpenZeppelin upgradeable contracts (
@openzeppelin/contracts-upgradeable) and are deployed behind UUPS proxies. - Solidity
0.8.24.
SPDX-License-Identifier: MIT (as declared in each file). Note this differs from the
CC BY 4.0 license that covers the prose documentation in this repository.