minimal blockchain ever
onechain
finally has a permanent database. You can turn on/off your node.js server freely. This release contains several updates as below:
module.js
for preventing cyclic import.types.js
contains complex types like block, blockchain class and their methods.crypto.js
and utils.js
do more work.package.json
.There are some slight bugs on v2.2.0
. Actually, they are not bugs but typos about version in documents and codes. Now they are fixed. This release contains patches as below after commit @d767669 which replaces @32fc226:
In version 2.2.1 update, we do:
README.md
to v2.2.1
.package.json
and package-lock.json
to v2.2.1
.package.json
and package-lock.json
to v2.2.1
.onechain
finally has a front-end now! You can see the latest blocks and details about a specific block via blockchain explorer. This release contains several updates as below after commit @bad4575:
In version 2.2.0 update, we implement:
block/:number
API to get a details about specific block.This is the first release of onechain with several updates as below after commit @3caa23b:
In version 2.0.0 update, we implement:
addPeer
which adds a single peer.addPeer
, Introduce addPeers
which can add multiple peers at once.block body
and block header
.block header
contains index
,previous hash
,timestamp
,merkle root
, and nonce
features.block body
can contain any kind of (stringify) data.In version 2.1.0 update, we implement:
version
field into block header
for backward compatibility.package.json
.merkle root
with order in block body
.In general:
websocket
. Use >= 3.3.1 version.toUpperCase()
on every hash function's result.HTTP_PORT
to ./default
.There are some branches used for educational purpose. See the book "컴퓨터과학으로 배우는 블록체인 원리와 구현" at 위키북스.