Giter VIP home page Giter VIP logo

activeledger's Introduction

npm version npm lerna MIT license

Activeledger

Activeledger is a powerful distributed ledger technology. Consider it as a single ledger updated simultaneously in multiple locations. As the data is written to a ledger, it is approved and confirmed by all other locations.

Installation

Please see our documentation for detailed instructions. We currently have 2 languages available.

Language
English documentation
Chinese 说明文档

Quickstart Guide

Use NPM to install the 3 main applications for running activeledger.

npm i -g @activeledger/activeledger @activeledger/activerestore @activeledger/activecore
Creating a local Activeledger testnet

Run the following command to create a 3 node local testnet.

activeledger --testnet

Activeledger Create Testnet

When the testnet has been created you can run all of them at once but running

node testnet

Alternatively you can run each instance of Activeledger independantly by navigating into the instance-x folders which have been created and running

activeledger

Activeledger Launch Testnet

Developer Tools

We have created an IDE for developers to create and manage Activeledger smart contracts across multiple networks. This IDE helps manage the private keys for developers to sign their contracts with and the namespaces their contracts will be stored under in each specific network. This tool is currently in beta but is available for Linux, Windows and OSX.

IDE User Guide | 用户指南

Activeledger IDE

IDE Download

Visit Release section

Building from source

Prerequisites

We use lerna to manage this monorepo. Make sure you have lerna installed. If you use a package manager, install lerna with that. Otherwise:

npm install --global lerna

Building

npm i
npm run setup

License

MIT

activeledger's People

Contributors

admwalker avatar chris-holdt avatar chrisholdt avatar dependabot[bot] avatar jialin-yu avatar zactredger avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

activeledger's Issues

Contract Data

This issue replaces the work done for #28.

The intention is to allow for data to be tied directly to a contract. The previous context code used other stream IDs to manage context data. This code will have a data stream directly linked to a contract, :data.
This data will be accessed using .getContractData() and .setContractData(payload).

It will be up to the contract developer to manage access to read and write this data.

Tooling: Advanced Chain Explorer

This issue looks at the creation of a more advanced chain explorer. The key driver behind this is due to frustrations with the existing DB explorer, and the lack of advanced features which would be useful to have.

This requires more thinking and discussion to properly nail down the exact functionality, however these are my initial thoughts.

It should give you a good overview of stream data, and an easy way to find specific data. This should include filtering and sorting functionality, as well as multiple defined views that show different aspects of the stored data.

Another key aspect is the ability to review the previous stream data easily, in a similar manner to blockchain explorers (e.g etherscan.io). This ties in to being able to trace streamids by clicking through transaction data. It might also be possible to apply the same functionality to stored stream data that include other streamids.

Update documentation

There are a number of items in the docs that need to be updated/fixed, this issue is to track a list of them.

  • When creating a testnet, only instance 0 has restore enabled, the intention was to improve performance.
  • The documentation talking about using the API/Activecore could be clearer

Extend the CLI

For some of the work I am doing it would be really useful to have CLI commands other than just --testnet. The primary one that comes to mind is -v/--version which shows the installed version, but also tells you that Activeledger is installed, and can be run.
It would be a good idea to come up with a few other commands before implementing this so all can be done around the same time.

Command Short Full Status Description
Testnet N/A --testnet Implemented Create a testnet of three nodes
Version -v --version Review Output the installed version
Status -s --status Review Output the status, e.g running, stopped

Contract Contexts

This issue is to discuss and track the implementation of data that is directly tied to a smart contract.

An example use case would be to allow a contract to have an "owner", functionality in the contract could then be restricted to only this owner. It should also be possible for this data to be changed. Another use case would be to store metadata specifically related to the contract, a possible use case of this being the number of transactions it has run.
This functionality should be flexible enough to allow the smart contract writers to use it as needed.

The top level functions for this will be:

  • getContextData()
  • setContextData()

To access this data, a context needs to be provided in the transaction. This will be done as follows:

{
  "$i": {
    "context":  {
        "$stream": "streamid"
    },
  },
}

Context data is tied to Stream IDs, there will be no contract default data, as that would introduce data races.
If no context is given in a transaction and a context function is called, an error should be thrown.

Tooling: Contract Compiler

Smart contracts need to be one single file to upload to the ledger. In more complex cases it is useful to be able to split one large contract out into multiple files. However, there is no easy way to get a singular contract file to upload in this case.

This issue proposes the development of a tool that can correctly bring together multiple .ts files into one single file that can be used to upload to Activeledger. It would also be useful to have the option of outputing that combined data as a base64 encoded string to be inserted straight into a transaction. That could be further extended to include a config file which has all the data needed in it to create that transaction and upload it directly.

Functionality:

  • Combine multiple .ts files into one
  • CLI flag to allow the user to set whether a single .ts file should be output - This would be used to check that a contract is being combined correctly.
  • CLI flag to allow the user to set whether a file containing the base64 encoded string should not be output (default output)
  • CLI flag to allow the user to run the full workflow of generating a combined contract, creating the relevant transaction and uploading it.
  • CLI flag to allow the user to run the workflow to the point of creating a transaction file (e.g tx.json) but not uploading it.

Version number and output

It could be useful to include a version number which is displayed in the console when starting Activeledger. This would allow users to confirm they are running a specific version of Activeledger, for example if there is a specific feature that they need.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.