forked from Bluechip23/bluechip
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
955e4f6
commit 1ddda30
Showing
540 changed files
with
1,056 additions
and
283,725 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -1,6 +1,12 @@ | ||
vue/node_modules | ||
vue/dist | ||
release/ | ||
.idea/ | ||
.vscode/ | ||
.DS_Store | ||
vue/node_modules | ||
vue/dist | ||
secret.yml | ||
cosmoshub3.json | ||
exchanges.json | ||
bluechip_out.json | ||
bin | ||
.vscode | ||
|
||
# emacs editor config | ||
\#*\# | ||
.\#* |
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,56 @@ | ||
# docker build . -t cosmoscontracts/bluechip:latest | ||
# docker run --rm -it cosmoscontracts/bluechip:latest /bin/sh | ||
FROM golang:1.18-alpine3.15 AS go-builder | ||
|
||
# this comes from standard alpine nightly file | ||
# https://github.com/rust-lang/docker-rust-nightly/blob/master/alpine3.12/Dockerfile | ||
# with some changes to support our toolchain, etc | ||
SHELL ["/bin/ash", "-eo", "pipefail", "-c"] | ||
# we probably want to default to latest and error | ||
# since this is predominantly for dev use | ||
# hadolint ignore=DL3018 | ||
RUN set -eux; apk add --no-cache ca-certificates build-base; | ||
|
||
# hadolint ignore=DL3018 | ||
RUN apk add git | ||
# NOTE: add these to run with LEDGER_ENABLED=true | ||
# RUN apk add libusb-dev linux-headers | ||
|
||
WORKDIR /code | ||
COPY . /code/ | ||
|
||
# See https://github.com/CosmWasm/wasmvm/releases | ||
ADD https://github.com/CosmWasm/wasmvm/releases/download/v1.0.0/libwasmvm_muslc.aarch64.a /lib/libwasmvm_muslc.aarch64.a | ||
ADD https://github.com/CosmWasm/wasmvm/releases/download/v1.0.0/libwasmvm_muslc.x86_64.a /lib/libwasmvm_muslc.x86_64.a | ||
RUN sha256sum /lib/libwasmvm_muslc.aarch64.a | grep 7d2239e9f25e96d0d4daba982ce92367aacf0cbd95d2facb8442268f2b1cc1fc | ||
RUN sha256sum /lib/libwasmvm_muslc.x86_64.a | grep f6282df732a13dec836cda1f399dd874b1e3163504dbd9607c6af915b2740479 | ||
|
||
# Copy the library you want to the final location that will be found by the linker flag `-lwasmvm_muslc` | ||
RUN cp "/lib/libwasmvm_muslc.$(uname -m).a" /lib/libwasmvm_muslc.a | ||
|
||
# force it to use static lib (from above) not standard libgo_cosmwasm.so file | ||
# then log output of file /code/bin/bluechipd | ||
# then ensure static linking | ||
RUN LEDGER_ENABLED=false BUILD_TAGS=muslc LINK_STATICALLY=true make build \ | ||
&& file /code/bin/bluechipd \ | ||
&& echo "Ensuring binary is statically linked ..." \ | ||
&& (file /code/bin/bluechipd | grep "statically linked") | ||
|
||
# -------------------------------------------------------- | ||
FROM alpine:3.15 | ||
|
||
COPY --from=go-builder /code/bin/bluechipd /usr/bin/bluechipd | ||
|
||
COPY docker/* /opt/ | ||
RUN chmod +x /opt/*.sh | ||
|
||
WORKDIR /opt | ||
|
||
# rest server | ||
EXPOSE 1317 | ||
# tendermint p2p | ||
EXPOSE 26656 | ||
# tendermint rpc | ||
EXPOSE 26657 | ||
|
||
CMD ["/usr/bin/bluechipd", "version"] |
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
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,45 @@ | ||
# Release and Upgrade procedures and communications | ||
|
||
The `#validators-private` channel on discord will be used for all communications from the team. Only **active validators** should be allowed access, for security reasons. | ||
|
||
**The core team will endeavour to always make sure there is 48-72 hours notice of an impending upgrade, unless there is no alternative.** | ||
|
||
Most of our validator communications is done on the [Bluechip Discord](https://discord.gg/Bluechip). You should join, and change your server name to `nick | validator-name`, then ask a mod for permission to see the private validator channels. | ||
|
||
## Release versioning | ||
|
||
**If a change crosses a major version number, i.e. `3.x.x -> 4.x.x` then it is definitely consensus-breaking.** | ||
|
||
In the past, some releases have been consensus-breaking but only incremented a minor version, if clearly indicated. In future we will look to be clearer. | ||
|
||
**Only patch versions, i.e. `x.x.1 -> x.x.2`, or `3.1.0 -> 3.1.1` are guaranteed to be non-consensus breaking.** | ||
|
||
## Scheduled upgrade via governance | ||
|
||
For a SoftwareUpgradeProposal via governance: | ||
|
||
1. Validators will be told via announcements channel when the prop is live | ||
2. Validators will be told via announcements channel if it passes | ||
3. Validators will be told via announcements channel when the upgrade instructions are available, and the upgrade will be coordinated in the private validators channel as the target upgrade block nears. | ||
|
||
## Emergency upgrade or security patch | ||
|
||
If the team needs to upgrade the chain faster than the cadence of governance, then a special procedure applies. | ||
|
||
This procedure minimizes the amount that is publicly shared about a potential issue. | ||
|
||
1. An announcement calling validators to check in on the private validators channel will be posted on the _validators announcement channel_ on discord. No specifics will be shared here, as it is public. | ||
2. Details of the patch and the upgrade plan will be shared on the private channel, as well as an expected ETA. | ||
3. When instructions are available, they will be pinned, and a second announcement sent on the announcements channel. A thread for acknowledgements will be created for validators to signal readiness. | ||
4. The team will compile a spreadsheet of validator readiness to check we are past 67%. | ||
|
||
There are two further considerations: | ||
|
||
1. If the change is consensus-breaking, a halt-height will be applied and validators will manually upgrade at that block, after halt. | ||
2. If the change is non-consensus breaking, validators will apply when ready, and then signal readiness. | ||
|
||
## Syncing from genesis | ||
|
||
The team will be putting together instructions that will be kept up-to-date for syncing without using a backup. | ||
|
||
Note that pre-Lupercalia (`< v3.0.0`) is effectively a different chain, as the old-style cosmoshub upgrade path was used, meaning there is a disjoint of one block. |
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,57 @@ | ||
# Bluechip bug reporting and feature requests | ||
|
||
The Bluechip core development team uses GitHub to manage feature requests and bugs. This is done via GitHub Issues. | ||
|
||
## Triage and progress 🔜 | ||
|
||
Issues added to GitHub will be triaged as they come in. | ||
|
||
Tracking of in-flight issues will be done through the Bluechip Core project board, but of course we reserve the right to not make a public issue if there is a security implication in doing so. | ||
|
||
## Feature request 🚀 | ||
|
||
For a feature request, e.g. module inclusion, please make a GitHub issue. Clearly state your use case and what value it will bring to other users or developers on Bluechip. | ||
|
||
If it is something that can be handled by a param change, discuss it on Discord in the `#governance` channel, and consider a governance proposal. | ||
|
||
## Standard priority bug 🐛 | ||
|
||
For a bug that is non-sensitive and/or operational in nature rather than a critical vulnerability, please add it as a GitHub issue. | ||
|
||
If it is not triaged in a couple of days, feel free to tag `@the-frey` or `@jakehartnell`. | ||
|
||
## Critical bug or security issue 💥 | ||
|
||
If you're here because you're trying to figure out how to notify us of a security issue, go to [Discord](https://discord.gg/wHdzjS5vXx), and alert the core engineers: | ||
|
||
|
||
- Jake (Meow) `Meow Stargaze ✨🔭#1736` | ||
- Dimi `dimi 🦙#2998` | ||
- Alex (the-frey) `the-frey#8626` | ||
- Ben2x4 `Ben2x4#4071` | ||
- Jacob `jacobgadikian#9883` | ||
- Giansalex `giansalex#1825` | ||
|
||
Please avoid opening public issues on GitHub that contain information about a potential security vulnerability as this makes it difficult to reduce the impact and harm of valid security issues. | ||
|
||
### Coordinated Vulnerability Disclosure Policy | ||
|
||
We ask security researchers to keep vulnerabilities and communications around vulnerability submissions private and confidential until a patch is developed. 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 Bluechip’s network, data, or services. | ||
|
||
### Vulnerability Disclosure Process | ||
|
||
Bluechip uses the following disclosure process: | ||
|
||
- Once a security report is received, the Bluechip core development team works to verify the issue. | ||
- Patches are prepared for eligible releases in private repositories. | ||
- We notify the community that a security release is coming, to give users time to prepare their systems for the update. Notifications can include Discord messages, tweets, and emails to partners and validators. | ||
- 24 hours following this notification, the fixes are applied publicly and new releases are issued. | ||
- Once releases are available for Bluechip, we notify the community, again, through the same channels as above. We also publish a Security Advisory on Github and publish the CVE, as long as neither the Security Advisory nor the CVE include any information on how to exploit these vulnerabilities beyond what information is already available in the patch itself. | ||
- Once the community is notified, we will pay out any relevant bug bounties to submitters. | ||
- One week after the releases go out, we will publish a post with further details on the vulnerability as well as our response to it. | ||
|
||
This process can take some time. Every effort will be made to handle the bug in as timely a manner as possible. However, it's important that we follow the process described above to ensure that disclosures are handled consistently and to keep Bluechip and the projects running on it secure. |
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
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
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
Binary file not shown.
Binary file not shown.
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
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
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 @@ | ||
version: "3" | ||
services: | ||
node: | ||
build: | ||
context: . | ||
args: | ||
- arch=${ARCH:-x86_64} | ||
command: ./setup_and_run.sh bluechip16g2rahf5846rxzp3fwlswy08fz8ccuwk03k57y | ||
ports: | ||
- 1317:1317 # rest | ||
- 26656:26656 # p2p | ||
- 26657:26657 # rpc | ||
environment: | ||
- GAS_LIMIT=${GAS_LIMIT:-10000000} | ||
- STAKE_TOKEN=${STAKE_TOKEN:-ubluechipx} |
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,9 @@ | ||
#!/bin/sh | ||
|
||
if test -n "$1"; then | ||
# need -R not -r to copy hidden files | ||
cp -R "$1/.bluechip" /root | ||
fi | ||
|
||
mkdir -p /root/log | ||
bluechipd start --rpc.laddr tcp://0.0.0.0:26657 --trace |
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,4 @@ | ||
#!/bin/sh | ||
|
||
./setup_bluechipd.sh "$@" | ||
./run_bluechipd.sh |
Oops, something went wrong.