perama-v / min-know Goto Github PK
View Code? Open in Web Editor NEWA library for TODD-compliant data
License: MIT License
A library for TODD-compliant data
License: MIT License
The data structures that min-know creates are distributable over IPFS by design (they are TODD-compliant). Currently the files are not shared over IPFS after a user obtains them.
Add the ability for a user to share over IPFS after obtaining the Chapters relevant to them.
Perhaps using: https://github.com/ferristseng/rust-ipfs-api to pin files to an existing local IPFS node.
The library is generic and when initialising a database, the spec must be provided:
let db: Todd<AAISpec> = Todd::init(data_kind, DirNature::Sample)?;
However, you are allowed to pass in a mismatched data_kind:
// Should be this:
// let data_kind = DataKind::AddressAppearanceIndex(Network::default());
// But this is permitted:
let data_kind = DataKind::NameTags
let db: Todd<AAISpec> = Todd::init(data_kind, DirNature::Sample)?;
Ideally, have the init() function derive the spec type from the data_kind enum to allow
omission of explicit typing.
let db = Todd::init(data_kind, DirNature::Sample)?;
For a publisher to build/maintain the signatures database, min-know must ingest data from a raw source. The source must
have some format.
Some more background is previously explored here: https://perama-v.github.io/ethereum/protocol/poking/part_8
Decide on a format by reviewing available raw data sources. For raw sources that do not already exist in this format, a
transformation may be applied prior to ingestion by min-know.
As previously explored: https://perama-v.github.io/ethereum/protocol/poking/part_8
Name | Entries | Interface | Repo | Database available en-masse | API available (if no DB) | Bytes per sig |
---|---|---|---|---|---|---|
Etherface | 2.2 million | https://www.etherface.io/statistics | https://github.com/volsa/etherface | ❌ ? | ✅ | 20 |
4byte | 0.5-1 million | 4byte.directory (~1M) | https://github.com/ethereum-lists/4bytes (~500K) | ✅ | ✅ | 4 |
Samczsun's Sigs | ? | https://sig.eth.samczsun.com/ | ❌ ? | ✅ | 4 | |
Topic0 | 7_800 | - | https://github.com/wmitsuda/topic0 | ✅ | N/A | 20 |
The main consideration is file format and how collisions (two strings creating same 4byte signature) are represented.
Name | Format | Comment |
---|---|---|
Etherface | (API) JSON | - |
4byte | Flat files with single string | Collisions (n=40/534574) separated with ";" |
Samczsun's Sigs | (API) JSON | - |
Topic0 | Flat files with single string | Collisions separated with ";" |
Hence, flat files appears to be the best raw input format. The API-based databases could be transformed into this format if that
becomes relevant.
Some sources (topic0) separate out data in to with- and without-parameter name buckets. How should this be handled when ingesting raw data into min-know.
Solidity strips out the parameter names prior to signature computation. Thus a user cannot be sure if a given set of names
is correct. If they have the source code, they can (e.g., sourcify), but then they will not need the signature database (they can compute them from the ABI they have).
Leaning toward not distinguishing between them in the database, but undecided.
The prototype is an implementation of the address appearance index specs. The specs are a specific instantiation of the more general time ordered distributable database framework. Some parts of the prototype would be common to other instantiations and could be shared.
Generalise the core functions of the prototype so that it could be used for converting and managing other databases.
Make the core functions operate on more abstract terms, following RecordKey
/RecordValue
terminology as per:
perama-v/TODD#2
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.