Code Monkey home page Code Monkey logo

ameowcoin's Introduction

AmeowCoin [AMEOW]

AmeowCoin

Ameow is a toy cryptocurrency. It was made as a hobby project and named by its author's girlfriend.

This project doesn't aim to be a robust and full-featured cryptocurrency. I made it just to see how the technology works. You can build it, run it on some servers, mine some coins and even sends those coins to your friends. You can take a look at the source code to see what's under the hood. But in the end, it is just for fun.

By the way, 1/100,000,000 of an AMEOW is called a nekoshi.

Implementation

Many aspects of cryptocurrency have been simplified to help speeding up the development and comprehension of the project.

  • AmeowCoin uses Proof-of-Work with SHA256 as the hashing algorithm.
  • Difficulty of a block is the number of leading 0 bits in the hash.
  • Block time distance is based on block height.
  • Block reward starts at 64 AMEOW and is cut in halves every 10,000 blocks.
  • Transaction fee is fixed at 0.5 AMEOW per transaction.
  • Block has a maximum of 32 transactions.
  • Transaction has a maximum of 32 inputs.
  • Network and storage representation is JSON.
  • Blockchain conflicts are solved in a keep-it-simple-stupid way.
  • NO SECURITY.

Assemblies

Ameow

This is the core library.

Below are some notable classes and namespaces:

  • App: the application core.
  • ChainManager: the blockchain.
  • Pow: the Proof-of-Work helper class.
  • Config: coin configurations.
  • Wallet: wallet manager.
  • Network namespace: TCP communication between nodes.
  • Storage namespace: loading and storing of blocks and transactions.

AmeowCLI

The command-line interactive client.

AmeowGUI

The Windows Forms client.

Build

The project source code is written in C# 9 and built using Visual Studio 2019.

Current target framework is .NET 5, which can be downloaded from https://dotnet.microsoft.com/download.

Ameow and AmeowCLI supports: Windows, Linux, MacOS (not tested yet).

AmeowGUI supports Windows only, for obvious reasons.

Run

Seed nodes

There should be a file named peers.txt in the same directory of the executable files. This file contains addresses of seed nodes.

Sample content:

100.100.100.100:6789
200.200.200.200:6789

ameow-cli

The client support the following parameters:

  • -p or --port: port for listening to remote peers. If this parameter exists, the client will not enable interactive mode.

  • --log: log mode, accepts file (default), console and both.

Examples:

# run as a normal client with interactive prompt
./ameow-cli

# run as a node at port 6789
./ameow-cli -p 6789

# run as a node and print logs to terminal only
./ameow-cli -p 6789 --log console

When running with interactive mode, enter help for more information.

ameow-gui

Currently a very basic GUI client with only Send and Mine features. You will easily know how to use it.

Contribute

If you find something that can be fixed or improved, please feel free to open an issue or send a pull request. I will reply when I have some free time.

If you contribute code to this project, you are implicitly allowing your code to be distributed under the MIT license. You are also implicitly verifying that all code is your original work.

ameowcoin's People

Contributors

alexanderdna avatar

Watchers

James Cloos 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.