New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

clerkb-lumos-integrator

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

clerkb-lumos-integrator

Integrator between clerkb and lumos

  • 0.1.2
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

clerkb

Clerkb implements Proof of Authority mechanism on Nervos CKB for layer 2 solutions. It is designed as 2 components working together:

  • 2 smart contracts used as lock scripts on CKB to validate logic on chain.
  • A TypeScript based module for integrating PoA into your generator code.

The name comes from a combination of clerk, and CKB.

Design

A PoASetup construct specifies the behavior of clerkb:

export interface PoASetup {
  identity_size: number;
  interval_uses_seconds: boolean;
  identities: Array<HexString>;
  aggregator_change_threshold: number;
  subblock_intervals: number;
  subblocks_per_interval: number;
}

One is free to specify the configurations here:

  • The number of aggregators used in PoA. Each aggregator is denoted by one entry in identitites array. Clerkb is designed to support at most 255 aggregators.
  • Each aggregator can issue layer 2 blocks(represented as CKB transactions) in its round. A round has a time limit denoted by subblocks_per_interval. The limit can be expressed either as timestamps, or block numbers.
  • identitites determine the order in which aggregator gets its round. When the round for one aggregator expires, the next aggregator denoted by identitites array gets the round. When the last aggregator in identitites expires its round, clerkb restarts with the first aggregator in identitites array.
  • Each aggregator can issue as many as subblocks_per_interval layer 2 blocks(represented as CKB transactions) in each round.
  • The contents of identitites array, are actually script hashes, or prefixes of script hashes(denoted by identity_size). Here clerkb uses the same technical as owner locks in sUDT: an aggregator can unlock a cell governed by the PoA lock, as long as current transaction has an input cell, whose lock script hash is identical to the entry specified in identitites array.

FAQs

Package last updated on 28 Dec 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc