Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
4c4d205
Merge pull request #35 from dvf/dvf/bug-fix
dvf Oct 30, 2017
5c6f510
Merge pull request #19 from rbalazs/master
dvf Nov 1, 2017
3fa90ff
Remove Type Annotations
dvf Nov 12, 2017
36572e0
Preliminary Tests
dvf Nov 12, 2017
d02ce03
Clean imports
dvf Nov 12, 2017
5d1b972
Add Travis Integration
dvf Nov 12, 2017
0a0b2a9
Travis fix
dvf Nov 12, 2017
00ca826
And again...
dvf Nov 12, 2017
c765a73
May finally be losing my mind
dvf Nov 12, 2017
ecc5883
Add Travis Icon
dvf Nov 12, 2017
db043ed
Merge pull request #41 from dvf/dvf/tests
dvf Nov 12, 2017
a864c6a
Fix major bug
dvf Nov 18, 2017
81aede2
C# Implementation
Nov 18, 2017
839fd24
Added missing comment
Nov 18, 2017
db16e16
Bug fixes, plus config driven host and port
Nov 19, 2017
4010cf3
Merge pull request #46 from davetoland/master
dvf Nov 20, 2017
3064d88
Merge branch 'master' into schemeless-url
floscha Nov 22, 2017
91126c4
Update README.md
davetoland Nov 29, 2017
877af0d
Merge branch 'master' into master
gravelcycles Jan 2, 2018
36d3016
change to user last_block instead of self.chain[-1]
Jan 11, 2018
93969fc
update Docstring for method proof_of_work, remove duplication
Jan 11, 2018
4537f59
Merge pull request #51 from davetoland/master
dvf Jan 23, 2018
bc75c76
Merge pull request #58 from shuheiktgw/change_to_use_last_block_method
dvf Jan 23, 2018
926c895
Merge branch 'master' into master
dvf Jan 23, 2018
fe6e97e
Merge pull request #18 from walkerflocker/master
dvf Jan 23, 2018
6277208
Merge pull request #59 from hasanmehmood/fix-Docstring
dvf Jan 23, 2018
a245174
Fix tests
dvf Jan 24, 2018
1ebdb59
Merge branch 'master' into master
dvf Jan 24, 2018
ffc0075
Merge pull request #11 from 2gotgrossman/master
dvf Jan 24, 2018
6650862
Merge pull request #52 from floscha/pip-requirements
dvf Jan 24, 2018
7603173
Remove type hint causing CI build to fail
floscha Jan 24, 2018
250a01c
Merge pull request #31 from floscha/schemeless-url
dvf Jan 26, 2018
b317e41
Fixed issue #65.
egglang Feb 8, 2018
a96762f
bug fix
pryanshuarora Apr 22, 2018
189ae4a
Issue #77 Fixed
pryanshuarora Apr 22, 2018
1117ae9
Merge pull request #92 from pryanshuarora/master
dvf Apr 27, 2018
79abe7c
Revert "Fixed Bug #77"
dvf Apr 27, 2018
0d9e279
Merge pull request #95 from dvf/revert-92-master
dvf Apr 27, 2018
2d99566
Merge pull request #68 from egglang/master
dvf Apr 27, 2018
28d3ee8
Update README.md
dvf Oct 13, 2018
bb067e7
Added js blockchain class
dvf May 7, 2019
a4afa98
Min JS implementation
dvf May 10, 2019
1369cac
Merge pull request #149 from dvf/dvf/js
dvf May 10, 2019
f5adb39
Update README.md
dvf Feb 16, 2021
68066d6
Update README.md
dvf Feb 16, 2021
5edd00a
Bump certifi from 2017.7.27.1 to 2022.12.7
dependabot[bot] Dec 8, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 63 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
###############################################################################
# Set default behavior to automatically normalize line endings.
###############################################################################
* text=auto

###############################################################################
# Set default behavior for command prompt diff.
#
# This is need for earlier builds of msysgit that does not have it on by
# default for csharp files.
# Note: This is only used by command line
###############################################################################
#*.cs diff=csharp

###############################################################################
# Set the merge driver for project and solution files
#
# Merging from the command prompt will add diff markers to the files if there
# are conflicts (Merging from VS is not affected by the settings below, in VS
# the diff markers are never inserted). Diff markers may cause the following
# file extensions to fail to load in VS. An alternative would be to treat
# these files as binary and thus will always conflict and require user
# intervention with every merge. To do so, just uncomment the entries below
###############################################################################
#*.sln merge=binary
#*.csproj merge=binary
#*.vbproj merge=binary
#*.vcxproj merge=binary
#*.vcproj merge=binary
#*.dbproj merge=binary
#*.fsproj merge=binary
#*.lsproj merge=binary
#*.wixproj merge=binary
#*.modelproj merge=binary
#*.sqlproj merge=binary
#*.wwaproj merge=binary

###############################################################################
# behavior for image files
#
# image files are treated as binary by default.
###############################################################################
#*.jpg binary
#*.png binary
#*.gif binary

###############################################################################
# diff behavior for common document formats
#
# Convert binary document formats to text before diffing them. This feature
# is only available from the command line. Turn it on by uncommenting the
# entries below.
###############################################################################
#*.doc diff=astextplain
#*.DOC diff=astextplain
#*.docx diff=astextplain
#*.DOCX diff=astextplain
#*.dot diff=astextplain
#*.DOT diff=astextplain
#*.pdf diff=astextplain
#*.PDF diff=astextplain
#*.rtf diff=astextplain
#*.RTF diff=astextplain
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -102,3 +102,5 @@ ENV/

# PyCharm
.idea/

node_modules/
12 changes: 12 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
language: python

python:
- 3.6
- nightly

install:
- pip install pipenv
- pipenv install --dev

script:
- pipenv run python -m unittest
162 changes: 129 additions & 33 deletions Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

32 changes: 22 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Are you looking for the source code for my book?

Please find it here: https://github.com/dvf/blockchain-book

The book is available on Amazon: https://www.amazon.com/Learn-Blockchain-Building-Understanding-Cryptocurrencies/dp/1484251709

# Learn Blockchains by Building One

[![Build Status](https://travis-ci.org/dvf/blockchain.svg?branch=master)](https://travis-ci.org/dvf/blockchain)

This is the source code for my post on [Building a Blockchain](https://medium.com/p/117428612f46).

## Installation
Expand All @@ -10,20 +18,12 @@ This is the source code for my post on [Building a Blockchain](https://medium.co
```
$ pip install pipenv
```

3. Create a _virtual environment_ and specify the Python version to use.

```
$ pipenv --python=python3.6
```

4. Install requirements.

3. Install requirements
```
$ pipenv install
```

5. Run the server:
4. Run the server:
* `$ pipenv run python blockchain.py`
* `$ pipenv run python blockchain.py -p 5001`
* `$ pipenv run python blockchain.py --port 5002`
Expand Down Expand Up @@ -53,6 +53,18 @@ $ docker run --rm -p 82:5000 blockchain
$ docker run --rm -p 83:5000 blockchain
```

## Installation (C# Implementation)

1. Install a free copy of Visual Studio IDE (Community Edition):
https://www.visualstudio.com/vs/

2. Once installed, open the solution file (BlockChain.sln) using the File > Open > Project/Solution menu options within Visual Studio.

3. From within the "Solution Explorer", right click the BlockChain.Console project and select the "Set As Startup Project" option.

4. Click the "Start" button, or hit F5 to run. The program executes in a console window, and is controlled via HTTP with the same commands as the Python version.


## Contributing

Contributions are welcome! Please feel free to submit a Pull Request.
Expand Down
Loading