spycblock

:octocat: :hammer: A simple Bitcoin parser to parse the raw *.dat files, and decode them into differents format :microscope: :octocat:

https://github.com/vincenzopalazzo/spycblock

Science Score: 44.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (11.1%) to scientific vocabulary

Keywords

bitcoin bitcoin-core bitcoin-development bitcoin-parser blk blk-parsing blockchain-parser blockchain-parsing
Last synced: 6 months ago · JSON representation ·

Repository

:octocat: :hammer: A simple Bitcoin parser to parse the raw *.dat files, and decode them into differents format :microscope: :octocat:

Basic Info
Statistics
  • Stars: 19
  • Watchers: 3
  • Forks: 2
  • Open Issues: 8
  • Releases: 2
Topics
bitcoin bitcoin-core bitcoin-development bitcoin-parser blk blk-parsing blockchain-parser blockchain-parsing
Created about 7 years ago · Last pushed about 3 years ago
Metadata Files
Readme Funding License Citation

README.md

GitHub Matrix

:mortar_board: SpyCBlock :microscope:

SpyCBlock is an accademics software that analyses the blk file of Bitcoin blockchain Mainet. This is an explerimental version and it wants to demostrate that it is possible to work with only file blk.

SpyCBlock is a simple parser bitcoin blk file, with this parser it is possible to do some serialization, like:

  • Serialization Transaction Graph (:heavycheckmark:);
  • Serialization complete Blockchain to JSON (:heavycheckmark:);
  • Serialization Address Graph (:warning:).

To reduce the space of serialization Transaction graph, it is possible to use the library ZLib to compress the information; with this code it is possible to uncompress the data.

```c++ void decompressFileWithZLib() { std::string filename = "YOURPATH/blkXXXXX.dat"; gzFile inFileZ = gzopen(filename.cstr(), "rb");

if(inFileZ == NULL){
    printf("Error: Failed to gzopen %s\n", filename.c_str());
    exit(0);
}
unsigned char unzipBuffer[8192];
unsigned int unzippedBytes;
std::vector<unsigned char> unzippedData;
while (true)
{
    unzippedBytes = gzread(inFileZ, unzipBuffer, 8192);
    if(unzippedBytes > 0) {
        unzippedData.insert(unzippedData.end(), unzipBuffer, unzipBuffer + unzippedBytes);
    }else{
        break;
    }
}

for(auto &character : unzippedData)
{
    if(character == '.'){
        std::cout << "\n";
    }else{
        std::cout << character;
    }
}

} ```

It Is possible to execute the parser with the library OpenMP for execution data with multi-core and this is a simple velocity benchmark.

PS: at the moment the parser uses all core of the CPU is the multicore propriety is enabled.

benchmark_image

The graph of transactions form is describe here and this is an example to visualise this with Web app, this is a simple demo.

The screenshot of transaction graph

transaction_graph

The screenshot of address graph subdivise to class (with luvain algorithm)

address_graph

:star: JSON version Bitcoin Blockchain :octocat:

Having the version of Bitcoin blockchain to JSON is powerful because it is possible to work on the JSON format, With this is possible to create easy analysis on Bitcoin network.

An example: I created a simple analysis with AnalytcsPyBlock to get informations from type of script used in the Bitcoin blockchain; this is the result and here is avaible the web version.

analisis_script

:collision: Build SpyCBlock :octocat:

Follow this guide

:running: Configure SpyCBlock :octocat:

Follow this guide

:speech_balloon: IRC channels :octocat:

  • ~IRC dev channel: #spycblock-dev :neckbeard:~

PS: The IRC channel is deprecated in favor of the matrix channel.

Cite

You can use the research work in any way you want but please cite us!

@software{Palazzo_A_simple_Bitcoin_2021, author = {Palazzo, Vincenzo and Carlo, Sartiani}, month = {12}, title = {{A simple Bitcoin parser to parse the raw data files, and decode them into differents format}}, url = {https://github.com/vincenzopalazzo/SpyCBlock}, version = {1.0.0}, year = {2021} }

:beer: Buy me a beer :beer:

:beer: 39juEyTGSNfD9JHCZdQKAjkzC3yiudce7b :beer:

Owner

  • Name: Vincenzo Palazzo
  • Login: vincenzopalazzo
  • Kind: user

Programs must be written for people to read, and only incidentally for machines to execute.

Citation (CITATION.cff)

cff-version: 1.2.0
message: "If you use this thesis in any way you want, please cite it as below."
authors:
  - family-names: Palazzo
    given-names: Vincenzo
    orcid: https://orcid.org/0000-0001-7887-6350
  - family-names: Carlo
    given-names: Sartiani
    orcid: https://orcid.org/0000-0002-6514-3569
title: "A simple Bitcoin parser to parse the raw data files, and decode them into differents format"
version: 1.0.0
date-released: 2019-12-12
url: "https://github.com/vincenzopalazzo/SpyCBlock"

GitHub Events

Total
  • Watch event: 1
Last Year
  • Watch event: 1

Committers

Last synced: about 1 year ago

All Time
  • Total Commits: 130
  • Total Committers: 1
  • Avg Commits per committer: 130.0
  • Development Distribution Score (DDS): 0.0
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Vincenzo Palazzo v****-@l****t 130
Committer Domains (Top 20 + Academic)
live.it: 1

Issues and Pull Requests

Last synced: 10 months ago

All Time
  • Total issues: 12
  • Total pull requests: 6
  • Average time to close issues: 10 days
  • Average time to close pull requests: 1 minute
  • Total issue authors: 4
  • Total pull request authors: 1
  • Average comments per issue: 0.5
  • Average comments per pull request: 0.17
  • Merged pull requests: 6
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • vincenzopalazzo (9)
  • Congyuwang (1)
  • leader0001 (1)
  • torkelrogstad (1)
Pull Request Authors
  • vincenzopalazzo (6)
Top Labels
Issue Labels
enhancement (5) good first issue (3) optimize (2) Discussion (2) doc (2) bug (2) Tracking compatibility (1) help wanted (1)
Pull Request Labels
optimize (4) enhancement (2) Discussion (1)