#ckb #x86-64 #smart-contracts #simulator #environment #running #native

ckb-x64-simulator

A simulator that allows running CKB smart contracts on x64 environment for tooling benefits

13 releases (breaking)

0.10.0 Oct 25, 2024
0.9.1 Jul 31, 2024
0.8.0 Dec 20, 2023
0.7.0 Aug 8, 2022
0.4.0 Dec 7, 2020

#28 in #ckb

Download history 21/week @ 2024-07-22 371/week @ 2024-07-29 3/week @ 2024-08-12 52/week @ 2024-08-26 160/week @ 2024-09-02 78/week @ 2024-09-09 217/week @ 2024-09-16 225/week @ 2024-09-23 19/week @ 2024-09-30 13/week @ 2024-10-07 30/week @ 2024-10-14 119/week @ 2024-10-21 172/week @ 2024-10-28 41/week @ 2024-11-04

363 downloads per month
Used in ckb-std

MIT license

60KB
1.5K SLoC

ckb-x64-simulator

ckb-x64-simulator provides a simulator environment, which can be used to compile CKB smart contracts to native x64 environment. The result here, is that all the existing toolings on x64 environment, such as valgrind, address sanitizer, undefined behavior sanitizer, code coverage tools, etc. can be used to ensure the security of smart contracts. One day we might reach the point that RISC-V based toolings have caught up, so this simulator can be sunset, but at the moment now, it provides a good tradeoff to boost smart contract security.

While this simulator is written in pure Rust, C based APIs are exposed so it can also be linked against a C based smart contract.

Dependencies

~6–12MB
~160K SLoC