justinmoon / digital-cash Goto Github PK
View Code? Open in Web Editor NEWA hands-on tutorial about building digital cash (Bitcoin)
Home Page: https://buidlbootcamp.com/
A hands-on tutorial about building digital cash (Bitcoin)
Home Page: https://buidlbootcamp.com/
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
2 problems.
The code in the video has a try/except block which silently eats errors. Happens around 1:52:00 of video
This isn't how the code works in the "canonical video"
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.
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.
use python standard library
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
Steps to recreate bug:
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]
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.