Git Product home page Git Product logo

digital-cash's Issues

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

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.

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.

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: 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.