$$\ $$\ $$\ $$\ $$\ $$\ $$\ $$\
$$ | $$ | $$ |$$ | $$ | $\ $$ | $$ | $$ |
$$ | $$ | $$$$$$\ $$ |$$ | $$$$$$\ $$ |$$$\ $$ | $$$$$$\ $$ | $$$$$$\ $$$$$$$ |
$$$$$$$$ |$$ __$$\ $$ |$$ |$$ __$$\ $$ $$ $$\$$ |$$ __$$\ $$ |$$ __$$\ $$ __$$ |
$$ __$$ |$$$$$$$$ |$$ |$$ |$$ / $$ | $$$$ _$$$$ |$$ / $$ |$$ |$$ | \__|$$ / $$ |
$$ | $$ |$$ ____|$$ |$$ |$$ | $$ | $$$ / \$$$ |$$ | $$ |$$ |$$ | $$ | $$ |
$$ | $$ |\$$$$$$$\ $$ |$$ |\$$$$$$ | $$ / \$$ |\$$$$$$ |$$ |$$ | \$$$$$$$ |
\__| \__| \_______|\__|\__| \______/ \__/ \__| \______/ \__|\__| \_______|
$$\ $$$$$$\ $$\ $$\ $$$$$$\ $$$$$$\
$$ | $$ __$$\ $$ | $$ | \_$$ _| $$ __$$\
$$ / $$ / \__|$$$$$$\ $$$$$$$\$$$$$$\ $$$$$$\ $$$$$$$\$$$$$$\ $$ | $$$$$$$\ $$ / \__|$$$$$$\
$$ /$$$$$$\ $$ | $$ __$$\ $$ __$$\_$$ _| \____$$\ $$ _____\_$$ _| $$ | $$ __$$\ $$$$\ $$ __$$\
\$$< \______|$$ | $$ / $$ |$$ | $$ |$$ | $$$$$$$ |$$ / $$ | $$ | $$ | $$ |$$ _| $$ / $$ |
\$$\ $$ | $$\$$ | $$ |$$ | $$ |$$ |$$\$$ __$$ |$$ | $$ |$$\ $$ | $$ | $$ |$$ | $$ | $$ |
\$$\ \$$$$$$ \$$$$$$ |$$ | $$ |\$$$$ \$$$$$$$ |\$$$$$$$\ \$$$$ | $$$$$$\$$ | $$ |$$ | \$$$$$$ |
\__| \______/ \______/ \__| \__| \____/ \_______| \_______| \____/ \______\__| \__|\__| \______/
👋 Hi there! I'm Minh, a sophomore at the University of Information Technology, Ho Chi Minh City, Vietnam.
🔭 I'm passionate about Blockchain, especially Web3, DeFi, and Decentralized Identity. I'm also drawn to Big Data and AI.
🌱 Currently, I'm focused on Blockchain and Smart Contracts development, constantly learning and discovering.
👯 I love connecting with like-minded individuals to learn, collaborate, and grow together.
🤔 Open to new insights in Blockchain, AI, and innovative solutions. Let's connect and innovate together in the tech world!
Golang |
Python |
Solidity |
JavaScript |
TypeScript |
Node.js |
C++ |
Java |
HTML5 |
CSS |
Next.js |
Tailwind |
Express.js |
Github |
Git |
Docker |
MongoDB |
PostgreSQL |
OracleSQL |
GraphQL |
VsCode |
Vim |
Latex |
Linux |
___ ___ ___ ___ ___ ___ ___ ___ ___
/\ \ /\__\ /\ \ /\ \ /\__\ /\ \ /\__\ /\ \ ___ /\__\
/::\ \ /:/ //::\ \ /::\ \ /:/ / /::\ \ /:/ / /::\ \ /\ \ /::| |
/:/\:\ \ /:/ //:/\:\ \ /:/\:\ \ /:/__/ /:/\:\ \ /:/__/ /:/\:\ \ \:\ \ /:|:| |
/::\~\:\__\ /:/ //:/ \:\ \ /:/ \:\ \ /::\__\____ /:/ \:\ \ /::\ \ ___ /::\~\:\ \ /::\__\ /:/|:| |__
/:/\:\ \:|__|/:/__//:/__/ \:\__\/:/__/ \:\__\/:/\:::::\__\/:/__/ \:\__\/:/\:\ /\__\/:/\:\ \:\__\ __/:/\/__//:/ |:| /\__\
\:\~\:\/:/ /\:\ \\:\ \ /:/ /\:\ \ \/__/\/_|:|~~|~ \:\ \ \/__/\/__\:\/:/ /\/__\:\/:/ //\/:/ / \/__|:|/:/ /
\:\ \::/ / \:\ \\:\ /:/ / \:\ \ |:| | \:\ \ \::/ / \::/ / \::/__/ |:/:/ /
\:\/:/ / \:\ \\:\/:/ / \:\ \ |:| | \:\ \ /:/ / /:/ / \:\__\ |::/ /
\::/__/ \:\__\\::/ / \:\__\ |:| | \:\__\ /:/ / /:/ / \/__/ /:/ /
~~ \/__/ \/__/ \/__/ \|__| \/__/ \/__/ \/__/ \/__/
I am deeply passionate about the transformative potential of blockchain technology and its profound impact on the tech industry. I firmly believe that blockchain has the power to revolutionize the very fabric of the Internet, completely transforming its underlying infrastructure. What excites me most is its ability to seamlessly collaborate and integrate with other cutting-edge technologies like AI, opening up a world of possibilities.
Although blockchain is still in its early stages, reminiscent of the Internet's beginnings in the '90s, there's an incredible momentum building as more and more innovators grasp its hidden power and work tirelessly to accelerate its development. Blockchain offers us a glimpse into an extraordinary future, presenting an opportunity for us to come together and be a part of industry-wide transformation.
For those eager to delve deeper into this fascinating realm, I highly recommend "Blockchain Revolution" by Don Tapscott. It's an eye-opening read that offers profound insights into the potential and implications of blockchain technology.
/* Blockchain.hpp:
#include <vector>
#include <memory>
#ifndef Blockchain_H
#define Blockchain_H
class Node;
class Block
{
private:
std::string m_correctHash;
std::string m_prevHash; // hash of previous block in blockchain
public:
std::string m_transactionsData;
uint32_t m_timestamp;
// constructor
Block(std::string& ar_transactionData, std::string& ar_prevHash);
// empty constructor
Block();
// destructor
~Block();
friend class Blockchain;
};
class Blockchain
{
public:
std::vector<std::unique_ptr<Block>> m_chain;
std::string m_tmpTransactionsData;
uint64_t m_currentIndex = -1; // current index is also always the last index in chain (if nothing went wrong)
// constructor
Blockchain ();
// destructor
~Blockchain();
}
#endif
*/
#include <iostream>
#include <string>
#include <sstream>
#include <fstream>
#include <algorithm>
#include <iterator>
#include <vector>
#include <memory>
#include <thread>
#include <chrono>
#include <openssl/sha.h>
#include "./headers/timeutils.hpp"
#include "./headers/coinutils.hpp"
#include "./headers/Node.hpp"
#include "./headers/Blockchain.hpp"
#include "./headers/Marketplace.hpp"
// global variables
/* constants */
const uint16_t gc_NODE_COUNT = 15;
const uint16_t gc_DIFFICULTY = 1000;
const uint16_t gc_INITIAL_AMOUNT = gc_NODE_COUNT;
const uint16_t gc_MAX_TRANSACTION_DATA_SIZE_IN_BYTES = 256;
const uint32_t gc_TOTAL = 21000000;
const float gc_REWARD = 6.25;
const std::string gc_VOID_HASH = "0000000000000000000000000000000000000000000000000000000000000000";
/* non-constants */
bool g_FINISHED = 0;
float g_TRANSACTION_FEE;
float g_VALUE;
float g_BUY_VALUE;
float g_SELL_VALUE;
std::ofstream logS("./.log");
std::thread g_subsystem(update, &g_TRANSACTION_FEE, &g_VALUE, &g_BUY_VALUE, &g_SELL_VALUE, &g_FINISHED);