Git Product home page Git Product logo

digital-cash's Introduction

BUIDL Bootcamp

If you're on Windows, watch this video. Otherwise:

Step 1: Git

Git is the primary collaboration software for software development -- like Google Docs for programmers.

To check whether you have it installed go to your terminal, type “git” and hit enter. If you don’t see a bunch of instructions (see pic below), you don’t have git installed and need to install Git

image

Step 2: Github

Create a GitHub account if you don’t already have one.

Step 3: Python

Go to your terminal, type “python3” and hit enter. If you don’t see a “python prompt” (see pic below) then you need to install Python 3. Hit control-d or call the python exit() function to exit.

image

Step 4: Clone the Project with Git, install dependencies, and run it

git clone https://github.com/justinmoon/digital-cash.git
cd digital-cash
python3 -m venv venv
source venv/bin/activate
python3 -m pip install -r requirements.txt
jupyter notebook

This will open up your web browser to a page that looks like the image below. This is Jupyter Notebook, which is basically a little website that’s run on only your computer.

Click the "PNGCoin Workbook.ipynb" link to follow along with this first lesson.

Using Jupyter Notebook

Check out this tutorial to learn more about using Jupyter Notebook.

If you stop Jupyter for any reason and later want to restart it:

cd digital-cash
source venv/bin/activate
jupyter notebook

digital-cash's People

Contributors

justinmoon avatar ruankranz avatar svorob avatar thestack avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

digital-cash's Issues

socket.connect(("0.0.0.0", port)) fails on Windows

2 separate reports of [WinError 10049] The requested address is not valid in its context when this is attempted.

Replacing "0.0.0.0" with "localhost" resolved the error.

I should be able to just replace this across the board because "localhost" would work just fine on Unix so long as this isn't running within docker.

PowerShell execution policy

I tested the windows instructions using PowerShell. The only hiccup was that I needed to run Set-ExecutionPolicy -ExecutionPolicy Unrestricted or the activate command would fail. One could assume that a powershell user knows how to work around this problem, but it probably wouldn't hurt to include it in the readme.

Update README

ECDSACoin: TypeError when calling get_owner function

I get the following error when I run get_owner(coin):

TypeError: unhashable type: 'VerifyingKey'

Here's a timestamp of the ECDSACoin video where the code is executed:
https://www.youtube.com/watch?v=hujedHkaxLI&feature=youtu.be&t=2578

Traceback shows it is coming from this statement:

database = {
    bob_public_key: "Bob",
    alice_public_key: "Alice",
    bank_public_key: "Bank"
}

In the Traceback it has an arrow pointing to the bank_public_key: "Bank" line, but if I comment out that line then I get the same error but the arrow points to the alice_public_key: "Alice" line. And if I comment out that one it points to bob's line.

If I try to print(public_key) It prints:

ecdsa.keys.VerifyingKey object at 0x.........>

I'm running Python 3.6.3 and encounter this error with the ECDSACoin workbook noteobook as well as the solution notebook.

I was able to finish the ECDSACoin as it doesn't actually require get_owner.

Unable to pip install -r requirements.txt with python 3.9.7 on MacOS 10.15.7

When I try to install the dependencies with pip install -r requirements.txt I get installation errors.

I've resolved a few of the dependency errors up by upgrading packages up until jupyter. There's an installation error that I can't resolve in one of the dependencies of this package.

I've also tried using pyenv to run python 3.7.X for this project but pyenv doesn't play nicely with python 3.9

Env details:
MacOS 10.15.7
python 3.9.7

ECDSACoin: get_owner doesn't work after retrieving coin from disk

Steps to recreate bug:

  1. Create a coin with Alice's public key
  2. Save to disk
  3. Retrieve coin from disk
  4. Run get_owner with that coin

This bug is fixed by serializing the keys in get_owner. See below:

def get_owner(coin):
    database = {
        serialize(bob_public_key): "Bob",
        serialize(alice_public_key): "Alice",
        serialize(bank_public_key): "Bank"
    }
    public_key = serialize(coin.transfers[-1].public_key)

    return database[public_key]

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.