{"id":22218773,"url":"https://github.com/jacklightchen/spectrum","last_synced_at":"2025-07-06T03:03:52.477Z","repository":{"id":210506238,"uuid":"726350389","full_name":"jacklightChen/spectrum","owner":"jacklightChen","description":"[PVLDB 2024] Spectrum: Speedy and Strictly-Deterministic Smart Contract Transactions for Blockchain Ledgers","archived":false,"fork":false,"pushed_at":"2024-09-29T04:28:55.000Z","size":41418,"stargazers_count":8,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-06T03:03:23.341Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://www.vldb.org/pvldb/vol17/p2541-zhang.pdf","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/jacklightChen.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":null,"dei":null}},"created_at":"2023-12-02T05:55:21.000Z","updated_at":"2025-05-15T12:57:10.000Z","dependencies_parsed_at":"2024-04-15T06:37:42.841Z","dependency_job_id":null,"html_url":"https://github.com/jacklightChen/spectrum","commit_stats":null,"previous_names":["jacklightchen/spectrum"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jacklightChen/spectrum","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jacklightChen%2Fspectrum","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jacklightChen%2Fspectrum/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jacklightChen%2Fspectrum/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jacklightChen%2Fspectrum/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jacklightChen","download_url":"https://codeload.github.com/jacklightChen/spectrum/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jacklightChen%2Fspectrum/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263841591,"owners_count":23518482,"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-12-02T22:29:09.824Z","updated_at":"2025-07-06T03:03:52.389Z","avatar_url":"https://github.com/jacklightChen.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Spectrum\n\n* Zhihao Chen, Tianji Yang, Yixiao Zheng, Zhao Zhang, Cheqing Jin, and Aoying Zhou. \"Spectrum: Speedy and Strictly-Deterministic Smart Contract Transactions for Blockchain Ledgers.\" In Proceedings of the 50th International Conference on Very Large Data Bases (VLDB 2024), Pages 2541--2554, Guangzhou, China, August, 2024. \u003ca target=\"_blank\" style=\"color:black;font-weight: normal; text-decoration: underline;\" href=\"https://dl.acm.org/doi/10.14778/3675034.3675045\"\u003e[Paper]\u003c/a\u003e \u003ca target=\"_blank\" style=\"color:black;font-weight: normal; text-decoration: underline;\" href=\"https://zhihaochen.cn/slides/spectrum_slides.pdf\"\u003e[Slides]\u003c/a\u003e \u003ca target=\"_blank\" style=\"color:black;font-weight: normal; text-decoration: underline;\" href=\"https://dblp.uni-trier.de/rec/journals/pvldb/ChenYZZJZ24.html?view=bibtex\u0026param=0\"\u003e[Ref\u003cimg src=\"https://dblp.uni-trier.de/img/favicon.ico\" width=\"16px\"\u003e\u003c/img\u003e]\u003c/a\u003e\n\nSpectrum is the first deterministic concurrency control (DCC) scheme that preserves consensus-established ordering fairness (by ensuring strict determinism) with high performance for blockchain ledgers.\n\nThis repo is for the reproducibility of Spectrum.\n\n# Preparation\n#### Clone Project\nFor quick clone, use the shallow clone flag `--depth 1`.\n\n```\ngit clone --depth 1 https://github.com/jacklightChen/spectrum.git\n```\n#### Compile Env\nThis project heavily used CXX_20 features. \n\nTherefore, to compile this project, you either need `clang \u003e= 17 or gcc/g++ \u003e= 12`. \n\nIf you have apt (Advanced Packaging Tool), you can use the following command to install clang 17. \n\n```\nwget -qO- https://apt.llvm.org/llvm.sh | sudo bash -s 17\n```\n\nIf your clang version is not 17 by default, use the following command for building with clang. \n\n```sh\nCXX=clang++-17 CC=clang-17 cmake -S . -B build\n```\n\n# Building Instructions\n\nWe use `cmake` as the building system.\n\nTo configure the building plan, we use the following instruction. \n\n```sh\ncmake -S . -B build\n```\n\nOptionally, one can use debug option to generate debug logs. \nNote that performance will deteriorate significantly if debug mode is enabled. \n\n```sh\ncmake -S . -B build -DNDEBUG=1\n```\n\nTo build this project, we use the following command. \n\n```sh\ncmake --build build -j\n```\n\nThis build command will compile and link the main library along with several executables. \n\nThe generated executable is called `bench`. Its basic usage is as follows:\n\n```sh\n./build/bench [PROTOCOL] [WORKLOAD] [BENCH TIME]\n```\n\nFor example:\n\n```sh\n./build/bench Spectrum:36:9973:COPYONWRITE Smallbank:1000000:0 2s\n```\n\n# Evaluation\n\nThe scripts folder contains scripts to test all execution schemes, including testing fixed zipf with varying threads and fixed threads with varying zipf.\n\nThe parameters in **bench-threads-tps.py/bench-skew-tps.py** can be modified to test different benchmarks.\n\n| Parameter    | Meaning                           |\n| ------------ | --------------------------------- |\n| keys         | Number of keys                     |\n| workload     | Which workload to be tested        |\n| repeat       | Number of repetitions per bench, averaged at the end |\n| threads      | Number of threads                  |\n| zipf         | Zipf distribution parameter        |\n| times_to_run | Duration of each bench test        |\n\nAll Spectrum schemes and Sparkle schemes(except original Sparkle) have three parameters. The original Sparkle scheme does not need to include EVMType. Please pass parameters in the following way.\n\n```\nSpectrum:threads:table_partition:EVMType\n```\n\nThe EVMType can be one of the following options: **EVMCOW, STRAWMAN, BASIC**\n\n\nFor the Aria/AriaFB scheme, please pass parameters in the following way.\n\n```\nAria:threads:table_partition:batchsize/threads:ReOrderingFlag(True or False)\n```\n\nThe Calvin scheme is similar to Aria, but does not need to include ReOrderingFlag.\n\nFor the Serial scheme, please pass parameters in the following way.\n\n```\nSerial:EVMType:1\n```\n\n# Citation\nIf you find this repo useful, please cite our paper.\n```\n@article{DBLP:journals/pvldb/ChenYZZJZ24,\n  author       = {Zhihao Chen and\n                  Tianji Yang and\n                  Yixiao Zheng and\n                  Zhao Zhang and\n                  Cheqing Jin and\n                  Aoying Zhou},\n  title        = {Spectrum: Speedy and Strictly-Deterministic Smart Contract Transactions\n                  for Blockchain Ledgers},\n  journal      = {Proc. {VLDB} Endow.},\n  volume       = {17},\n  number       = {10},\n  pages        = {2541--2554},\n  year         = {2024}\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjacklightchen%2Fspectrum","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjacklightchen%2Fspectrum","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjacklightchen%2Fspectrum/lists"}