Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: bootstrap tm2demo #1105

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions gnosdk/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# GnoSDK

GnoSDK is a toolkit designed to facilitate the creation of blockchains based on [Tendermint2 (`tm2`)](../tm2) and [GnoVM](../gnovm).
It provides developers with a set of tools, libraries, and utilities to simplify the process of building and running custom blockchain solutions.

## Disclaimer

**Please note that GnoSDK is not currently the primary focus of the project and will not be completed before the launch of the Gno.land main net.**
Our priority is to ensure the successful launch of Gno.land before dedicating resources to the development of GnoSDK.

However, GnoSDK exists in the repository to serve a specific purpose.
It helps us ensure that everything we develop in `tm2` and `gnovm` is not tightly coupled to [`gno.land`](,./gno.land).
It allows us to extract valuable components from Gno.land in the future and make them more generic.

Another use case for GnoSDK is to assist in working on `tm2` parts, such as multimode or performance, within a smaller context.
By having GnoSDK, we can focus on these specific areas without the need for the entire `gno.land` infrastructure.

Lastly, GnoSDK enables us to keep `gno.land` minimal while still providing a generic helper library.
This allows us to maintain a lean and efficient codebase while providing the necessary tools for developers to build their own blockchain solutions based on `tm2` and `gnovm`.

## Features

- **Easy Integration**: GnoSDK seamlessly integrates with `tm2` and `gnovm`, allowing developers to leverage their capabilities while building their own blockchain networks.
- **Modularity**: GnoSDK follows a modular architecture, providing a collection of reusable components that can be easily customized and extended to meet specific requirements.
- **Blockchain Abstraction**: GnoSDK abstracts the complexities of blockchain development, providing high-level APIs and abstractions for common blockchain operations, such as transaction handling, consensus mechanisms, and state management.
- **Smart Contract Support**: GnoSDK includes tools and libraries for developing and deploying smart contracts, enabling developers to create decentralized applications (dApps) with ease.
- **Documentation and Examples**: GnoSDK comes with comprehensive documentation and a rich set of examples to help developers understand its usage and get started quickly.

## Getting Started

TODO
15 changes: 15 additions & 0 deletions gnosdk/cmd/democ/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# `democ` - Demo Blockchain Client

`democ` is a command-line client for interacting with the [`demod`](../demod) blockchain node.
It provides a user-friendly interface to interact with the blockchain network, submit transactions, query blockchain data, and perform various operations.

## Features

- **Transaction Submission**: allows users to create, sign, and submit transactions to the Demod blockchain network.
- **Blockchain Querying**: provides commands to query blockchain data, including blocks, transactions, and account balances.
- **Account Management**: supports account creation, importing, and management, allowing users to securely manage their blockchain identities.
- **CLI Interface**: offers a command-line interface with intuitive commands and options for easy interaction with the blockchain.

## Getting Started

TODO
9 changes: 9 additions & 0 deletions gnosdk/cmd/democ/main.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package main

// equivalent of gnokey

func main() {
// democ accounts
// democ tx {tm2.*,gnovm.*}
// democ query {tm2.*,gnovm.*}
}
16 changes: 16 additions & 0 deletions gnosdk/cmd/demod/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# `demod` - Blockchain Node

`demod` is a lightweight blockchain node implementation built using the [GnoSDK](../..) toolkit.
It serves as a demonstration of how to create a blockchain network based on [`tm2`](../../../tm2) and [`gnovm`](../../../gnovm), showcasing the capabilities and features of the GnoSDK.

## Features

- **Consensus Mechanism**: implements a consensus mechanism based on proof-of-stake on Tendermint2 (BFT) for achieving network-wide agreement on the state of the blockchain.
- **Transaction Processing**: provides transaction processing capabilities, allowing users to create, sign, and submit transactions to the blockchain network.
- **Block Validation**: validates incoming blocks to ensure the integrity and security of the blockchain.
- **Network Communication**: communicates with other nodes in the network to propagate transactions and blocks, ensuring a synchronized blockchain state.
- **API Endpoints**: exposes a set of API endpoints for interacting with the blockchain, including querying blocks, transactions, and account balances.

## Getting Started

TODO
10 changes: 10 additions & 0 deletions gnosdk/cmd/demod/main.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package main

func main() {
// genesis init
// genesis add-account
// genesis add-...
// start
// gentx
// ...
}
15 changes: 15 additions & 0 deletions gnosdk/pkg/cli/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# GnoSDK CLI

The GnoSDK CLI Library is a collection of common [GnoSDK](../..) commands and utilities designed to be used by various CLI tools within the Gno (GnoVM/TM2) ecosystems.
It aims to provide a standardized and consistent interface for interacting with GnoSDK functionality, whether in the context of blockchain-specific tools or general-purpose CLI applications.

## Features

- **Command Definitions**: includes pre-defined command definitions for common GnoSDK operations, such as transaction submission, account management, blockchain querying, but also validator coordination, genesis manipulation, and more.
- **CLI Tool Integration**: is designed to be easily integrated into existing CLI tools, allowing developers to leverage the GnoSDK commands without having to reinvent the wheel.
- **Modularity and Extensibility**: follows a modular architecture, enabling developers to extend and customize the command definitions to suit their specific needs.
- **Consistent User Experience**: CLI tools within the Gno ecosystem can provide a consistent and familiar user experience, making it easier for users to interact with GnoSDK functionality.

## Getting Started

See [demod](../../cmd/demod) and [gno](../../../gnovm/cmd/gno) for examples.
23 changes: 23 additions & 0 deletions gnosdk/pkg/genesis/doc.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// Package genesis provides tools and libraries for managing and manipulating
// genesis files within the gnoland ecosystem.
//
// Objective:
//
// Genesis aims to enhance the development of testnets and local nets, evolving
// from the basic genesis generation in gnoland main. The package enables creation,
// revision, and amalgamation of various genesis files.
//
// Philosophy:
//
// While foundational projects like gno.land, gnovm, and tm2 emphasize minimalism,
// genesis, along with `gnosdk`, caters to a wider range of advanced features.
//
// Anticipated features:
//
// - Gnotxsync Integration: Seamless integration with gnotxsync outputs.
// - Data Management: Utilities for genesis data manipulation.
// - Balance Management: Tools for balance-related tasks.
// - Automatic Balance Updates: Auto-adjust balances via gnotxsync transactions.
// - Local Development Funding: Ensures consistent funding during local dev sessions.
// - Extensibility: Designed for future features, including potential proof-of-stake tools.
package genesis