{"id":13652676,"url":"https://github.com/nervosnetwork/ckb-simple-account-layer","last_synced_at":"2025-04-23T03:31:13.025Z","repository":{"id":47862782,"uuid":"258457217","full_name":"nervosnetwork/ckb-simple-account-layer","owner":"nervosnetwork","description":"An account layer implementation for Nervos CKB","archived":true,"fork":false,"pushed_at":"2021-08-12T08:40:39.000Z","size":337,"stargazers_count":8,"open_issues_count":8,"forks_count":3,"subscribers_count":10,"default_branch":"develop","last_synced_at":"2025-04-17T03:53:59.399Z","etag":null,"topics":[],"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/nervosnetwork.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-04-24T08:48:37.000Z","updated_at":"2023-01-28T07:16:31.000Z","dependencies_parsed_at":"2022-09-14T09:50:44.757Z","dependency_job_id":null,"html_url":"https://github.com/nervosnetwork/ckb-simple-account-layer","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/nervosnetwork%2Fckb-simple-account-layer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nervosnetwork%2Fckb-simple-account-layer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nervosnetwork%2Fckb-simple-account-layer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nervosnetwork%2Fckb-simple-account-layer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nervosnetwork","download_url":"https://codeload.github.com/nervosnetwork/ckb-simple-account-layer/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250365486,"owners_count":21418695,"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-08-02T02:01:01.566Z","updated_at":"2025-04-23T03:31:12.561Z","avatar_url":"https://github.com/nervosnetwork.png","language":"C","funding_links":[],"categories":["Tools"],"sub_categories":["Experimental Projects \u0026 Demos"],"readme":"# ckb-simple-account-layer\n\n**NOTE**: this repository is now only for legacy purposes, we have put together a more complete and secure design as a [Sparse Merkle Tree](https://github.com/nervosnetwork/sparse-merkle-tree) data structure. Please use the SMT implementation for all future projects.\n\nA CKB account layer solution. This project consists of 3 parts:\n\n* Minimal single header C parts for integrating an existing VM(whether it's JavaScript VM, Forth VM, EVM, Move VM, etc.) with an account based design. We are providing C source file since we are only defining a minimal integration layer, in this case, a C implementation provides maximum interoperability. Your VM can be written in any language supported by RISC-V, such as Rust.\n* A Rust generator crate for interacting with the account layer on CKB, including querying account state, running VM programs to generate transactions containing latest state changes, etc.\n* A nodejs binding on the Rust crate to provide the same functionality to JavaScript/TypeScript. We do have plan to deeply integrate ckb-simple-account-layer with [lumos](https://github.com/nervosnetwork/lumos).\n\nTo save on-chain storage requirement, currently we use a [SMT](https://github.com/jjyr/sparse-merkle-tree) based design: only the state root hash is stored in a cell on CKB. The current state values will be calculated and managed off-chain. Since all the validation logic will be executed on-chain, everyone can then verify current state values calculated from the series of transactions on chain. We are not jeopardizing the security of such a design in the decentralized manner.\n\nOne novelty of this account layer, is that it only requires the developers to provide a VM implementation running on RISC-V. The generator part also executes the same VM via a customized CKB VM instance to generate updates. This way we are minimizing the efforts taken to build an account layer on CKB.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnervosnetwork%2Fckb-simple-account-layer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnervosnetwork%2Fckb-simple-account-layer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnervosnetwork%2Fckb-simple-account-layer/lists"}