Skip to content
This repository has been archived by the owner on Dec 14, 2023. It is now read-only.

kadaster-labs/sensrnet-sync

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

88 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SensRNet Sync Application

This is the repo for the sync component of the SensrNet application. It features a NodeJS API, for administrative purposes.

For more information see our documentation (and especially details about MultiChain).

Architecture

The component features functionality to listen and write to the Eventstore and MultiChain. This way incoming and outgoing events can be written and published to the network.

Getting Started

The stack can be ran either locally, using docker with docker-compose, or deployed on a kubernetes cluster.

Prerequisities

In order to run this application containerized, you'll need docker installed.

Modules:

  • health: Functionality to determine the application health.
  • sync:
    • checkpoint: Interface to interact with checkpoints.
    • core: Module to read and write from Eventstore and MultiChain.
    • eventstore: Interface to Eventstore.
    • multichain: Interface to MultiChain.

Usage

Standalone

Eventstore:

MongoDB:

MultiChain:

Sync App:

  • npm ci
  • npm start

Containerized

Start component: Edit the multichain details in docker-compose.yml.

$ docker-compose up --build

Bringing down:

$ docker-compose stop

Node Administration

Multichain Node

The API features functionality to retrieve the multichain blockchain address. This address can be granted permissions by different nodes in the network (e.g. send or create) using the grant API method. Nodes need at least send permissions before they can write to the blockchain network. Furthermore, the API contains functionality for creating streams and transactions, and (dis)approving smart filters. The API methods are documented following the OpenAPI specification.

Checkpoints

Eventstore and Multichain checkpoints can be retrieved and updated using the ES and MC API methods. When a checkpoint is reset to a lower value, the events with these numbers will be retrieved from either the Eventstore or Multichain, and reprocessed.

Find Us

Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

Maintainers

Should you have any questions or concerns, please reach out to one of the project's Maintainers.

License

This work is licensed under a EUPL v1.2 license.