Code Monkey home page Code Monkey logo

earthmind-rs's Introduction

EarthMind

A Near Native implementation of the EarthMind Protocol.

EarthMind is a protocol for decentralized governance using advanced AI and Blockchain technology to streamline governance decisions for any protocol implementing the EarthMind client contract.

Pre Requisites

  • rust:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
  • Near CLI RS
cargo install near-cli-rs
  • cargo-near
cargo install cargo-near
  • Near workspaces
cargo add near-workspaces

Getting Started

$ git clone https://github.com/Machinalabs/earthmind-rs.git

$ cargo test  # run tests

$ cargo build # build project locally

Deployment

To deploy manually, install cargo-near and run:

# Create a new account
cargo near create-dev-account

# Deploy the contract on it
cargo near deploy <account-id>

Useful Links

earthmind-rs's People

Contributors

hasselalcala avatar edsonalcala avatar

Forkers

hasselalcala

earthmind-rs's Issues

Improve data structure in registry

to access a miner (in get_register_miner) you need to iterate over the miners vector, is that the best way to do it? or should I use a hashmap?

but consider how to get all miners in the future, perhaps using events? or does near has better data structures or do we need to use a different approach to store all miners plus to access them easily...

Change log and use event logs

the contract use some logs to validate some values, change this logs to an event logs using the event.rs file

  log!(
                "Attempted to register an already registered miner: {}",
                new_miner_id
            );

Add validators top ten

Validators are allow to choose the first 10 best miners. Implement the methods to obtain the top ten of every validator, and then obtain the first 10 places

clean readme.md

To improve the readme file:

  • fix links
  • better description
  • better instructions
  • etc

Change times of consensus

The variables should be 2 minutes

COMMIT_MINER_DURATION
REVEAL_MINER_DURATION
COMMIT_VALIDATOR_DURATION
REVEAL_VALIDATOR_DURATION

This will require to check how time is handled in near

Rename test files and rename files

Reorganice the code to separate the test in the test module. For example:

  • test_events.rs
  • test_lib.rs
  • test_something.rs

Rename the files according to the near coonvention to ilustrate the files

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.