-
Notifications
You must be signed in to change notification settings - Fork 352
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Solution: adapted the guidelines from the main repository to Go code style conventions and tooling + other docs
- Loading branch information
Showing
9 changed files
with
267 additions
and
0 deletions.
There are no files selected for viewing
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
* @tomtau @devashishdxt @calvinaco @leejw51crypto @linfeng-crypto @yihuang |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
--- | ||
name: Bug report | ||
about: Create a report to help us improve | ||
title: '' | ||
labels: '' | ||
assignees: '' | ||
|
||
--- | ||
|
||
**Describe the bug** | ||
A clear and concise description of what the bug is. | ||
|
||
**To Reproduce** | ||
Steps to reproduce the behavior: | ||
1. Go to '...' | ||
2. Click on '....' | ||
3. Scroll down to '....' | ||
4. See error | ||
|
||
**Expected behavior** | ||
A clear and concise description of what you expected to happen. | ||
|
||
**Screenshots** | ||
If applicable, add screenshots to help explain your problem. | ||
|
||
**Desktop (please complete the following information):** | ||
- OS: [e.g. iOS] | ||
- Browser [e.g. chrome, safari] | ||
- Version [e.g. 22] | ||
|
||
**Smartphone (please complete the following information):** | ||
- Device: [e.g. iPhone6] | ||
- OS: [e.g. iOS8.1] | ||
- Browser [e.g. stock browser, safari] | ||
- Version [e.g. 22] | ||
|
||
**Additional context** | ||
Add any other context about the problem here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--- | ||
name: Feature request | ||
about: Suggest an idea for this project | ||
title: '' | ||
labels: '' | ||
assignees: '' | ||
|
||
--- | ||
|
||
**Is your feature request related to a problem? Please describe.** | ||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] | ||
|
||
**Describe the solution you'd like** | ||
A clear and concise description of what you want to happen. | ||
|
||
**Describe alternatives you've considered** | ||
A clear and concise description of any alternative solutions or features you've considered. | ||
|
||
**Additional context** | ||
Add any other context or screenshots about the feature request here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
👮🏻👮🏻👮🏻 !!!! REFERENCE THE PROBLEM YOUR ARE SOLVING IN THE PR TITLE AND DESCRIBE YOUR SOLUTION HERE !!!! DO NOT FORGET !!!! 👮🏻👮🏻👮🏻 | ||
|
||
|
||
# PR Checklist: | ||
|
||
- [ ] Have you read the [CONTRIBUTING.md](https://github.com/crypto-com/chain-main/blob/master/CONTRIBUTING.md)? | ||
- [ ] Does your PR follow the [C4 patch requirements](https://rfc.zeromq.org/spec:42/C4/#23-patch-requirements)? | ||
- [ ] Have you rebased your work on top of the latest master? | ||
- [ ] Have you checked your code compiles? (`make`) | ||
- [ ] Have you included tests for any non-trivial functionality? | ||
- [ ] Have you checked your code passes the unit tests? (`make test`) | ||
- [ ] Have you checked your code formatting is correct? (`go fmt`) | ||
- [ ] Have you checked your basic code style is fine? (`goreporter` / `gosec` / `golint` / `govet` / ...) | ||
- [ ] If you added any dependencies, have you checked they do not contain any known vulnerabilities? (`go list -json -m all | nancy sleuth` / `nancy sleuth -p /path/to/Gopkg.lock`) | ||
- [ ] If your changes affect the client infrastructure, have you run the integration test? | ||
- [ ] If your changes affect public APIs, does your PR follow the [C4 evolution of public contracts](https://rfc.zeromq.org/spec:42/C4/#26-evolution-of-public-contracts)? | ||
- [ ] If your code changes public APIs, have you incremented the crate version numbers and documented your changes in the [CHANGELOG.md](https://github.com/crypto-com/chain-main/blob/master/CHANGELOG.md)? | ||
- [ ] If you are contributing for the first time, please read the agreement in [CONTRIBUTING.md](https://github.com/crypto-com/chain-main/blob/master/CONTRIBUTING.md) now and add a comment to this pull request stating that your PR is in accordance with the [Developer's Certificate of Origin](https://github.com/crypto-com/chain-main/blob/master/CONTRIBUTING.md#developer-certificate-of-originn). | ||
|
||
Thank you for your code, it's appreciated! :) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Changelog | ||
|
||
*Unreleased* | ||
## v0.0.0 | ||
### Breaking changes | ||
### Features | ||
### Improvements | ||
### Bug Fixes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
# Code of Conduct | ||
|
||
## Conduct | ||
### Contact: [email protected] | ||
|
||
* We are committed to providing a friendly, safe and welcoming environment for all, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, ethnicity, age, religion, nationality, or other similar characteristic. | ||
|
||
* On communication channels, please avoid using overtly sexual nicknames or other nicknames that might detract from a friendly, safe and welcoming environment for all. | ||
|
||
* Please be kind and courteous. There’s no need to be mean or rude. | ||
|
||
* Respect that people have differences of opinion and that every design or implementation choice carries a trade-off and numerous costs. There is seldom a right answer. | ||
|
||
* Please keep unstructured critique to a minimum. If you have solid ideas you want to experiment with, make a fork and see how it works. | ||
|
||
* We will exclude you from interaction if you insult, demean or harass anyone. That is not welcome behaviour. We interpret the term “harassment” as including the definition in the [Citizen Code of Conduct](http://citizencodeofconduct.org/); if you have any lack of clarity about what might be included in that concept, please read their definition. In particular, we don’t tolerate behavior that excludes people in socially marginalized groups. | ||
|
||
* Private harassment is also unacceptable. No matter who you are, if you feel you have been or are being harassed or made uncomfortable by a community member, please contact one of the communication channel admins or the email mentioned above immediately. Whether you’re a regular contributor or a newcomer, we care about making this community a safe place for you and we’ve got your back. | ||
|
||
* Likewise any spamming, trolling, flaming, baiting or other attention-stealing behaviour is not welcome. | ||
|
||
|
||
---- | ||
|
||
|
||
## Moderation | ||
These are the policies for upholding our community’s standards of conduct. If you feel that a thread needs moderation, please contact the above mentioned person. | ||
|
||
1. Remarks that violate the Crypto.com Chain standards of conduct, including hateful, hurtful, oppressive, or exclusionary remarks, are not allowed. (Cursing is allowed, but never targeting another user, and never in a hateful manner.) | ||
|
||
2. Remarks that moderators find inappropriate, whether listed in the code of conduct or not, are also not allowed. | ||
|
||
3. Moderators will first respond to such remarks with a warning. | ||
|
||
4. If the warning is unheeded, the user will be “kicked,” i.e., kicked out of the communication channel to cool off. | ||
|
||
5. If the user comes back and continues to make trouble, they will be banned, i.e., indefinitely excluded. | ||
|
||
6. Moderators may choose at their discretion to un-ban the user if it was a first offense and they offer the offended party a genuine apology. | ||
|
||
7. If a moderator bans someone and you think it was unjustified, please take it up with that moderator, or with a different moderator, in private. Complaints about bans in-channel are not allowed. | ||
|
||
8. Moderators are held to a higher standard than other community members. If a moderator creates an inappropriate situation, they should expect less leeway than others. | ||
|
||
In the Crypto.com Chain developer community we strive to go the extra step to look out for each other. Don’t just aim to be technically unimpeachable, try to be your best self. In particular, avoid flirting with offensive or sensitive issues, particularly if they’re off-topic; this all too often leads to unnecessary fights, hurt feelings, and damaged trust; worse, it can drive people away from the community entirely. | ||
|
||
And if someone takes issue with something you said or did, resist the urge to be defensive. Just stop doing what it was they complained about and apologize. Even if you feel you were misinterpreted or unfairly accused, chances are good there was something you could’ve communicated better — remember that it’s your responsibility to make your fellow Crypto.com Chain developer community members comfortable. Everyone wants to get along and we are all here first and foremost because we want to talk about cool technology. You will find that people will be eager to assume good intent and forgive as long as you earn their trust. | ||
|
||
The enforcement policies listed above apply to all official Crypto.com Chain venues. For other projects adopting the Crypto.com Chain Code of Conduct, please contact the maintainers of those projects for enforcement. If you wish to use this code of conduct for your own project, consider explicitly mentioning your moderation policy or making a copy with your own moderation policy so as to avoid confusion. | ||
|
||
* Adapted from the the [Rust Code of Conduct](https://www.rust-lang.org/en-US/conduct.html), the [Node.js Policy on Trolling](http://blog.izs.me/post/30036893703/policy-on-trolling) as well as the [Contributor Covenant v1.3.0](http://contributor-covenant.org/version/1/3/0/). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
# Contributing | ||
|
||
Thank you for your interest in contributing to Chain! Good places to start are this document and [the official documentation](https://github.com/crypto-com/chain-docs). If you have any questions, feel free to ask on [Gitter](https://gitter.im/crypto-com/community?utm_source=share-link&utm_medium=link&utm_campaign=share-link). | ||
|
||
|
||
## Code of Conduct | ||
|
||
All contributors are expected to follow our [Code of Conduct](CODE_OF_CONDUCT.md). | ||
|
||
## Feature requests and bug reports | ||
|
||
Feature requests and bug reports should be posted as [Github issues](issues/new). | ||
In an issue, please describe what you did, what you expected, and what happened instead. | ||
|
||
If you think that you have identified an issue with Chain that might compromise | ||
its users' security, please do not open a public issue on GitHub. Instead, | ||
we ask you to refer to [security policy](SECURITY.md). | ||
|
||
## Working on issues | ||
There are several ways to identify an area where you can contribute to Chain: | ||
|
||
* You can reach out by sending a message in the developer community communication channel, either with a specific contribution in mind or in general by saying "I want to help!". | ||
* Occasionally, some issues on Github may be labelled with `help wanted` or `good first issue` tags. | ||
|
||
We use the variation of the "fork and pull" model where contributors push changes to their personal fork and create pull requests to bring those changes into the source repository. | ||
Changes in pull requests should satisfy "Patch Requirements" described in [The Collective Code Construction Contract (C4)](https://rfc.zeromq.org/spec:42/C4/#23-patch-requirements). The code and comments should follow [Effective Go Guide](https://golang.org/doc/effective_go.html) (and [Uber Style Guide](https://github.com/uber-go/guide/blob/master/style.md)). Many of the code style rules are captured by `go fmt`, `golint`, `go vet` and other tools, so we recommend [setting up your editor to do formatting and lint-checking for you](https://github.com/golang/go/wiki/IDEsAndTextEditorPlugins). | ||
|
||
Once you identified an issue to work on, this is the summary of your basic steps: | ||
|
||
* Fork Chain's repository under your Github account. | ||
|
||
* Clone your fork locally on your machine. | ||
|
||
* Post a comment in the issue to say that you are working on it, so that other people do not work on the same issue. | ||
|
||
* Create a local branch on your machine by `git checkout -b branch_name`. | ||
|
||
* Commit your changes to your own fork -- see [C4 Patch Requirements](https://rfc.zeromq.org/spec:42/C4/#23-patch-requirements) for guidelines. | ||
|
||
* Include tests that cover all non-trivial code. | ||
|
||
* Check you are working on the latest version on master in Chain's official repository. If not, please pull Chain's official repository's master (upstream) into your fork's master branch, and rebase your committed changes or replay your stashed changes in your branch over the latest changes in the upstream version. | ||
|
||
* Run all tests locally and make sure they pass. | ||
|
||
* If your changes are of interest to other developers, please make corresponding changes in the official documentation and the changelog. | ||
|
||
* Push your changes to your fork's branch and open the pull request to Chain's repository master branch. | ||
|
||
* In the pull request, complete its checklist, add a clear description of the problem your changes solve, and add the following statement to confirm that your contribution is your own original work: "I hereby certify that my contribution is in accordance with the Developer Certificate of Origin (https://developercertificate.org/)." | ||
|
||
* The reviewer will either accept and merge your pull request, or leave comments requesting changes via the Github PR interface (you should then make changes by pushing directly to your existing PR branch). | ||
|
||
### Developer Certificate of Origin | ||
All contributions to this project are subject to the terms of the Developer Certificate of Origin, available [here](https://developercertificate.org/) and reproduced below: | ||
|
||
``` | ||
Developer Certificate of Origin | ||
Version 1.1 | ||
Copyright (C) 2004, 2006 The Linux Foundation and its contributors. | ||
1 Letterman Drive | ||
Suite D4700 | ||
San Francisco, CA, 94129 | ||
Everyone is permitted to copy and distribute verbatim copies of this | ||
license document, but changing it is not allowed. | ||
Developer's Certificate of Origin 1.1 | ||
By making a contribution to this project, I certify that: | ||
(a) The contribution was created in whole or in part by me and I | ||
have the right to submit it under the open source license | ||
indicated in the file; or | ||
(b) The contribution is based upon previous work that, to the best | ||
of my knowledge, is covered under an appropriate open source | ||
license and I have the right under that license to submit that | ||
work with modifications, whether created in whole or in part | ||
by me, under the same open source license (unless I am | ||
permitted to submit under a different license), as indicated | ||
in the file; or | ||
(c) The contribution was provided directly to me by some other | ||
person who certified (a), (b) or (c) and I have not modified | ||
it. | ||
(d) I understand and agree that this project and the contribution | ||
are public and that a record of the contribution (including all | ||
personal information I submit with it, including my sign-off) is | ||
maintained indefinitely and may be redistributed consistent with | ||
this project or the open source license(s) involved. | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
Crypto.com Chain | ||
Copyright 2020, Foris Limited ("Crypto.com"). | ||
|
||
This project contains portions of code derived from the following libraries: | ||
|
||
* Starport | ||
* Copyright: Copyright (c) 2020 All in Bits, Inc | ||
* License: Apache License 2.0 | ||
* Repository: https://github.com/tendermint/starport | ||
|
||
* Cosmos SDK | ||
* Copyright: Copyright (c) 2016-2020 All in Bits, Inc | ||
* License: Apache License 2.0 | ||
* Repository: https://github.com/cosmos/cosmos-sdk | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
## Coordinated Vulnerability Disclosure Policy | ||
We ask security researchers to keep vulnerabilities and communications around vulnerability submissions private and confidential until a patch is developed to protect the people using Crypto.com’s protocols. In addition to this, we ask that you: | ||
|
||
- Allow us a reasonable amount of time to correct or address security vulnerabilities. | ||
- Avoid exploiting any vulnerabilities that you discover. | ||
- Demonstrate good faith by not disrupting or degrading Crypto.com’s data or services. | ||
|
||
## Vulnerability Disclosure Process | ||
Once we receive a vulnerability report, Crypto.com will take these steps to address it: | ||
|
||
1. Crypto.com will confirm receipt of the vulnerability report within 5 business days. The timing of our response may depend on when a report is submitted. As our daily operations are distributed in time zones across the globe, response times may vary. If you have not received a response to a vulnerability report from us within 5 business days, we encourage you to follow up with us again for a response. | ||
2. Crypto.com will investigate and validate the security issue submitted to us as quickly as we can, usually within 10 business days of receipt. Submitting a thorough report with clear steps to recreate the vulnerability and/or a proof-of-concept will move the process along in a timely manner. | ||
3. Crypto.com will acknowledge the bug, and make the necessary code changes to patch it. Some issues may require more time than others to patch, but we will strive to patch each vulnerability as quickly as our resources and development process allow. | ||
4. Crypto.com will publicly release the security patch for the vulnerability, and acknowledge the security fix in the release notes once the issue has been resolved. Public release notes can reference to the person or people who reported the vulnerability, unless they wish to stay anonymous. | ||
|
||
## Contact Us | ||
If you find a security issue, you can report it on the [Crypto.com HackerOne Bug Bounty Program](https://hackerone.com/crypto) or you can contact our team directly at [[email protected]](mailto:[email protected]). | ||
To communicate sensitive information, you can use the latest key in the | ||
[cryptocom's Keybase account](https://keybase.io/cryptocom/pgp_keys.asc) or use its [chat functionality](https://keybase.io/cryptocom/chat). |