This repository hosts public information about Tierion.
All approved links to Tierion assets.
Tierion's community guidelines which govern all Tierion communities.
Tierion's community rules which is a simplified version of the Community Guidelines
Python tools for creating Merkle trees, generating Merkle proofs, and verification of Merkle proofs
License: MIT License
This repository hosts public information about Tierion.
All approved links to Tierion assets.
Tierion's community guidelines which govern all Tierion communities.
Tierion's community rules which is a simplified version of the Community Guidelines
I have successfully executed merkletools operations in normal python scripts. But when working on CGI scripts, I cant import merkletools library using from merkletools import MerkleTools
. Is there any solution for this ?
The PyPI project page for pymerkletools
currently only lists explicit supports for Python <= 3.6. More importantly, TravisCI tests currently only test pymerkletools
under Python 2.7 and 3.5. However, I can personally confirm that pymerkletools
both installs and behaves as expected under at least Python 3.7. The same probably follows for Python 3.8 as well.
Thankfully, the fix appears trivial:
.travis.yml
to guarantee compatibility: e.g.,python:
- "2.7"
- "3.5"
- "3.6"
- "3.7"
- "3.8"
setup.py
for PyPI readability: e.g., classifiers=[
"Intended Audience :: Developers",
"Intended Audience :: Education",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Topic :: Software Development :: Libraries",
"Topic :: Software Development :: Libraries :: Python Modules"
],
Thanks for all Merkle, @Tierion! You rock the Bitcoin Casbah. ๐ฅ
Greetings and cryptographic salutations. I'm currently packaging merkletools
for Gentoo and briefly faceplanted into a minor installation-time issue.
Specifically, the top-level setup.py
script erroneously installs the tests
package. This is bad โ not simply under Gentoo but under any Python environment. Why? Coupla reasons:
tests
package, no Python project would be installable. Since these packages would conflict with one another at installation time, no sane packager (e.g., pip
, easy_install
) would permit these projects to be concurrently installed.tests
package to be installed, it should probably be moved under the top-level merkletools
package (e.g., as a new merkletools.tests
subpackage).We've trivially patched this on our end. Here's how you can, too. In setup.py
:
# Replace this bad line...
packages=find_packages(),
# ...with this good line.
packages=find_packages(exclude=["tests"]),
That's it. Easy peasy. Thanks for all the fruitful Merkle trees, all! ๐ณ
How to use SHA3-HMACE for pymerkle tools ? Could you provide some code snippets.
Also How to access the siblings of the any intermediate nodes. ?
@EderSantana the package merkletools-1.0.0.tar.gz does not contain the merkletools.py file.
This line in requirements causes grief and is a bad practice because it doesn't let us use the latest pysha dependency
pysha3==1.0b1
Hello,
just came across your github while trying to implement a merkle-tree and hope you can help me get on the right track.
here is the tree how it SHOULD look like
ROOT
F F
F F 71 F
13 80 54 38 99 27 65 87
i have no idea how the get the 71 from the 99 and the 27.
i need to calculate the root only from this nowing decimals. i believe the final thing is a SHA256 hash, but i'm not pretty sure.
so whats next, i'm trying to build an implemention (based on yours) with the following features:
set the level of deep for the tree, for my example its 4 levels, with same number of leaves of each site (no uplifting)
select the hashing (MD5, SHA1, SHA256, whatever)
input the base data (for me its 13,80 for the first, 54,48 for the second, 99,27 for the third, 65,87 for the last.
calculate the tree
if you have any snippets for that it would help me really.
thanks in advance
hheileeeee
This may be a stupid question. Need some help though
I have written simple code using "merkletools" as below
import merkletools
mt = MerkleTools(hash_type="sha256")
for i in range (6):
hex_data = raw_input("Enter the hash")
mt.add_leaf(hex_data)
leaf_count = mt.get_leaf_count()
I have installed the merkletools library using
pip install merkletools
but still, I am getting an error
Traceback (most recent call last):
File "merkle_test.py", line 3, in
mt = MerkleTools(hash_type="sha256")
NameError: name 'MerkleTools' is not defined
The JS version has an add_leaves method, but this does not. We should port that as well for ease of use reasons
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.