Internal Tasks
Last updated
Last updated
The Internal Tasks provide a flexible and robust foundation for managing various operational tasks in a decentralized environment. They are executed according to the provided options.
Internal Tasks are run using the same operator set and consensus engine as the AVS utilizing pre-defined validation and execution services, while preserving the decentralized nature, reducing maintenance overhead and enhancing overall efficiency.
Internal tasks are executed by Aggregator nodes when the --internal-tasks
option is enabled.
A specialized internal task VotingPowerSyncTask
for synchronizing voting power updates and is registered as an internal task with the task definition ID 10001
.
You can use the --sync-interval <syncInterval>
flag to configure synchronization intervals.
Specify the duration in milliseconds. For example, use --sync-interval 5400000
to set the interval to 1 hour and 30 minutes (equivalent to 5,400,000 milliseconds).
Voting Power Calculation and Syncing Logic
The Voting Power Calculator is responsible for calculating the voting power of operators across Layer 1 (L1) and Layer 2 (L2) blockchains. The task logic contains fetching the voting power from both chains, computing the difference, identifying operators whose voting power has either increased or decreased.
Periodic scheduling of the voting power synchronization process.
Validation of proposed voting power updates against recalculated values.
Broadcasting results through the P2P framework.
The task logs important events, including scheduling, execution, and validation results, to facilitate debugging and monitoring.
Errors encountered during execution are logged using the Logger
service.
Validation errors are handled by comparing calculated and proposed values.