• Stars
    star
    118
  • Rank 299,923 (Top 6 %)
  • Language
    Go
  • License
    GNU Affero Genera...
  • Created about 2 years ago
  • Updated about 2 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Greenfield is a decentralized storage platform.

Greenfield

banner

Official Golang implementation of the Greenfield Blockchain. It uses cometbft for consensus and build on cosmos-sdk.

BNB Greenfield aims to facilitate the decentralized data economy by simplifying the process of storing and managing data access, as well as linking data ownership with the massive DeFi context of the BNB Smart Chain (BSC).

BNB Greenfield operates through three core components, which distinguish it from existing centralized and decentralized storage systems::

  • It enables Ethereum-compatible addresses to create and manage data and token assets seamlessly.
  • It natively links data permissions and management logic onto BSC as exchangeable assets and smart contract programs, thereby providing developers with a more efficient and flexible way of managing their data and permissions.
  • It provides similar API primitives and performance as popular existing Web2 cloud storage systems.

These features offer a novel and innovative approach to decentralized data management and ownership in the DeFi space. Overall, BNB Greenfield presents a promising solution for bringing greater flexibility, control, and efficiency to users in the decentralized data economy.

Disclaimer

The software and related documentation are under active development, all subject to potential future change without notification and not ready for production use. The code and security audit have not been fully completed and not ready for any bug bounty. We advise you to be careful and experiment on the network at your own risk. Stay safe out there.

Greenfield Core

The center of BNB Greenfield are two layers:

  1. A new storage-oriented blockchain, and
  2. network composed of "storage providers".

This repo is the official implementation of Greenfield blockchain.

The blockchain of BNB Greenfield serves a dual purpose of maintaining the ledger for users as well as the storage metadata as common blockchain state data. The blockchain has its native token, BNB, which is transferred from the BNB Smart Chain, and is utilized for gas and governance functionalities. Governance is further enabled through the staking logic that is unique to the BNB Greenfield blockchain.

The Greenfield blockchain has two categories of states that are stored on-chain:

  1. The ledger of accounts and their BNB balance

  2. The metadata of the object storage system and service providers, along with the metadata of the objects stored on the storage system, permission and billing information pertaining to the storage system.

Transactions on the Greenfield blockchain have the ability to modify the aforementioned on-chain states. These states and the transactions that affect them are at the core of the economic data on the BNB Greenfield platform.

Users looking to create or access data on Greenfield may do so by engaging with the BNB Greenfield Core Infrastructure through decentralized applications known as BNB Greenfield dApps. These dApps provide a user-friendly interface for interacting with the platform, enabling users to create and manipulate data in a secure and decentralized environment.

Documentation

Visit our official documentation site for more info.

Quick Started

Note: Requires Go 1.20+

## Build from source
make build

## start a private network with 3 validators and 3 storage providers
$ bash ./deployment/localup/localup.sh all  3 3

## query the key of the first validator
$ ./build/bin/gnfd keys list --home   $(pwd)/deployment/localup/.local/validator0   --keyring-backend test

## get the balance of an account
$ addr=`./build/bin/gnfd keys list --home   $(pwd)/deployment/localup/.local/validator0   --keyring-backend test|grep address|awk '{print $3}'`
$ ./build/bin/gnfd q bank balances $addr  --node tcp://127.0.0.1:26750 

## send BNB
$ ./build/bin/gnfd tx bank send validator0 0x73a4Cf67b46D7E4efbb95Fc6F59D64129299c2E3 100000000000000000000BNB --from validator0 -y --node tcp://127.0.0.1:26750 --home $(pwd)/deployment/localup/.local/validator0 --keyring-backend test  --broadcast-mode block

## stop the private chain
$ bash ./deployment/localup/localup.sh stop 

## restart the private chain
bash ./deployment/localup/localup.sh start 3 3

More advanced script and command line usage, please refer to the Tutorial.

Key Modules

  • x/bridge: provide the cross-chain token transfer function, enabling BNB to flow freely between Greenfield and BSC network with native support.
  • x/challenge: generate random data challenge events or accept user's data challenge requests.
  • x/payment: handle the billing and payment of the storage module. User fees are paid through "Stream" on Greenfield, with a constant rate of payment from users to Storage Providers (SP) with charges applied every second of usage.
  • x/sp: manage the various storage providers within the network.
  • x/storage: users can manage their storage data through this module, like create/delete bucket, create/delete storage object.
  • x/permission: user can manage its resource permission through this module, like put/delete policy for storage object.

And the following modules are in cosmos-sdk:

  • x/crosschain: manage the cross chain packages, like store/query/update the cross chain package, channels, sequences.
  • x/gashub: provide a governable and predictable fee charge mechanism.
  • x/oracle: provide a secure runtime for cross chain packages.
  • x/staking: based on the Proof-of-Stake logic. The elected validators are responsible for the security of the Greenfield blockchain. They get involved in the governance and staking of the blockchain.

Refer to the docs to dive deep into these modules.

Running node

Related Projects

Contribution

Thank you for expressing your willingness to contribute to the Greenfield source code. We deeply appreciate any help, no matter how small the fix. We welcome contributions from anyone on the internet, and we value your input.

If you're interested in contributing to Greenfield, please follow these steps:

  1. Fork the project on GitHub.
  2. Fix the issue.
  3. Commit the changes.
  4. Send a pull request for the maintainers to review and merge into the main codebase.

If you're planning to submit more complex changes, we kindly suggest that you reach out to the core developers first. This could be done through a GitHub issue or our upcoming Discord channel. By doing so, you could ensure that your changes are aligned with the project's general philosophy, and you can receive valuable feedback that will make your efforts lighter as well as our review and merge procedures quick and simple.

Once again, thank you for your willingness to contribute to the Greenfield project. We look forward to working with you!

Licence

The greenfield library (i.e. all code outside the cmd directory) is licensed under the GNU Lesser General Public License v3.0, also included in our repository in the COPYING.LESSER file.

The greenfield binaries (i.e. all code inside the cmd directory) is licensed under the GNU Affero General Public License v3.0, also included in our repository in the COPYING file.

More Repositories

1

bsc

A BNB Smart Chain client based on the go-ethereum fork
Go
2,712
star
2

whitepaper

BNB Smart Chain
1,805
star
3

tss-lib

Threshold Signature Scheme, for ECDSA and EDDSA
Go
787
star
4

bsc-genesis-contract

The genesis contracts of BNB Smart Chain.
Solidity
667
star
5

BEPs

BNB Evolution Proposals
Solidity
518
star
6

bsc-ecosystem

A guide to available tools, components, and platforms for developing applications on BSC.
457
star
7

opbnb

Go
404
star
8

javascript-sdk

Javascript SDK to communicate with BNB Beacon Chain.
TypeScript
349
star
9

bsc-snapshots

Shell
254
star
10

bnb-chain-tutorial

Detailed blockchain tutorials on BNB Chain.
JavaScript
244
star
11

zkbnb

A trustless and scaling solution for BNB Smart Chain
Go
220
star
12

greenfield-whitepaper

Whitepaper for Greenfield, the decentralized data economy
220
star
13

bnb-chain.github.io

The official documentation for BNB Chain.
HTML
203
star
14

go-sdk

Go
185
star
15

node-binary

Binaries for full nodes, light-weighted clients
Shell
179
star
16

java-sdk

Java
121
star
17

token-bind-tool

Tools and toturial for issuing BEP2 token on BNB Beacon Chain, deploying BEP20 token on BNB Smart Chain and binding the two tokens.
Go
110
star
18

bsc-relayer

An implementation of relay service to relay cross chain packages from BNB Beacon Chain to BNB Smart Chain
Go
101
star
19

node

Go
80
star
20

eth-bsc-swap-contracts

Solidity
64
star
21

reth

BSC and opBNB client based on the Reth fork
Rust
64
star
22

op-geth

Go
60
star
23

opbnb-docs

JavaScript
58
star
24

community-contributions

55
star
25

greenfield-storage-provider

Greenfield Storage Provider is a storage infrastructure for Greenfield decentralized storage platform.
Go
51
star
26

node-deploy

Shell
51
star
27

bsc-docker

Shell
48
star
28

awesome

A curated list of awesome projects in BNB Chain ecosystem
47
star
29

bsc-explorer

BNB Smart Chain Explorer based on Blockscout fork.
Elixir
43
star
30

bsc-eth-swap

Implementation of BSC and ETH swap
Go
43
star
31

tokens-info

Centralized repo for BEP2 token meta information (logo, website, social network, etc)
42
star
32

zkbnb-contract

Solidity
42
star
33

bnc-cosmos-sdk

Go
41
star
34

canonical-upgradeable-bep20

Implement upgradeable bep20 contract
Solidity
41
star
35

peg-token-stats

38
star
36

opbnb-node-docker

Shell
35
star
37

bsc-erigon

A BNB Smart Chain client based on the erigon fork
Go
32
star
38

greenfield-contracts

Smart contracts for Greenfield and BSC Cross-Chain communication.
Solidity
27
star
39

greenfield-go-sdk

Go sdk for Greenfield
Go
27
star
40

greenfield-cmd

support cmd tool for Greenfield
Go
27
star
41

greenfield-js-sdk

JS SDK for Greenfield
TypeScript
27
star
42

oracle-relayer

Oracle Relayer is responsible for relaying events of bsc to BNB Beacon Chain.
Go
27
star
43

greenfield-cosmos-sdk

A cosmos-sdk fork for greenfield
Go
26
star
44

validator-directory

validator-directory
26
star
45

greenfield-docs

The official repository for the BNB Greenfield documentation website
JavaScript
23
star
46

bsc-relayer-config

bsc-relayer cross chain protocol configuration
21
star
47

ledger-app-binance

application that enables Ledger hardware wallet to support Binance Chain.
C
21
star
48

greenfield-cometbft

Consensus layer, forked from CometBFT, for Greenfield blockchain
Go
21
star
49

zkbnb-crypto

Go
20
star
50

cplusplus-sdk

C
18
star
51

bsc-mev-info

18
star
52

greenfield-data-marketplace-frontend

Greenfield Data marketplace is a data exchange platform where users can freely create, list, trade, and sell data assets, including digital publications, scientific experimental data, and specific domain data, or even NFT can be treated as a kind of data.
TypeScript
18
star
53

cross-chain-transfer-sample

Samples for cross chain transfer between BNB Beacon Chain and BNB Smart Chain
Java
17
star
54

token-canal-project

Project Token Canal is a new initiative, similar to many existing ‘wrapped coins’ in the crypto community, Binance.com, the largest crypto token vault and exchange, will stand to issue and bind more token assets on Binance Chain, Binance Smart Chain and Ethereum, and guarantee the conversion from and to the original tokens with our own credibility and infrastructure.
Solidity
17
star
55

zkbnb-js-sdk

TypeScript
16
star
56

zkbnb-setup

MPC Ceremony Tool for Groth16 setup of zkBNB circuits
Go
16
star
57

bnc-tendermint

Go
15
star
58

bnc-tendermint-iavl

Go
14
star
59

zkbnb-smt

Go
14
star
60

greenfield-contracts-sdk

A library of smart contracts for the Greenfield
Solidity
14
star
61

zkbnb-mpc-ceremony

13
star
62

avengerdao

13
star
63

Kickstart

13
star
64

bcfusion

This is a repo that tracks the BC Fusion progress of BEP2/BEP8 asset binding
Go
13
star
65

bsc-go-client

Go
12
star
66

tss

Threshold Signature Scheme for ECDSA
Go
12
star
67

opbnb-snapshot

TypeScript
12
star
68

bep3-deputy

Go
12
star
69

zkbnb-go-sdk

Go
12
star
70

opbnb-bridge-tokens

TypeScript
11
star
71

chain-tooling

Tools and ecosystem kits
Shell
11
star
72

wallet-assets

Assets for Binance Wallet.
11
star
73

revm

Rust
11
star
74

bsc-smart-contract-tutorials

Solidity
10
star
75

zkBNB-docs

JavaScript
10
star
76

bas-genesis-config

Solidity
10
star
77

bnc-go-amino

Go
10
star
78

bsc-double-sign-sdk

This is a complementary sdk to Binance Chain go-sdk, which can be used to submit BSC double sign proof
Go
9
star
79

zkbnb-js-l1-sdk

TypeScript
8
star
80

greenfield-challenger

Off-chain data availability challenge service for Greenfield
Go
8
star
81

juno

Go
8
star
82

bep3-smartcontracts

Smart Contracts for BEP3 implementation on different blockchains.
JavaScript
8
star
83

greenfield-cometbft-db

A cometbft-db fork for greenfield
Go
8
star
84

developer-tools-list

JavaScript
7
star
85

zkbnb-reactjs-integration-example

TypeScript
7
star
86

token-recover-approver

Go
7
star
87

greenfield-python-sdk

Python
6
star
88

bas-template-bsc

Go
6
star
89

bscSetUp

Go
6
star
90

bc-snapshots

6
star
91

bsc-mev-sentry

Go
6
star
92

greenfield-data-marketplace-contracts

Greenfield-data-marketplace is a marketplace protocol for safely and efficiently buying and selling data uploaded in Greenfield.
Solidity
6
star
93

blob-hub

Go
6
star
94

Grant-projects

BNB Smart Chain development grants program
6
star
95

zkbnb-eth-rpc

Go
5
star
96

greenfield-relayer

Greenfield and BSC bidirectional cross-chain package relaying tool
Go
5
star
97

BSC-Truffle-Starter-Box

Boilerplate code for deploying smart contracts to the BNB Smart Chain network.
JavaScript
5
star
98

greenfield-bundle-sdk

Go SDK for Greenfield bundle
Go
5
star
99

BSC-State-Expiry

4
star
100

edwards25519

edwards25519
Go
4
star