Skip to content

Lexi79Ha/indexer_project

Repository files navigation

Indexer Blockchain Project

Current working progress is in Steps directory

Key files: Extract.pynb, Translate.pynb, load_to_block_table.pynb, load_to_transaction_header_pynb

WIP: Transaction Detail Insert statements are in the process of being revised due to recent updates in Schema Design. Latest version can be found in steps < load_to_msg_tables < load_transaction_detail_msg_claim_delegate_rewards.ipynb

List of transaction types, and test block numbers for each transaction can be found in Transaction_Type_Test_Blocks.xlsx

File for ERD diagram can be found in Indexer_ERD_Diagram

Project Summary

To create a system that can extract JSON files, translate the encrypted transactions, and upload that information into a database that will act as a distributed ledger.

Steps for Project

1.Extract data

a. Pull data from API

b. Assign file names as {block#}.json and send to temp directory ("Blocks")

2.Translate Data

a. Isolate TXS data from the rest of the json file and assign it to variable "code"

b.Hash TXS data from json file using sha 256

c.Decrypt TXS data using Bay64 API

d. Move Decrypted data and hash to a new json file, named {block#}.json and send to new directory(Decrypted_files)

3.Build Schema

a.Create an ERD Diagram

b.Write a script that will generate every table need for database

4. Writing Loading Scripts

a. Loading script for Block Table

b. Loading script for Transaction header table

c. Individual loading script for every message type

How to use

Download zip file or use command prompt below

Go to Extract.py,input a test block number for claims delegations (can be found in transaction excel file), run script, json file will be sent to temp directory

Go to translate.py, input test block number,run script, hash will be generated and json file will be decoded, and the data will be sent to the decrypted file directory

Go to schema.py, run script, database will be generated

Go to load_to_block_table.py , input test block number, run script, data will be loaded to block table

Go to load_to_transaction_header.py, input test block number, run script, data will be loaded to transaction header table

Go to load_msg directory, find load_to_msg_claims_delegations, input block number, run script, data will be loaded to transaction_detail_msg_claims_delegations_table

Transaction Types

alt text

Message Types

alt text

Schema

alt text

Total Tables: 23

Table Types

1.Block Table

Consists of every transaction loaded into the system.

2.Transaction Header Table

The header table will contain overview information for each transaction.

3.Transaction Detail Tables

Each transaction detail table will contain one message type and provide more in-depth data about what occurred in its related messages.

Resources and External Tools links

a. https://fio.bloks.io/

b. https://github.com/White-Whale-Defi-Platform/migaloo-chain.git

c.https://dbdiagram.io/

d. https://inbloc.org/migaloo/transactions

Author

Alexis Harris

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published