Ethereum Ipynb
Ethereum Ipynb
"nbformat": 4,
"nbformat_minor": 0,
"metadata": {
"colab": {
"name": "Ethereum.ipynb",
"provenance": [],
"collapsed_sections": [],
"include_colab_link": true
},
"kernelspec": {
"name": "python3",
"display_name": "Python 3"
},
"language_info": {
"name": "python"
},
"accelerator": "GPU"
},
"cells": [
{
"cell_type": "markdown",
"metadata": {
"id": "view-in-github",
"colab_type": "text"
},
"source": [
"<a href=\"https://colab.research.google.com/github/decoded-cipher/Colab-
Crypto-Mining/blob/ethereum/Ethereum.ipynb\" target=\"_parent\"><img
src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In
Colab\"/></a>"
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "_aZqpOMFJUqQ"
},
"source": [
"# **Ethereum (using EthMiner)**\n",
"\n",
"---\n",
"\n",
"* [Official Website of Ethereum](https://ethereum.org/en/)\n",
"* [My Ether Wallet Website](https://www.myetherwallet.com/) *(Register
a Ethereum wallet)*\n",
"---\n",
"Nanopool is a cryptocurrency mining pool. It allows getting 7
cryptocurrencies: Ethereum, Electroneum, Ethereum Classic, Pascal, SiaCoin, Monero,
Zcash.\n",
"* [Nanopool](https://nanopool.org/) *(Configure Nanopool)*\n",
"\n",
"---\n",
"\n",
"**You can deploy multiple Google CoLab sessions from multiple Google
Accounts and thereby arithmetically increment the Hashrate of the Mining Node.**\
n",
"\n",
"(As a single session is onle permitted by Google CoLab at a time.)\n",
"\n",
"*(Sorry to be ethically wrong here...)*"
]
},
{
"cell_type": "code",
"metadata": {
"id": "NXvuvb8WMIsy"
},
"source": [
"from IPython.display import HTML\n",
"from subprocess import getoutput\n",
"s = getoutput('nvidia-smi')\n",
"if 'K80' in s:\n",
" gpu = 'K80'\n",
"elif 'T4' in s:\n",
" gpu = 'T4'\n",
"elif 'P100' in s:\n",
" gpu = 'P100'\n",
"display(HTML(f\"<h2>{gpu}</h2>\"))\n",
"print(s)"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "markdown",
"metadata": {
"id": "TJimjwVDGkRU"
},
"source": [
"The script provides us with a glimpse of the NVDIA GPU alloted to the
Colab session:\n",
"\n",
""
]
},
{
"cell_type": "code",
"metadata": {
"id": "KveNS0_CL0Jk"
},
"source": [
"# The following command can also be used for getting the GPU details (Not
Mandatory)\n",
"!nvidia-smi -L"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "BcavhJdrFWkD"
},
"source": [
"!sudo add-apt-repository ppa:ethereum/ethereum"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "QhyVeFuEK14d"
},
"source": [
"# Concatenating sources.list with ethereum repository\n",
"!sudo cat /etc/apt/sources.list"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "kyTw_bVqK84D"
},
"source": [
"# Update entire packages thats installed\n",
"!sudo apt update"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "rkoHJDkIK_16"
},
"source": [
"# Installing Ethereum Package\n",
"!sudo apt install ethereum"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "0_7M2nIjLLKB"
},
"source": [
"# Downloading Ethminer Github Releases\n",
"!wget
https://github.com/ethereum-mining/ethminer/releases/download/v0.18.0/ethminer-
0.18.0-cuda-9-linux-x86_64.tar.gz"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "fJ5XGptcLOjZ"
},
"source": [
"#Extracting Ethimer and Changing to bin directory\n",
"%ls\n",
"!tar -zxvf ethminer-0.18.0-cuda-9-linux-x86_64.tar.gz\n",
"%cd bin/"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "X3OkYmJZLRLq"
},
"source": [
"# Exec ethminer using Pool address\n",
"!./ethminer -G -P stratum1+tcp://<YOUR_POOL_ADDRESS>@eth-
asia1.nanopool.org:9999\n",
"# %ls"
],
"execution_count": null,
"outputs": []
}
]
}