{"id":15819727,"url":"https://github.com/huumn/crisp","last_synced_at":"2025-10-07T04:44:58.035Z","repository":{"id":144237226,"uuid":"261628419","full_name":"huumn/crisp","owner":"huumn","description":"A cryptocurrency written in Lisp (Chez Scheme)","archived":false,"fork":false,"pushed_at":"2021-03-01T22:18:36.000Z","size":22,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-06T06:42:50.989Z","etag":null,"topics":["blockchain","chezscheme","lisp","scheme"],"latest_commit_sha":null,"homepage":"","language":"Scala","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/huumn.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":"2020-05-06T02:04:34.000Z","updated_at":"2023-08-21T01:17:59.000Z","dependencies_parsed_at":null,"dependency_job_id":"56dec120-12b4-4afe-8f58-aa5814f6d95c","html_url":"https://github.com/huumn/crisp","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/huumn/crisp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/huumn%2Fcrisp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/huumn%2Fcrisp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/huumn%2Fcrisp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/huumn%2Fcrisp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/huumn","download_url":"https://codeload.github.com/huumn/crisp/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/huumn%2Fcrisp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278722724,"owners_count":26034461,"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","status":"online","status_checked_at":"2025-10-07T02:00:06.786Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["blockchain","chezscheme","lisp","scheme"],"created_at":"2024-10-05T06:42:54.314Z","updated_at":"2025-10-07T04:44:57.986Z","avatar_url":"https://github.com/huumn.png","language":"Scala","funding_links":[],"categories":[],"sub_categories":[],"readme":"Crisp is a cryptocurrency written in Lisp. As of this writing, it's a toy blockchain written in Chez Scheme. \n\n## Goals\n\n1. Make Crisp a robust blockchain implementation written in Lisp that also uses Lisp as the transaction language.\n2. Experiment with the transaction language such that it provides features unavailable in existing blockchains\n\n## Control\n\nCrisp listens on a TCP port for control commands. Commands can be sent pretty naturally with telnet as commands are framed by the delimiter `\\r\\n`:\n\n```\n\u003e blocks\n\u003e [{\"index\":0,\"prev-hash\":\"\",\"timestamp\":1465154705,\"data\":\"Genisis Block.\"}]\n```\n\nA command name and its arguments are delimited with spaces:\n\n```\n\u003e peer-add 127.0.0.1 9998\n\u003e OK\n```\n\n#### Control Commands\n| command       | returns       |\n| ------------- | ------------- |\n| blocks        | json array of blocks |\n| block-mine [msg] | newly mined block as json     |\n| block-last | the last block mined |\n| peers | json array of peers as ip:port |\n| peer-add ip port | OK |\n| echo msg | msg | \n\n\n## Peer Gossip\n\nCrisp peers gossip over TCP. Messages are encoded as ascii-length-prefixed JSON, where the message length and the messages themselves are delimited with `\\r\\n`. The JSON messages contain both a `type` and `data` field. When a peer asks another peer for its last block, the message looks like the following:\n\n```\n\"31\\r\\n{\\\"type\\\":\\\"last-block\\\",\\\"data\\\":\\\"\\\"}\\r\\n\"\n```\n\n#### Peer Message types and data\n| type | data |\n| --- | --- |\n|last-block| no data expected|\n|last-block-resp | json encoded block |\n|blocks | no data expected |\n|blocks-resp | json array of blocks|\n\n## Consensus\n\nThe valid chain with the most cumulative work always wins. Because we don't yet have transactions, valid here only means the chain itself is a valid blockchain. That is, the blocks are \"linked\" with the correct hash \"pointers,\" and the timestamps between blocks is reasonable.\n\n## Running\n\nFor the time being Crisp uses [ravensc.com](http://ravensc.com) for package control and uses [suv](http://github.com/huumn/suv) for io which you'll have to clone and build manually. The full process from scratch, assuming you already have [chez](https://github.com/cisco/ChezScheme) and aren't on Windows:\n\n```\n$ curl -L http://ravensc.com/install | scheme\n$ git clone git@github.com:huumn/crisp.git\n$ cd crisp\n$ raven install\n$ cd lib\n$ git clone git@github.com:huumn/suv.git\n$ cd suv \n$ cc -o3 -fPIC -shared c/suv.c -luv -o libsuv.so\n$ cd ../..\n$ scheme --script main.sc\n```\n\nYou should then be able to connect to your Crisp node via telnet:\n```\n$ telnet 127.0.0.1 7777\necho hello\nhello\nblocks\n[{\"index\":0,\"prev-hash\":\"\",\"timestamp\":1465154705,\"data\":\"Genisis Block.\"}]\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhuumn%2Fcrisp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhuumn%2Fcrisp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhuumn%2Fcrisp/lists"}