{"id":24196538,"url":"https://github.com/dedis/cothority_template","last_synced_at":"2025-07-25T09:33:29.012Z","repository":{"id":46370547,"uuid":"69218815","full_name":"dedis/cothority_template","owner":"dedis","description":"Implement new cothority protocols, services and (client) applications.","archived":false,"fork":false,"pushed_at":"2021-10-19T13:12:47.000Z","size":10404,"stargazers_count":8,"open_issues_count":2,"forks_count":15,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-04-04T09:36:14.645Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dedis.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}},"created_at":"2016-09-26T06:14:59.000Z","updated_at":"2021-05-11T08:16:26.000Z","dependencies_parsed_at":"2022-09-05T13:10:42.500Z","dependency_job_id":null,"html_url":"https://github.com/dedis/cothority_template","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dedis/cothority_template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dedis%2Fcothority_template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dedis%2Fcothority_template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dedis%2Fcothority_template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dedis%2Fcothority_template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dedis","download_url":"https://codeload.github.com/dedis/cothority_template/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dedis%2Fcothority_template/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266985890,"owners_count":24017014,"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-07-25T02:00:09.625Z","response_time":70,"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":[],"created_at":"2025-01-13T19:35:46.325Z","updated_at":"2025-07-25T09:33:28.966Z","avatar_url":"https://github.com/dedis.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/dedis/cothority_template.svg?branch=master)](https://travis-ci.org/dedis/cothority_template)\n\nNavigation: [DEDIS](https://github.com/dedis/doc/tree/master/README.md) ::\nCothority Template\n\n# Template for a new cothority protocol/service/app\n\nThe following paragraphs give a short introduction in the onet framework and\nshould be your starting point if this is a new project for you.\n\n## Terminology\n\nOnet has many concepts and components which are described below:\n\n- Server members of the Onet are called Nodes or Conodes. They are started by the\nconode app from the cothority-repository.\n- Services are run by nodes. They keep a persistent state and need to\nbe restarted if the node crashes.\n\t- Can start protocols\n\t- Communicate with other service-instances\n\t- Communicate with the clients through an API\n\t- Have state that is kept over restart of the server\n- Protocols are an exchange of messages started by a service and joined by the\nothers.\n\t- Have a well-defined number of steps\n\t- Have an entry and an exit point\n\t- Are usable for different purposes\n- Apps are the end-user programs that communicate with the\nservices to initiate actions (such as requesting node status for the status app).\n- Cothority is a collective authority formed by any group of two or more conodes.\n- Conode - or a Cothority-node: `conode` running on a server.\n- Roster - the list of conodes present in a cothority\n- ServerIdentity - the information needed to identity a conode\n\n## Directory Overview\n\nBuilding on the ONet-library available at\nhttps://github.com/dedis/onet, this\nrepo holds templates to build the different parts necessary for a cothority\naddition:\n\n- [protocol](protocol) - define an ephemeral, distributed, decentralized protocol\n- [service](service) - create a long-term service that can spawn any number of protocols\n- [app](app) - write an app that will interact with, or spawn, a cothority\n- [simulation](simulation) - how to create a simulation of a protocol or service\n- [byzcoin](byzcoin) - how to write a contract using ByzCoin (early alpha!)\n\nThis repo is geared towards PhD-students who want to add a new functionality to\nthe cothority by creating their own protocols, services, simulations or apps.\n\n## Testing and Simulating\n\nYou can test your code at 3 different levels, from smallest to biggest:\n\n- go-test - using `LocalTest`, protocols and services can be tested using to golang-framework\n- integration testing - a small bash-testing framework is available to write full integration tests for the applications to make sure that everything will work for the users\n- [simulation](TemplateSimulation.md) - when running tests with a bigger number of nodes (more than one hundred), a simulation can launch the required nodes on a simulation platform like Deterlab, servers with Mininet or any cloud-platform with an SSH-access\n\nThe Go tests should be written for protocols, services and apps alike, while the simulation is only necessary if you want to measure the performance of your protocol. Integration testing is only used for apps.\n\n## Setting up your own repository\n\nJust for testing you can `go get github.com/dedis/cothority_template`. For setting\nup a new protocol/service/simulation, we propose that you create a new personal\nrepository in your account and then copy over the necessary files. Then you\nwill need to replace all the `github.com/dedis/cothority_tempate` references\nwith the path of your repository, e.g. `github.com/foo/super_protocol` if your\naccount is `foo` and the repository is `super_protocol`.\nIf you happen to do a semester project for DEDIS, please ask your responsible to\nset up a `github.com/dedis/student_yy_name` repository for you.\n\nThe Perl pie to the rescue (or `sed -i` if you prefer...):\n\n```bash\nfind . -name \"*go\" | xargs \\\nperl -pi -e \"s:github.com/dedis/cothority_template:github.com/foo/super_protocol:\"\n```\n\n**Note:** Everywhere you see the word \"template\" in the code, you should imagine\nthat you'll be substituting in your own application name when you are ready to\nfork this repository and start your project!\n\n## Documentation\n\nPrivacy preserving, decentralized, distributed, blockchain-related, and lots of\nother buzzwords are covered with our Cothority-framework. Different projects are\ndone using our framework in EPFL and other Universities. Here is some overview\nof what you can do and what not.\n\n- Template descriptions and overviews of the different parts of this repository.\n  - [Protocol](protocol/README.md) - what is in a protocol\n  - [Service](service/README.md) - the basics of a service\n\t- [Simulation](simulation/README.md) - how to run the protocol on different platforms\n  - [App](app/README.md) - how to create an app for your service\n- [CoSiExample](CoSiExample.md) shows you how the ideas of a paper have been implemented\n- [Coding](https://github.com/dedis/Coding) technical aspects of programming in Cothority\n\nSome more specific subjects that might help you:\n\n- [Intercepting messages](Intercepting-messages.md) how to test a protocol by intercepting and\neventually dropping messages - very useful in tests and simulations.\n\n## To cothority and beyond\n\nMore documentation and examples can be found in the cothority-repository:\n- To run and use a conode, have a look at\n\t[Cothority Node](https://github.com/dedis/cothority)\n\twith examples of protocols, services and apps\n- To participate as a core-developer, go to\n\t[Cothority Network Library](https://github.com/dedis/onet)\n\n## License\n\nAll repositories for the cothority are double-licensed under a\nGNU/AGPL 3.0 and a commercial license. If you want to have more information,\ncontact us at dedis@epfl.ch.\n\n## Contribution\n\nIf you want to contribute to Cothority-ONet, please have a look at\n[CONTRIBUTION](https://github.com/dedis/cothority/blob/master/CONTRIBUTION) for\nlicensing details. Once you are OK with those, you can have a look at our\ncoding-guidelines in\n[Coding](https://github.com/dedis/Coding). In short, we use the github-issues\nto communicate and pull-requests to do code-review. Travis makes sure that\neverything goes smoothly. And we'd like to have good code-coverage.\n\n# Contact\n\nYou can contact us at https://groups.google.com/forum/#!forum/cothority\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdedis%2Fcothority_template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdedis%2Fcothority_template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdedis%2Fcothority_template/lists"}