{"id":21623114,"url":"https://github.com/explooosion/private-blockchain","last_synced_at":"2026-04-19T04:31:38.266Z","repository":{"id":66234099,"uuid":"142705091","full_name":"explooosion/private-blockchain","owner":"explooosion","description":"Note for private blockchain","archived":false,"fork":false,"pushed_at":"2018-07-30T00:35:54.000Z","size":9,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-24T22:11:41.558Z","etag":null,"topics":["blockchain","ethereum","f2e","geth","private","solidity","taichung"],"latest_commit_sha":null,"homepage":null,"language":null,"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/explooosion.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":"2018-07-28T19:37:42.000Z","updated_at":"2022-05-26T18:01:57.000Z","dependencies_parsed_at":"2023-02-24T01:00:55.668Z","dependency_job_id":null,"html_url":"https://github.com/explooosion/private-blockchain","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/explooosion%2Fprivate-blockchain","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/explooosion%2Fprivate-blockchain/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/explooosion%2Fprivate-blockchain/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/explooosion%2Fprivate-blockchain/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/explooosion","download_url":"https://codeload.github.com/explooosion/private-blockchain/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244287922,"owners_count":20428896,"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":["blockchain","ethereum","f2e","geth","private","solidity","taichung"],"created_at":"2024-11-25T00:11:41.737Z","updated_at":"2026-04-19T04:31:38.228Z","avatar_url":"https://github.com/explooosion.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Blockchain\n\n## Activity\n\n[台中前端社群 7/28 徹底瞭解區塊鏈 從私有鏈出發 @夢森林](https://taichung-frontend.kktix.cc/events/180728-blockchain)\n\n## Blog\n\n[BlockChain - 私有鏈建立 ( Geth \u0026 Node.js )](https://dotblogs.com.tw/explooosion/2018/07/29/172031)\n\n# Geth\n\n## Installation\n\n1. Download [Geth](https://geth.ethereum.org/downloads/)\n2. Install Geth for Windows\n\nCheck versions:\n\n```bash\ngeth -h\n```\n\n## Generate\n\n```bash\ngeth --datadir data init genesis.json\n```\n\n## Start\n\n```bash\ngeth --datadir data --networkid 123456 --rpc --rpccorsdomain \"*\" --nodiscover --rpcapi=\"db,eth,net,web3,personal\" console\n```\n\n### Create Account\n\n```bash\npersonal.newAccount()\n```\n\n```bash\npersonal.newAccount(\"123456\")\n```\n\n### View Info\n\n```\nadmin.nodeInfo\n```\n\n### Worker miner\n\n```bash\n# cpu \nminer.start(1)\n```\n\n```bash\n# failed in Windows\nminer.stop()\n```\n\n### Look up default miner account\n\n```bash\neth.coinbase\n```\n\n### Change default miner\n\n```bash\nminer.setEtherbase(eth.accounts[1])\n```\n\nOr set by address:\n\n```bash\nminer.setEtherbase(\"0x5de1753525553737be6b17cec3451d548dbdfdb4\")\n```\n\n### Look up Account address\n\n```bash\neth.accounts[0]\n```\n\n### Look up Account money\n\n```bash\neth.getBalance(eth.accounts[0])\n```\n\nOr:\n\n```bash\nweb3.fromWei(eth.getBalance(eth.accounts[0]), \"ether\")\n```\n\n### Unlock Account (before using money)\n\n```bash\npersonal.unlockAccount(eth.accounts[0])\n```\n\n### Transfer money\n\n```bash\neth.sendTransaction({from:eth.accounts[0],to:\"0x1222ca94a9064039ac2e892d2ee7ecf955019c0b\",value:web3.toWei(3,\"ether\")})\n```\n\nOr:\n\n```bash\neth.sendTransaction({from:eth.accounts[0],to:eth.accounts[1],value:web3.toWei(3,\"ether\")})\n```\n\nTransaction status\n\n```bash\ntxpool.status\n```\n\n### Look up block info\n\n```bash\neth.blockNumber\n```\n\n```bash\neth.getTransaction(\"0x0c59f431068937cbe9e230483bc79f59bd7146edc8ff5ec37fea6710adcab825\")\n```\n\n```bash\neth.getBlock(1)\n```\n\n# eth-netstats (Dashboard View)\n\nEthereum Network Stats [https://ethstats.net/](https://github.com/cubedro/eth-netstats).\n\n## Installation\n\n### Clone project\n\n```bash\ngit clone https://github.com/cubedro/eth-netstats.git\n```\n\n```bash\ncd eth-netstats\n```\n\n```bash\nnpm install\n```\n\n### Install grunt-tool\n\n```bash\nnpm install -g grunt-cli\n```\n\n### Deploy by grunt\n\n```bash\ngrunt\n```\n\n### Websocket setting\n\nCreate file `ws_secret.json`:\n\n```json\n{\n    \"WS_SECRET\": \"update\"\n}\n```\n\n### Run server\n\n```bash\nnpm start\n```\n\n# eth-net-intelligence-api (Record Transfer)\n\nEthereum Network Intelligence API [http://tinyurl.com/ofndjbo](https://github.com/cubedro/eth-net-intelligence-api).\n\n## Installation\n\n### Clone project\n\n```bash\ngit clone https://github.com/cubedro/eth-net-intelligence-api.git\n```\n\n```bash\ncd eth-net-intelligence-api\n```\n\n```bash\nnpm install\n```\n\n### Install process manager\n\n[PM2](https://github.com/Unitech/pm2) is a Production Runtime and Process Manager for Node.js applications with a built-in Load Balancer.\n\n```bash\nnpm install -g pm2\n```\n\n### Modify app.json\n\n```json\n[\n{\n\"name\" : \"node-app\",\n\"script\" : \"app.js\",\n\"log_date_format\" : \"YYYY-MM-DD HH:mm Z\",\n\"merge_logs\" : false,\n\"watch\" : false,\n\"max_restarts\" : 10,\n\"exec_interpreter\" : \"node\",\n\"exec_mode\" : \"fork_mode\",\n\"env\":\n{\n\"NODE_ENV\" : \"production\",\n\"RPC_HOST\" : \"localhost\",\n\"RPC_PORT\" : \"8545\",\n\"LISTENING_PORT\" : \"30303\",\n\"INSTANCE_NAME\" : \"marginchain\",\n\"CONTACT_DETAILS\" : \"\",\n\"WS_SERVER\" : \"http://localhost:3000\",\n\"WS_SECRET\" : \"update\",\n\"VERBOSITY\" : 3\n}\n```\n\n### Modify lib/node.js\n\nPR from [Ensure results is always an array #242](https://github.com/cubedro/eth-net-intelligence-api/pull/242/commits/d4e2fd3999566a77019373c7556a4b282310e1fa)\n\n```js\n// var interv = {};\nvar interv = [];\n```\n\n```js\n// results = false;\nresults = [];\n```\n\n### Start server\n\nRun in current terminal.\n\n```bash\nnpm start\n```\n\nRun in background with pm2.\n\n```\npm2 start app.json\n```\n\n## Manage PM2\n\n### Look up pm2 status\n\n```bash\npm2 list\n```\n\n### Logs from pm2\n\n```bash\npm2 log\n```\n\n### Restart pm2\n\nBy name:\n\n```bash\npm2 restart node-app\n```\n\nBy id:\n\n```bash\npm2 restart 0\n```\n\n### Stop pm2\n\nBy name:\n\n```\npm2 stop node-app\n```\n\nBy id:\n\n```bash\npm2 stop 0\n```\n\n### Kill in pm2 list\n\n```bash\npm2 kill\n```\n\n# Truffle\n\nThe most popular Ethereum development framework [http://truffleframework.com](https://github.com/trufflesuite/truffle).\n\n## Installation\n\n```bash\nnpm install -g truffle\n```\n\n## Create project\n\n```bash\nmkdir hello\n```\n\n```bash\ncd hello\n```\n\n```bash\ntruffle init\n```\n\n## Contracts\n\n### Create\n\nCreate file `contracts/HelloWorld.sol`:\n\n```sol\npragma solidity ^0.4.23;\n\ncontract HelloWorld {\n\n  function sayHello() public returns (string) {\n      return (\"Hello World\");\n  }\n}\n```\n\n### Compile\n\n```bash\ntruffle compile\n```\n\nOr:\n\n```bash\ncd contracts\n```\n\n```bash\ntruffle compile\n```\n\n### Migrations\n\nCreate file `migrations/2_deploy_contracts.js`:\n\n```js\nvar HelloWorld = artifacts.require(\"HelloWorld\");\n\nmodule.exports = function (deployer) {\n    deployer.deploy(HelloWorld);\n}\n```\n\n### Setting Network\n\nModify file `truffle.js`:\n\n```js\nmodule.exports = {\n  // See \u003chttp://truffleframework.com/docs/advanced/configuration\u003e\n  // to customize your Truffle configuration!\n\n  networks: {\n    development: {\n      host: \"localhost\",\n      port: \"8545\",\n      network_id: \"*\", // Match any network id\n    },\n  },\n};\n```\n\n### Unlock Account\n\nBefore depoy contracts, we need to unlock account\n\n```bash\npersonal.unlockAccount(eth.accounts[0], \"123456\", 1500)\n```\n\nOr:\n\n```bash\npersonal.unlockAccount(eth.accounts[0])\n```\n\n### Migrate\n\nPS: **You should keep in mind before running script.**\n\n```bash\nminer.start(1)\n```\n\n### Deploy\n\n```bash\ntruffle migrate\n```\n\nOr:\n\n```bash\ncd migrations\n```\n\n```bash\ntruffle migrate\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fexplooosion%2Fprivate-blockchain","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fexplooosion%2Fprivate-blockchain","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fexplooosion%2Fprivate-blockchain/lists"}