Git Product home page Git Product logo

uncletom29 / kiwi-chain Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 17 KB

A Go-based blockchain implementation featuring block creation, transaction handling, governance mechanism, zk-SNARKs privacy feature, smart contracts, IBC interoperability, and consensus algorithms. Includes automated deployment with Terraform and Ansible, and performance monitoring with Prometheus and Grafana.

License: MIT License

Dockerfile 0.48% Go 98.52% HCL 0.76% Shell 0.25%
ansible blockchain cosmos cryptography go golang governance grafana prometheus protocol rate-limiting zk-snarks consensus-algorithm distributed-systems proof-of-activity proof-of-stake proof-of-work

kiwi-chain's Introduction

Kiwi-Chain

A Go-based blockchain implementation featuring block creation, transaction handling, wallet handling, interoperability implementations, smart contracts, and consensus algorithms. Includes automated deployment with Terraform and Ansible, and performance monitoring with Prometheus and Grafana.

⚠️ Disclaimer

This code is incomplete and experimental. It is not fully tested and should not be used in a production environment. Use at your own risk.

Blockchain Functionalities

The blockchain implementation includes the following functionalities:

  • Block Creation: Each block in the blockchain contains a set of transactions, a timestamp, a reference to the previous block (PrevHash), and a unique identifier (Hash). Blocks are created and added to the blockchain as part of the consensus algorithm.

  • Transaction Handling: Transactions represent the actions performed in the blockchain network. This could be the transfer of tokens from one participant to another or the execution of a smart contract. Each transaction is validated and processed by the network nodes.

  • Smart Contracts: Smart contracts are self-executing contracts with the terms of the agreement directly written into code. They can be deployed to the blockchain and executed as part of a transaction. The smart contract code is run by every node in the blockchain, and the results of the execution are recorded on the blockchain.

  • Consensus Algorithm: The consensus algorithm is used to agree on the validity of transactions and the order of blocks in the blockchain. The consensus algorithm used is Proof of Activity (POA). This implementation allows for pluggable consensus algorithms like Proof of Work (PoW) or Proof of Stake (PoS).

  • IBC (Inter-Blockchain Communication): The blockchain supports inter-blockchain communication, allowing it to interact with other blockchains. This is achieved through a series of transactions and smart contracts that enable the secure transfer of tokens between different blockchains.

Project Structure

The project is structured into several parts:


/kiwi-chain
|-- /cmd
|   |-- main.go
|
|-- /pkg
|   |-- /block
|   |   |-- block.go
|   |
|   |-- /transaction
|   |   |-- transaction.go
|   |
|   |-- /wallet
|   |   |-- wallet.go
|   |
|   |-- /node
|   |   |-- node.go
|   |
|   |-- /ibc
|   |   |-- ibc.go
|   |
|   |-- /proposal
|   |   |-- proposal.go
|
|-- /deploy
|   |-- /terraform
|   |   |-- main.tf
|   |
|   |-- /ansible
|   |   |-- playbook.yml
|
|-- /monitoring
|   |-- /prometheus
|   |   |-- prometheus.yml
|   |
|   |-- /grafana
|   |   |-- dashboard.json
|
|-- /scripts
|   |-- start.sh
|   |-- stop.sh
|
|-- Dockerfile
|-- .gitignore
|-- README.md

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Prerequisites

  • Go 1.16 or later
  • Docker (optional)
  • Terraform (for deployment)
  • Ansible (for deployment)

Installing

Clone the repository to your local machine:

git clone https://github.com/yourusername/blockchain-project.git

Navigate to the project directory:

cd blockchain-project

Build the project:

go build -o main .

Running the Application

You can start the application with:

./main

Running in Docker

Build the Docker image:

docker build -t kiwi-chain .

Run the Docker image:

docker run -p 8080:8080 kiwi-chain

kiwi-chain's People

Contributors

uncletom29 avatar

Stargazers

 avatar

Watchers

 avatar

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.