{"id":19922883,"url":"https://github.com/dltcollab/dcurl","last_synced_at":"2025-05-03T07:30:53.238Z","repository":{"id":77992710,"uuid":"116799440","full_name":"DLTcollab/dcurl","owner":"DLTcollab","description":"Hardware-accelerated Multi-threaded IOTA PoW, drop-in replacement for ccurl","archived":false,"fork":false,"pushed_at":"2021-06-11T16:40:52.000Z","size":869,"stargazers_count":41,"open_issues_count":3,"forks_count":23,"subscribers_count":11,"default_branch":"develop","last_synced_at":"2025-04-07T13:06:11.405Z","etag":null,"topics":["biilabs","fpga","iota","nonce","opencl","pearldiver","pow","simd","tangle","trytes"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DLTcollab.png","metadata":{"files":{"readme":"README.md","changelog":"changelog.hbs","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS","dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-01-09T10:07:50.000Z","updated_at":"2024-06-19T13:38:07.000Z","dependencies_parsed_at":null,"dependency_job_id":"094e253e-314c-4079-b39f-582da7776387","html_url":"https://github.com/DLTcollab/dcurl","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DLTcollab%2Fdcurl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DLTcollab%2Fdcurl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DLTcollab%2Fdcurl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DLTcollab%2Fdcurl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DLTcollab","download_url":"https://codeload.github.com/DLTcollab/dcurl/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252156788,"owners_count":21703351,"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":["biilabs","fpga","iota","nonce","opencl","pearldiver","pow","simd","tangle","trytes"],"created_at":"2024-11-12T22:12:22.330Z","updated_at":"2025-05-03T07:30:52.398Z","avatar_url":"https://github.com/DLTcollab.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# dcurl - Multi-threaded Curl implementation\n\n[![Build Status](https://badge.buildkite.com/46ec07b122bde13f984c241fe8b38e64698c5c0d816ee6c7e4.svg)](https://buildkite.com/dltcollab/dcurl-test)\n![Supported IRI version](https://img.shields.io/badge/Supported%20IRI%20Version-1.7.0-brightgreen.svg)\n![Release version](https://img.shields.io/github/release-pre/DLTcollab/dcurl.svg)\n\nHardware-accelerated implementation for IOTA PearlDiver, which utilizes multi-threaded SIMD, FPGA and GPU.\n\n## Introduction\ndcurl exploits SIMD instructions on CPU and OpenCL on GPU. Both CPU and GPU accelerations can be\nenabled in multi-threaded execuction fashion, resulting in much faster [proof-of-work (PoW) for IOTA](https://docs.iota.org/docs/the-tangle/0.1/concepts/proof-of-work).\nIn addition, dcurl supports FPGA-accelerated PoW, described in [docs/fpga-accelerator.md](docs/fpga-accelerator.md).\ndcurl can be regarded as the drop-in replacement for [ccurl](https://github.com/iotaledger/ccurl).\nIOTA Reference Implementation (IRI) adaptation is available to benefit from hardware-accelerated PoW.\n\n## Build Instructions\nCheck [docs/build-n-test.md](docs/build-n-test.md) for details.\n\n## Source Code Naming Convention\nCheck [docs/naming-convention.md](docs/naming-convention.md) for details.\n\n## Generate Document\n```\n$ make doc\n```\n\n## Performance\nAfter integrating dcurl into IRI, performance of [attachToTangle](https://docs.iota.org/docs/node-software/0.1/iri/references/api-reference#attachtotangle) is measured as the following.\n\n* Setting: MWM = 14, 200 attachToTangle API requests with each containing 2 transactions\n* Local CPU:\n  * AMD Ryzen Threadripper 2990WX 32-Core Processor \n  * 2 PoW tasks at the same time\n  * Each task uses 32 CPU threads to find nonce\n  * SIMD enabled\n* Remote worker:\n  * The board with Intel/Altera Cyclone V SoC\n  * 1 PoW task at the same time in a board\n  * FPGA acceleration enabled\n  * Connected with local network\n\n![](https://raw.githubusercontent.com/DLTcollab/dcurl/develop/docs/benchmark.png)\n\n### Conclusion\n\nExcept the original IRI, the other instances use the [DLTcollab/IRI](https://github.com/DLTcollab/iri) instead of [iotaledger/IRI](https://github.com/iotaledger/iri).\n\n| IRI version | attachToTangle API behavior | Effect |\n|:-|:-|:-|\n| IOTA IRI | One transaction bundle at the same time **(Synchronized)** | Transactions of a bundle are calculated one by one |\n| DLTCollab IRI | Multiple transaction bundles at the same time | Transactions of different bundles compete for the PoW calculation resources |\n\nThe original IRI should be the slowest one since it does not contain any PoW acceleration.\nHowever, the graph is different from the expectation.\nThis is caused by 2 factors:\n* The graph shows the execution time of each API request instead of the overall throughput.\n* The table shows that there are competition of the PoW resources, which means the execution time would be longer than expected.\n\nAnd from the graph we can see that 4 remote workers would be a good choice to accelerate PoW.\n\n## IRI Adaptation\n[Modified IRI accepting external PoW Library](https://github.com/DLTcollab/iri)\nSupported IRI version: 1.7.0\n\nLoad the external dcurl shared library from the installed JAR file\n\n* ```$ cd ~/iri \u0026\u0026 make check```\n* ```$ java -jar target/iri.jar -p \u003cport\u003e --pearldiver-exlib dcurl```\n\n## Adoptions\nHere is a partial list of open source projects that have adopted dcurl. If you\nare using dcurl and would like your projects added to the list, please send\npull requests to dcurl.\n\n1. [iota-gpu-pow](https://github.com/gagathos/iota-gpu-pow): IOTA PoW node\n* You can construct a IOTA PoW node, which uses `ccurl` by default\n* Generate a drop-in replacement for `ccurl` and acquire performance boost.\n    * ```$ make BUILD_COMPAT=1 check```\n    * ```$ cp ./build/libdcurl.so \u003ciota-gpu-pow\u003e/libccurl.so```\n\n2. [iota.keccak.pow.node.js](https://github.com/SteppoFF/iota.keccak.pow.node.js): IOTA PoW node using the iota.keccak.js implementation\n* [iota.keccak.js](https://github.com/SteppoFF/iota.keccak.js) can be used to\n  build high performance node-js spammers but is also capable of signing\n  inputs for value bundles. Using a smart implementation and remote PoW,\n  it is capable of performing \u003e 100 TPS for IRI.\n\n3. [IOTA PoW Hardware Accelerator FPGA for Raspberry Pi](https://microengineer.eu/2018/04/25/iota-pearl-diver-fpga/) took dcurl for prototyping.\n* Check [shufps/dcurl](https://github.com/shufps/dcurl) and [shufps/iota_vhdl_pow](https://github.com/shufps/iota_vhdl_pow)\n  for tracking historical changes outperforming 200x speedup than a Raspberry Pi without hardware hccelerator.\n\n4. [tangle-accelerator](https://github.com/DLTcollab/tangle-accelerator): caching proxy server for IOTA, which can cache API requests and rewrite their responses as needed to be routed through full nodes.\n* An instance of Tangle-accelerator can serve thousands of Tangle requests\n  at once without accessing remote full nodes frequently.\n* As an intermediate server accelerateing interactions with the Tangle,\n  it faciliates dcurl to perform hardware-accelerated PoW operations on\n  edge devices.\n\n## FAQ\n- What is **binary encoded ternary**?\n\n  It is a skill to transform the ternary trit value to two separate bits value.\\\n  Hence multiple trits can be compressed to two separate data of the same data type and fully utilize the space.\n\n- Can the project [Batch Binary Encoded Ternary Curl](https://github.com/luca-moser/bct_curl) be applied to dcurl?\n\n  The answer is no.\\\n  They both use the same skill, **binary encoded ternary**.\\\n  However, their purpose are totally different.\n  - **bct_curl**:\n\n    Focus on hashing the multiple data of the same length at the same time.\\\n    It ends when the hashing is finished.\n\n  - **dcurl**:\n\n    Focus on trying the different values of one transaction at the same time to find the nonce value.\\\n    The procedure of finding the nonce value also does the hashing.\\\n    However, it ends when the nonce value is found, which means one of the values is acceptable.\n\n## Licensing\n`dcurl` is freely redistributable under the MIT License.\nUse of this source code is governed by a MIT-style license that can be\nfound in the `LICENSE` file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdltcollab%2Fdcurl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdltcollab%2Fdcurl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdltcollab%2Fdcurl/lists"}