{"id":21233669,"url":"https://github.com/bdr-pro/blockchain","last_synced_at":"2025-10-24T13:15:43.602Z","repository":{"id":225406025,"uuid":"764861550","full_name":"BDR-Pro/blockchain","owner":"BDR-Pro","description":"Do good, feel good. Share your computing power and help the science squad level up. 🧠🔬 while staying ghost online. 🕵️‍♂️","archived":false,"fork":false,"pushed_at":"2024-03-29T16:52:09.000Z","size":748,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-21T18:37:18.338Z","etag":null,"topics":["artificial-intelligence","blockchain","blockchain-technology","cryptocurrency","privacy"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BDR-Pro.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-02-28T21:01:24.000Z","updated_at":"2024-03-17T10:23:18.000Z","dependencies_parsed_at":"2024-03-10T02:40:24.448Z","dependency_job_id":"ad3c562c-aa87-4d45-884c-0f5ad1aa2672","html_url":"https://github.com/BDR-Pro/blockchain","commit_stats":null,"previous_names":["bdr-pro/blockchain"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BDR-Pro%2Fblockchain","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BDR-Pro%2Fblockchain/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BDR-Pro%2Fblockchain/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BDR-Pro%2Fblockchain/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BDR-Pro","download_url":"https://codeload.github.com/BDR-Pro/blockchain/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243676707,"owners_count":20329432,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["artificial-intelligence","blockchain","blockchain-technology","cryptocurrency","privacy"],"created_at":"2024-11-20T23:59:51.925Z","updated_at":"2025-10-24T13:15:43.518Z","avatar_url":"https://github.com/BDR-Pro.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🚀 Alpha Centauri Blockchain: Next-Gen Privacy is Here! 🚀\n\n## Table of Contents\n\n- [🚀 Alpha Centauri Blockchain: Next-Gen Privacy is Here! 🚀](#-alpha-centauri-blockchain-next-gen-privacy-is-here-)\n  - [Table of Contents](#table-of-contents)\n  - [Getting Your Feet Wet 🌊](#getting-your-feet-wet-)\n    - [Setup Real Quick](#setup-real-quick)\n      - [Let's Roll 🎲](#lets-roll-)\n  - [What's this? 📱](#whats-this-)\n    - [Proof of Computing](#proof-of-computing)\n    - [Keep it on the DL](#keep-it-on-the-dl)\n    - [Cash Rules](#cash-rules)\n  - [Sneak Peek Code 🕵️‍♀️](#sneak-peek-code-️️)\n    - [Dive Deeper 🤿](#dive-deeper-)\n  - [💥 Reward System🚀](#-reward-system)\n  - [Yo, What's Up With The 1 Block Reward? 🤔💸](#yo-whats-up-with-the-1-block-reward-)\n  - [Time Travel But For Crypto 🚀🕒](#time-travel-but-for-crypto-)\n  - [Treasure Hunt: Total Circulation 🏴‍☠️💰](#treasure-hunt-total-circulation-️)\n  - [Wrap It Up, Will Ya? 🎁](#wrap-it-up-will-ya-)\n  - [Holla at Us 📢](#holla-at-us-)\n  - [🚀 How The Trustless System works! 🌈](#-how-the-trustless-system-works-)\n    - [Yo, Future Blockchain Moguls! 👾](#yo-future-blockchain-moguls-)\n    - [📋 The Ultimate To-Do List](#-the-ultimate-to-do-list)\n      - [1. **Give Back to Get Ahead** 🎗️](#1-give-back-to-get-ahead-️)\n      - [2. **Set Up Your Secret Lair** 🧅](#2-set-up-your-secret-lair-)\n      - [3. **Link Up and Lock Down** 🔗🔒](#3-link-up-and-lock-down-)\n      - [4. **Receive the Digits** 💰](#4-receive-the-digits-)\n      - [5. **Make It Rain (New Funds, Who Dis?)** 💳](#5-make-it-rain-new-funds-who-dis-)\n      - [6. **Seal the Deal** ✅](#6-seal-the-deal-)\n    - [🌟 Conclusion](#-conclusion)\n  - [🚀 Proof of Computing: Get Rewarded for Flexing Your AI Muscles! 💪🤖](#-proof-of-computing-get-rewarded-for-flexing-your-ai-muscles-)\n    - [🧠 Train \\\u0026 Gain](#-train--gain)\n    - [🎓 Learning = Earning](#-learning--earning)\n    - [🎉 How It Works](#-how-it-works)\n    - [🌈 The Real MVPs](#-the-real-mvps)\n  - [How to Calculate TeraFLOPs Like a Gen Z Pro 🚀✨](#how-to-calculate-teraflops-like-a-gen-z-pro-)\n  - [What's a TeraFLOP, You Ask? 🤔💥](#whats-a-teraflop-you-ask-)\n  - [Getting the Deets (Details, obvi) 📊👀](#getting-the-deets-details-obvi-)\n    - [Step 1: Warm-Up 🏃‍♂️🔥](#step-1-warm-up-️)\n    - [Step 2: The Magic Spell 🧙‍♂️✨](#step-2-the-magic-spell-️)\n    - [Step 3: Flex 💪🌟](#step-3-flex-)\n      - [Example Output](#example-output)\n  - [Pro Tips for True Techies 🎓🚀](#pro-tips-for-true-techies-)\n  - [Conclusion: You're Now a TeraFLOP Titan 🏆✨](#conclusion-youre-now-a-teraflop-titan-)\n    - [🚀 Train Your Models Like a Boss! 📈🔥](#-train-your-models-like-a-boss-)\n  - [💎 Unleash The Power of Your Data](#-unleash-the-power-of-your-data)\n  - [🤖 What's the Deal?](#-whats-the-deal)\n  - [💻 Features That Will Make You Go \"Woah!\"](#-features-that-will-make-you-go-woah)\n  - [🚀 How to Get Started](#-how-to-get-started)\n  - [Directories](#directories)\n  - [🛠 Installation Guide (The Gen Z Way)](#-installation-guide-the-gen-z-way)\n    - [1. Getting OpenSSL (The Gatekeeper)](#1-getting-openssl-the-gatekeeper)\n    - [2. Let's Get Rusty](#2-lets-get-rusty)\n    - [3. Build and Run](#3-build-and-run)\n    - [4. install the required packages](#4-install-the-required-packages)\n    - [5. OpenSSL Dance](#5-openssl-dance)\n  - [🎉 Boom! You're Now a Rustacean-Crypto-Wizard!🧙🏼‍♂️🔮🎩🪄✨](#-boom-youre-now-a-rustacean-crypto-wizard️)\n  - [Big Update #1](#big-update-1)\n  - [Update **2**](#update-2)\n    - [\"WebSquad connects nodes using WebSocket. Ping yourself, check Tor status, and sync with peers listed in 'dns.txt'. Dive into decentralized networking! #WebSquad\"](#websquad-connects-nodes-using-websocket-ping-yourself-check-tor-status-and-sync-with-peers-listed-in-dnstxt-dive-into-decentralized-networking-websquad)\n      - [\"Connect and vibe with your digital tribe! 🌐 Our 'WebSquad' platform pings via WS, linking you to other cool WS clients. Stay synced, stay connected. #WebSquad #StayLinked\"](#connect-and-vibe-with-your-digital-tribe--our-websquad-platform-pings-via-ws-linking-you-to-other-cool-ws-clients-stay-synced-stay-connected-websquad-staylinked)\n    - [💌 Holla at Us](#-holla-at-us)\n\nYo, what’s up, fam? Welcome to the dopest blockchain on the block - **Alpha Centauri**. 🌌 Forget all that old-school balance and address nonsense. We’re here to flip the script with our unique **banknotes vibe** - think exclusive signed rewards you can flex with your private key. 🗝️💰\n\n## Getting Your Feet Wet 🌊\n\nNo Rust? No problem! Slide over to [Rust's crib](https://www.rust-lang.org/learn/get-started) to get set up. This isn't just a blockchain; it's your ticket to helping the AI fam while staying ghost online. 🕵️‍♂️\n\n### Setup Real Quick\n\nGrab the goods with:\n\n```bash\ngit clone https://github.com/BDR-Pro/blockchain.git\ncd blockchain\n```\n\nMake sure your `Cargo.toml` is popping with:\n\n```toml\nchrono = \"0.4\"\nserde = { version = \"1.0\", features = [\"derive\"] }\nsha2 = \"0.10\"\nopenssl = \"0.10\"\nserde_json = \"1.0\"\n```\n\n#### Let's Roll 🎲\n\nJump into your project space and kick it off with:\n\n```bash\ncargo run\n```\n\n## What's this? 📱\n\n### Proof of Computing\n\nDo good, feel good. Share your computing power and help the science squad level up. 🧠🔬\n\n### Keep it on the DL\n\nConnect with the crew through Tor. It's all about that stealth mode. Check the [Tor Traffic Router](https://crates.io/crates/Tor_Traffic_Router) to get the lowdown.\n\n### Cash Rules\n\n- **Big Baller**: Alpha Centauri\n- **Pocket Change**: Tensor (1 millionth of a boss Alpha Centauri)\n\n## Sneak Peek Code 🕵️‍♀️\n\nCheck this:\n\n```rust\n// Essential imports and the blueprint...\n\nfn sign(message: \u0026String) -\u003e Vec\u003cu8\u003e {\n    // Secret handshake logic...\n}\n\n#[derive(Debug, Serialize, Deserialize)]\nstruct Block {\n    // The building blocks...\n}\n\nimpl Block {\n    fn new(data: String, previous_hash: String, block_number:u64 , reward:u64) -\u003e Result\u003cBlock, \u0026'static str\u003e {\n        // Crafting the block...\n    }\n}\n\n// Dive deeper into the matrix...\n```\n\n### Dive Deeper 🤿\n\nGet nosy. Break it down. Remix it. This is your playground.\n\n## 💥 Reward System🚀\n\n## Yo, What's Up With The 1 Block Reward? 🤔💸\n\nAlright, alright, alright, let's break it down real simple. You know how in the crypto world things keep halving until they're like, super tiny? We crunched some hardcore numbers and guess what? 🧐\n\nAfter vibing through exactly **655,360 blocks**, our rewards are hitting that sweet, sweet spot of just **1 per block**. Yeah, you heard that right! But like, don't rush; this ain't happening overnight. We're talking a chill journey of about **12.47 years**. Set your calendars, folks! 📅⏳\n\n## Time Travel But For Crypto 🚀🕒\n\nWe're not just dropping numbers for the fun of it. Imagine this: every block's a 10-minute mini-party, and after 655,360 of those, bam, we land at the 1 reward station. But here's the kicker – it's gonna take us around **12.47 years**. Yeah, that's a lot of TikToks you could scroll through. 📱👀\n\n## Treasure Hunt: Total Circulation 🏴‍☠️💰\n\nNow, let's talk the big bucks, the total moolah in circulation by the time we hit the 1 per block paradise. We're looking at a whopping **102,710,272** in the vault! That's right, start dreaming of all the avocados and lattes that could buy. 🥑☕\n\n## Wrap It Up, Will Ya? 🎁\n\nSo there you have it, folks! Kick back, relax, and let the blocks roll because we're in for a long ride to 1-ville. Remember, in the crypto game, patience is more than just a virtue; it's the way to the treasure. 🏆🔑\n\nStay tuned, stay hyped, and keep those blocks stacking! 🎉🔥\n\n## Holla at Us 📢\n\nGot fire ideas? We’re all ears. Hit us up with an issue or slide into our DMs with a pull request. Let’s skyrocket Alpha Centauri to the moon! 🌕🚀\n\n## 🚀 How The Trustless System works! 🌈\n\n### Yo, Future Blockchain Moguls! 👾\n\nWanna dive into the wild world of crypto donations, onion servers, and making bank (securely)? Buckle up, 'cause we're spilling the tea on how to get your digital wallets thicc while supporting science. Let's get this bread, but like, responsibly. 🍞💸\n\n### 📋 The Ultimate To-Do List\n\n#### 1. **Give Back to Get Ahead** 🎗️\n\n- Wanna train your model? Cool, but let's not forget the little guys. Pledge **10% of today's reward** to the science research labs on the blockchain. It's like tipping your barista, but for brainiacs.\n- The donation percentage, such as **10%**, varies based on the **teraFLOPs** required for successful mining operations.\n- Check out the list of eligible labs and make your donation. Remember, karma's a boomerang – what goes around, comes around!\n\n#### 2. **Set Up Your Secret Lair** 🧅\n\n- Time to go underground. Set up your `.onion` server. Yeah, it's not just for secret recipes; it's your portal to the crypto underworld.\n- Not sure how? Look up \"Setting up an onion server\" and follow the steps. It's like following a recipe, but instead of a cake, you get a secure server.\n\n#### 3. **Link Up and Lock Down** 🔗🔒\n\n- Got your `.onion` link? Sweet. Share it with your peeps who wanna send you funds. But remember, with great power comes great responsibility.\n- Keep it on the down-low. Only share with trusted contacts. We're building a trust tree here, folks.\n\n#### 4. **Receive the Digits** 💰\n\n- Once your buddy sends over their banknote serial number (aka their funds' private key), you're ready to roll.\n- This number is like the secret handshake. Treat it with respect.\n\n#### 5. **Make It Rain (New Funds, Who Dis?)** 💳\n\n- Time to generate a new pair of ECDSA (Elliptic Curve Digital Signature Algorithm) keys. It's like getting a brand-new identity, but for your wallet.\n- Sign a new message declaring the fund transfer from the old banknote to your shiny new one. It's like renewing your vows, but with money.\n\n#### 6. **Seal the Deal** ✅\n\n- Finalize the transaction. Confirm the amount transferred matches the old banknote. No bamboozles allowed.\n- Once verified, consider your purchase donezo. Congratulations, you've officially entered the crypto cool kids club.\n\n### 🌟 Conclusion\n\nWelcome to the future, where your transactions are as secure as your DMs should be. Remember, this isn't just about making money; it's about building a community, supporting science, and staying secure. So, let's get to work, but also let's keep it fun. Stay safe, stay savvy, and let's disrupt the digital world one transaction at a time. 🎉💥\n\n## 🚀 Proof of Computing: Get Rewarded for Flexing Your AI Muscles! 💪🤖\n\nYo, fam! Welcome to the future where your brainpower boosts your bank balance. Welcome to the lit side of tech – **Proof of Computing**. It’s not just about mining; it’s about shining. 💎✨\n\n### 🧠 Train \u0026 Gain\n\nForget hitting the gym; let's get those neural networks pumping! Here’s the deal:\n\n- **Train a Model, Stack that Coin**: Dive into our platform, pick a model, and start training. Your computer does the heavy lifting, and you? You just chill and watch the rewards roll in. 🏋️‍♂️💰\n\n- **Eco-Friendly Flex**: Sick of blockchain baddies wrecking the planet? Us too. Proof of Computing is all about that green energy, baby. Train models, save the world, get paid. Captain Planet would be proud. 🌍❤️\n\n### 🎓 Learning = Earning\n\n- **All the Cool Kids Are Doing It**: Jump on board with AI enthusiasts, data scientists, and the curious cats of Gen Z. Whether you’re a seasoned pro or just AI-curious, there’s room for everyone.\n\n- **Expand Your Mind and Wallet**: Every model you train helps solve real-world problems, from cracking climate change to revolutionizing medicine. And yeah, you get rewarded for it. Knowledge is power, and now, it’s also profit. 📚➡️💸\n\n### 🎉 How It Works\n\n1. **Donwload the .exe**: Grab your digital gear and download our Proof of Computing .exe. It’s like getting a backstage pass to the AI world.\n\n2. **Select Your Mission**: Choose which AI model you wanna help train. From detecting cute cats online to predicting the next big TikTok trend, we’ve got it all.\n\n3. **Let the Games Begin**: Set your computer to work. Go binge-watch your fave series, and let your PC do its thing.\n\n4. **Rewards Galore**: Done training? BOOM! Rewards land straight into your account. It’s like finding money in your other jeans, but way cooler.\n\n### 🌈 The Real MVPs\n\nAt the end of the day, it’s not just about making bank. It’s about making a difference. By contributing your computing power, you're part of something bigger – a community of do-gooders, dreamers, and data crunchers making the digital world a better place.\n\nSo, what are you waiting for? Join us, get smart, get paid, and let’s make the internet awesome together. 🚀👾\n\n## How to Calculate TeraFLOPs Like a Gen Z Pro 🚀✨\n\nHey fam! Welcome to the ultra-cool, super chill guide on calculating those big brain numbers we call TeraFLOPs. If you're diving into the deep end of AI models or just wanna flex on your tech squad, you've come to the right place. Let's decode this like we're breaking into the mainframe of the future. 🌐💻\n\n## What's a TeraFLOP, You Ask? 🤔💥\n\nA TeraFLOP (that's 'floating-point operations per second', if you wanna get all dictionary about it) is like the horsepower of your AI ride. It tells you how many trillions of math problems your computer or model can solve every second. More TeraFLOPs? More power to you – literally. We're talking mega mind speeds, people!\n\n## Getting the Deets (Details, obvi) 📊👀\n\nBefore you start, you'll need:\n\n- Your model (this ain't no fashion show – we're talking neural networks, baby!)\n- Some tools (TensorFlow, PyTorch, or whatever floats your computational boat)\n- A vibe for adventure (mandatory, no exceptions)\n\n### Step 1: Warm-Up 🏃‍♂️🔥\n\nGet your model up and running. Make sure it's trained, loaded, and ready to show off its smarts. We're about to put it to the test!\n\n### Step 2: The Magic Spell 🧙‍♂️✨\n\nIf you're using a tool like TensorFlow or something similar, there's usually a way to calculate those FLOPs. It might involve some code – don't panic! Copy-paste is your friend, and so is Google.\n\nIf you’re all about that Python life (and who isn’t?), here’s a little something you might use:\n\n```python\n# Python wizardry here\nimport tensorflow as tf\nfrom tensorflow.python.profiler.model_analyzer import profile\nfrom tensorflow.python.profiler.option_builder import ProfileOptionBuilder\n\ndef estimate_model_teraflops(model):\n  forward_pass = tf.function(model.call, input_signature=[tf.TensorSpec(shape=(1,) + model.input_shape[1:])])\n  graph_info = profile(forward_pass.get_concrete_function().graph, options=ProfileOptionBuilder.float_operation())\n  flops = graph_info.total_float_ops\n  return flops  / 10**12\n\nprint(f\"Your model is flexing with {estimate_model_teraflops(model)} TeraFLOPs!\")\n```\n\n### Step 3: Flex 💪🌟\n\nGot that number? That's how powerful your AI model is. Share it with friends, make your enemies jealous, and maybe even impress your cat with your big brain energy.\n\n#### Example Output\n\n```bash\nEpoch 1/5\n1875/1875 ━━━━━━━━━━━━━━━━━━━━ 5s 2ms/step - accuracy: 0.8798 - loss: 0.4296\nEpoch 2/5\n1875/1875 ━━━━━━━━━━━━━━━━━━━━ 3s 1ms/step - accuracy: 0.9657 - loss: 0.1165\nEpoch 3/5\n1875/1875 ━━━━━━━━━━━━━━━━━━━━ 3s 1ms/step - accuracy: 0.9788 - loss: 0.0744\nEpoch 4/5\n1875/1875 ━━━━━━━━━━━━━━━━━━━━ 4s 2ms/step - accuracy: 0.9839 - loss: 0.0540\nEpoch 5/5\n1875/1875 ━━━━━━━━━━━━━━━━━━━━ 3s 1ms/step - accuracy: 0.9875 - loss: 0.0426\n313/313 ━━━━━━━━━━━━━━━━━━━━ 0s 940us/step - accuracy: 0.9743 - loss: 0.0904\nLoss: 0.07741480320692062, Accuracy: 0.9783999919891357\nteraFLOP: 2.03452e-07\n```\n\n## Pro Tips for True Techies 🎓🚀\n\n- **Accuracy Over Speed**: Remember, more TeraFLOPs doesn't always mean smarter, just like more horsepower doesn't make you a better driver.\n- **Stay Updated**: Tech moves fast. Keep your tools and knowledge fresh to stay on top of the game.\n- **Community Is Key**: Stuck? Ask around. The internet is full of nerds (we say that lovingly) who live for this stuff.\n\n## Conclusion: You're Now a TeraFLOP Titan 🏆✨\n\nAnd that's a wrap! You've just leveled up in the tech game. Use your powers for good, keep learning, and always remember: in the world of AI, today's flex is tomorrow's old news. Stay curious, stay cool, and keep calculating those TeraFLOPs! 🌟💜\n\nPeace out, digital pioneers! Keep rocking the data wave! 🌊👩‍💻👨‍💻\n\n### 🚀 Train Your Models Like a Boss! 📈🔥\n\n## 💎 Unleash The Power of Your Data\n\nWelcome to **CryptoModelTrainer**! If you're all about that crypto life and wanna train your models like a boss – you've just found your new best friend. 🚀\n\n## 🤖 What's the Deal?\n\nWe're revolutionizing how you train your machine learning models for the crypto market. Think less hassle, more dazzle. you provide the brains (a.k.a. your Jupyter notebook), and we do the heavy lifting. It's like having your own data science squad, but cooler. 💡\n\n## 💻 Features That Will Make You Go \"Woah!\"\n\n- **Jupyter Notebook Magic**: We're all about that Python life. Just drop your notebook, and we'll handle the rest. 🐍\n- **Data Science Vibes**: Whether you're into predicting crypto trends or analyzing market data, we've got your back. 📈\n- **Slick Model Training**: Just feed us your notebook, and watch magic happen. 🧙‍♂️\n- **Speedy Results**: Get outputs faster than you can say \"Blockchain\". 🏎️💨\n- **Crystal Clear Outputs**: We keep it 100. Your results, your gains. 📊\n- **Secure \u0026 Private**: Your data is your business. We keep it locked down. 🔒\n\n## 🚀 How to Get Started\n\n-Ready to dive in? Here's how to get started:\n\n- **Step 1**: Read new_task.ipynb and understand the task.\n- **Step 2**: Write your code in the new_task.ipynb file.\n- **Step 3**: Run the mine.rs file.\n- **Step 4**: Check the output in the output.txt file.\n- **Step 5**: Celebrate your model training success! 🎉\n- **Step 6**: Share your results with the world. You're a data hero now. 🦸‍♂️\n- **Step 7**: Keep training, keep learning, and keep making the crypto world a better place. 🌍\n\n## Directories\n\n```bash\n /blockchain\n│\n├── my_keys\n│   └── {timestamp}_{blocknumber}_{reward}.pem\n│\n├── my_blocks\n│   └── {blocknumber}.json\n│\n├── my_flops\n│   └── teraflops.txt\n│\n└── my_backup\n    ├── output.txt -\u003e UUID.txt\n    └── task.py -\u003e UUID.py\n```\n\n## 🛠 Installation Guide (The Gen Z Way)\n\nWe hate boring setups, so we made this as easy as ABC. But hey, before you jump in, make sure you've got OpenSSL coz we're all about that security life. 🔒\n\n### 1. Getting OpenSSL (The Gatekeeper)\n\n- **Windows Peeps**: Grab the installer from [this link](https://slproweb.com/products/Win32OpenSSL.html). Choose the version marked 'Light' cause we like to keep it breezy. Install it and **remember the path where you put it**; you're gonna need it.\n  \n- **Mac Users**: Chill, just open your terminal and hit `brew install openssl`. Homebrew's got your back.\n\n- **Linux Gang**: You probably already have OpenSSL, but if not, `sudo apt-get install libssl-dev` (for Ubuntu) or the equivalent for your distro will sort you out.\n\n### 2. Let's Get Rusty\n\nMake sure you've got Rust installed. No? No worries:\n\n```bash\ncurl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh\n```\n\nRestart your terminal, and boom, you're in the Rust club.\n\n### 3. Build and Run\n\nNow, the moment of truth. Let's compile this masterpiece:\n\n```bash\ncargo build\n```\n\nAnd then, set the stage on fire with:\n\n```bash\ncargo run\n```\n\n### 4. install the required packages\n\n```bash\npip install tensorflow\n```\n\n### 5. OpenSSL Dance\n\nIf Rust starts asking where OpenSSL is at (like, \"Hey, I need those secure vibes\"), you tell it straight:\n\n- **Windows**: Set `OPENSSL_DIR` environment variable to your OpenSSL path.\n- **Unix-like (Mac/Linux)**: Usually chill, but if it gets fussy, export that `PKG_CONFIG_PATH` pointing to your OpenSSL lib directory.\n\n## 🎉 Boom! You're Now a Rustacean-Crypto-Wizard!🧙🏼‍♂️🔮🎩🪄✨\n\nCongrats! You've just set up **Alpha centuri**. Dive into the code, make some noise, and build something that'll make the blockchain jealous.\n\n## Big Update #1\n\n\u003e**1** add blockchain_maker as external crate\n\n```toml\n[dependencies]\nblockchain_maker = 1.1.0\n```\n\n\u003e**2** add webSocket to the project\n\n```toml\n[dependencies]\nwebsocket = \"0.22.0\"\n```\n\n\u003e**3** add cudaa.py to the project\nas another way to calculate teraflops\n\n```python\n\n# Define the CUDA kernel for matrix multiplication\n@cuda.jit\ndef matmul(A, B, C):\n    row, col = cuda.grid(2)  # Get the 2D thread indices\n    if row \u003c C.shape[0] and col \u003c C.shape[1]:\n        tmp = 0.0\n        for k in range(A.shape[1]):\n            tmp += A[row, k] * B[k, col]\n        C[row, col] = tmp\n\n```\n\n\u003e**4** add requirements.ipynb to the project just run it to install the required packages\n\n```bash\n\npython3 -m pip install -r requirements.txt\n\n```\n\n\u003e**5** add ping.py to the project to check the connection between the server and the client\n\n```python\n\n\nasync def test_ws():\n    uri = \"ws://localhost:8080\"\n    async with websockets.connect(uri) as websocket:\n        # Sending a \"ping\" message\n        await websocket.send(\"ping\")\n        print(\"\u003e ping\")\n\n        # Waiting for a response\n        response = await websocket.recv()\n        print(f\"\u003c {response}\")\n\n\n```\n\n![alt text](image.png)\n\n## Update **2**\n\n![alt text](dns.png)\n\n### \"WebSquad connects nodes using WebSocket. Ping yourself, check Tor status, and sync with peers listed in 'dns.txt'. Dive into decentralized networking! #WebSquad\"\n\n#### \"Connect and vibe with your digital tribe! 🌐 Our 'WebSquad' platform pings via WS, linking you to other cool WS clients. Stay synced, stay connected. #WebSquad #StayLinked\"\n\n1. **Start Server**: Initialize WebSocket server on port 8888.\n2. **Receive Message**: Await \"ping\" message from connected clients.\n3. **Read File**:\n   - Open `dns.txt`.\n   - Retrieve the last line (representing the latest DNS entry).\n4. **Respond to Client**:\n   - If received message is \"ping\", send back the last entry.\n   - On error (e.g., file read error), send an error message.\n5. **Loop**: Continue listening for new messages and clients.\n\n---\n\n### 💌 Holla at Us\n\nGot questions, suggestions, or just wanna chat about the meaning of life? Slide into our DMs. Let’s make magic happen together.\n\nLet’s get this computational party started! 🎉💻\n\n### WS.rs\n\n```rust\n\n// Import necessary crates and modules\nuse futures_util::{SinkExt, StreamExt};\nuse rand::thread_rng;\nuse reqwest::Client;\nuse std::error::Error as StdError;\nuse tar::Builder;\nuse tokio::{\n    fs::File as TokioFile,\n    io::AsyncWriteExt,\n    net::{TcpListener, TcpStream},\n    task,\n};\nuse tokio_socks::tcp::Socks5Stream;\nuse tokio_tungstenite::{accept_async, tungstenite::protocol::Message, WebSocketStream};\nuse url::Url;\n\n/// Downloads and synchronizes the blockchain from a random node.\n///\n/// This function reads a list of node addresses from a file, selects one at random,\n/// and initiates a synchronization request to download the blockchain.\npub async fn download_blockchain() {\n    // Implementation details...\n}\n\n/// Establishes a WebSocket connection through a SOCKS5 proxy.\n///\n/// # Arguments\n///\n/// * `target_url` - The URL of the target WebSocket server.\n///\n/// # Returns\n///\n/// A Result containing the WebSocketStream if successful, or an error otherwise.\nasync fn connect_via_socks_proxy(target_url: \u0026str) -\u003e Result\u003cWebSocketStream\u003cSocks5Stream\u003cTcpStream\u003e\u003e, Error\u003e {\n    // Implementation details...\n}\n\n/// Sends a ping message to an onion DNS service to check connectivity.\n///\n/// # Returns\n///\n/// A Result indicating success or error.\nasync fn ping_onion_dns() -\u003e Result\u003c(), Box\u003cdyn std::error::Error\u003e\u003e {\n    // Implementation details...\n}\n\n/// Saves a binary file asynchronously.\n///\n/// # Arguments\n///\n/// * `bin` - The binary content to be saved.\n///\n/// # Returns\n///\n/// A Result indicating success or error.\nasync fn save_file(bin: Vec\u003cu8\u003e) -\u003e Result\u003c(), std::io::Error\u003e {\n    // Implementation details...\n}\n\n/// Converts a usize to an i32 safely.\n///\n/// # Arguments\n///\n/// * `value` - The usize value to be converted.\n///\n/// # Returns\n///\n/// A Result containing the converted i32 value or an error if the conversion is not possible.\nfn usize_to_i32(value: Result\u003cusize, std::io::Error\u003e) -\u003e Result\u003ci32, \u0026'static str\u003e {\n    // Implementation details...\n}\n\n/// Validates and updates the local blockchain with data from a specified directory.\n///\n/// # Arguments\n///\n/// * `path` - The path to the directory containing the blockchain data to be validated and incorporated.\n///\n/// # Returns\n///\n/// A boolean indicating whether the operation was successful.\nfn create_blockchain(path: String) -\u003e bool {\n    // Implementation details...\n}\n\n/// Unzips a tar.gz file asynchronously.\n///\n/// # Returns\n///\n/// A Result indicating success or error.\nasync fn unzip_file() -\u003e Result\u003c(), std::io::Error\u003e {\n    // Implementation details...\n}\n\n/// Sends a message to a specified receiver using a WebSocket connection.\n///\n/// # Arguments\n///\n/// * `message` - The message to be sent.\n/// * `receiver` - The receiver's address.\n/// * `type_message` - The type of message to be sent.\n///\n/// # Returns\n///\n/// A string response from the receiver.\npub async fn send_a_message(message: String, receiver: String, type_message: i16) -\u003e String {\n    // Implementation details...\n}\n\n/// The main function initializes the Tor proxy and starts listening for incoming connections.\n#[tokio::main]\npub async fn main() -\u003e tokio::io::Result\u003c()\u003e {\n    // Implementation details...\n}\n\n/// Handles incoming WebSocket connections.\n///\n/// # Arguments\n///\n/// * `stream` - The TcpStream of the incoming connection.\nasync fn handle_connection(stream: tokio::net::TcpStream) {\n    // Implementation details...\n}\n\n/// Checks the blockchain for synchronization requests or updates from a node.\n///\n/// # Arguments\n///\n/// * `text` - The received text message containing the request.\n/// * `receiver` - The address of the node that sent the message.\n/// * `write` - The WebSocket write half, used to send responses.\n///\n/// # Returns\n///\n/// A Result indicating success or error.\nasync fn check_blockchain_for_the_node(text: String, receiver: String, write: WebSocketStream\u003cTcpStream\u003e) -\u003e Result\u003c(), Box\u003cdyn StdError\u003e\u003e {\n    // Implementation details...\n}\n\n/// Compresses and serializes blockchain data into a tar.gz archive.\n///\n/// # Arguments\n///\n/// * `first_block` - The first block number to include in the archive.\n/// * `last_block` - The last block number to include in the archive.\n///\n/// # Returns\n///\n/// A Result containing the binary data of the compressed archive or an error.\nfn tar_gz_your_blockchain(first_block: i32, last_block: i32) -\u003e Result\u003cVec\u003cu8\u003e, Box\u003cdyn StdError\u003e\u003e {\n    // Implementation details...\n}\n\n\n```\n\n### fully vm support\n\n```bash\n\n./send_to_vm.sh --vm_name \"YourVMName\" --snapshot_name \"YourSnapshotName\" --user \"vmUser\" --vm_ip \"vmIPAddress\" --file_to_send \"path/to/your/file\" --executable_on_vm \"/path/on/vm/yourFile\" --result_file_on_vm \"/path/on/vm/result.txt\" --result_file_on_host \"path/on/host/result.txt\"\n\n```\n\n### Make A VM\n\njsut run the following command\n\n```bash\n\n./make_a_vm.sh \n\n```\n\nfor windows users\n\n```bash\n\nmake_a_vm_windows.sh\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbdr-pro%2Fblockchain","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbdr-pro%2Fblockchain","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbdr-pro%2Fblockchain/lists"}