{"id":16153706,"url":"https://github.com/moneroexamples/compile-cpp-ethereum-on-arch","last_synced_at":"2025-04-06T23:41:33.957Z","repository":{"id":70343464,"uuid":"59633565","full_name":"moneroexamples/compile-cpp-ethereum-on-arch","owner":"moneroexamples","description":"Compile cpp-ethereum on Arch Linux","archived":false,"fork":false,"pushed_at":"2018-01-26T08:46:51.000Z","size":34,"stargazers_count":5,"open_issues_count":2,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-13T05:41:28.052Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/moneroexamples.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":"2016-05-25T05:31:38.000Z","updated_at":"2021-06-05T17:58:11.000Z","dependencies_parsed_at":"2023-03-13T20:24:05.882Z","dependency_job_id":null,"html_url":"https://github.com/moneroexamples/compile-cpp-ethereum-on-arch","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/moneroexamples%2Fcompile-cpp-ethereum-on-arch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moneroexamples%2Fcompile-cpp-ethereum-on-arch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moneroexamples%2Fcompile-cpp-ethereum-on-arch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moneroexamples%2Fcompile-cpp-ethereum-on-arch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/moneroexamples","download_url":"https://codeload.github.com/moneroexamples/compile-cpp-ethereum-on-arch/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247569129,"owners_count":20959758,"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":[],"created_at":"2024-10-10T01:14:14.456Z","updated_at":"2025-04-06T23:41:33.940Z","avatar_url":"https://github.com/moneroexamples.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Compile cpp-ethereum and solidity on Arch Linux\n\nThe example shows how to compile the current github version (as of 05 April 2016) of C++ version of [ethereum](http://ethereum.org/), i.e., [cpp-ethereum](https://github.com/ethereum/cpp-ethereum), on [Arch Linux](https://www.archlinux.org/).\n\n## Dependencies\nBefore proceeding with the compilation, the following packages are required:\n\n```bash\n# from Arch official repositories\nsudo pacman -Sy git base-devel cmake leveldb libmicrohttpd\n```\n\n## Compilation: cpp-ethereum\n\n```bash\n\n# clone webthree-umbrella repository \ngit clone --recursive https://github.com/ethereum/cpp-ethereum.git\n\n# enter the folder after cloning its github repository\ncd cpp-ethereum\n\n# make a build folder and enter into it\nmkdir -p build \u0026\u0026 cd build\n\n#make sure ../cpp-ethereum/build/libs has the files: libbinaryen.a, libmpir.a\n#copy these files from ../cpp-ethereum/build/deps/libs64 to ../cpp-ethereum/build/deps/lib\ncp -r deps/lib64/libbinaryen.a deps/lib/\ncp -r deps/lib64/libmpir.a deps/lib/\n\n# create build files and specify Ethereum installation folder\ncmake .. -DCMAKE_INSTALL_PREFIX=/opt/eth\n\n# compile the source code\nmake\n\n# alternatively it is possible to specify number of compilation threads\n# for example to use 4 threads execute make as follows:\n# make -j 4\n\n# install the resulting binaries, shared libraries and header files into /opt\nsudo make install\n```\n\n## Compilation: solidity\n\n```bash\n# go to your homefolder if still in ~/cpp-ethereum/build\ncd ~\n\n# clone webthree-umbrella repository \ngit clone --recursive https://github.com/ethereum/solidity.git\n\n# enter the folder after cloning its github repository\ncd solidity\n\n# make a build folder and enter into it\nmkdir -p build \u0026\u0026 cd build\n\n# create build files and specify Ethereum installation folder\ncmake .. -DCMAKE_INSTALL_PREFIX=/opt/eth\n\n# compile the source code\nmake\n\n# alternatively it is possible to specify number of compilation threads\n# for example to use 4 threads execute make as follows:\n# make -j 4\n\n# install the resulting binaries, shared libraries and header files into /opt\nsudo make install\n```\n\nAfter compilation and istallation of the cpp-ethereum and solidity, the `/opt/eth` should look as follows:\n\n```bash\n/opt/eth/\n├── bin\n│   ├── eth\n│   ├── ethminer\n│   ├── ethvm\n│   ├── lllc\n│   └── solc\n└── lib\n    ├── liblll.so\n    ├── libsoldevcore.so\n    ├── libsolevmasm.so\n    └── libsolidity.so\n```\n\n## Synchronize into Ropsten Revival testnet\n\nTo synchronize into [Ropsten Revival](https://github.com/ethereum/ropsten/blob/master/revival.md) testnet\nnetwork, the following command can be used. It is presented as an bash alias that can be \nadded you your `.bashrc` for easier use:\n\n```\n/opt/eth/bin/eth -j --rpccorsdomain \"*\" --ropsten --pin -t 1 --unsafe-transactions --peerset \"required:20c9ad97c081d63397d7b685a412227a40e23c8bdc6688c6f37e97cfbc22d2b4d1db1510d8f61e6a8866ad7f0e17c02b14182d37ea7c3c8b9c2683aeb6b733a1@52.169.14.227:30303 required:6ce05930c72abc632c58e2e4324f7c7ea478cec0ed4fa2528982cf34483094e9cbc9216e7aa349691242576d552a2a56aaeae426c5303ded677ce455ba1acd9d@13.84.180.240:30303\" --rpccorsdomain \"http://127.0.0.1:8080\" -a \"0xdf9f93fe406920ae5335021b3fc016de3ab7070e\" \n```\n\n`--unsafe-transactions` don't need to be used for synchrnonization. But later its easier to make test transactions using `geth` console. When using `mist` wallet, it does not matter.\n\n`-j --rpccorsdomain \"*\"` are for working local copy of [browser-solidity](https://github.com/ethereum/browser-solidity).\n\n`-a \"0xdf9f93fe406920ae5335021b3fc016de3ab7070e\"` is my coinbase address. You should replace it with yours when you create your first ropsten ether account.\n\n`-t 1` sets number of mining threads \n\n`--rpccorsdomain \"http://127.0.0.1:8080\"` is for when using  [browser-solidity](https://github.com/ethereum/browser-solidity). Without this there might be CORS problems connectin to your `cpp-ethereum` node.\n\n## Install geth\n\n`cpp-ethereum` does not provide console interface. To interact with the `eth` node, `geth` JavaScript console can be used.\n\n```\nsudo pacman -S geth\n```\n\nTo connect to eth node:\n\n```\n#in terminal 1: start eth node using eth alias created above\nethtestnet\n\n#in terminal 2: \ngeth attach\n```\n\nOnce connected can execute `eth.syncing` or `eth.blockNumber` to check current synchronization status.\n\n```\n\u003e eth.syncing\n{\n  currentBlock: 682915,\n  highestBlock: 688999,\n  startingBlock: 682603\n}\n\u003e eth.blockNumber\n683452\n```\n\nWhen fully sunced, mining can be started:\n\n```\nminer.start(1); // number in parenthesis does not matter.\n```\n\nCheck mining hashrate:\n\n```\n\u003e eth.mining\ntrue\n\u003e eth.hashrate\n56937\n\u003e \n```\n\nCheck if we mined something, i.e., check coinbase balance:\n\n```\n\u003e web3.fromWei(eth.getBalance(eth.coinbase))\n51.7183586\n```\n\n## Other examples\nOther examples can be found on [github](https://github.com/moneroexamples?tab=repositories).\nPlease know that some of the examples/repositories are not\nfinished and may not work as intended.\n\n## How can you help?\n\nConstructive criticism, code and website edits are always good. They can be made through github.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoneroexamples%2Fcompile-cpp-ethereum-on-arch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmoneroexamples%2Fcompile-cpp-ethereum-on-arch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoneroexamples%2Fcompile-cpp-ethereum-on-arch/lists"}