diff --git a/LICENSE b/LICENSE index 03e9851..261eeb9 100644 --- a/LICENSE +++ b/LICENSE @@ -1,13 +1,201 @@ -Copyright 2024 Chorus One AG + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - http://www.apache.org/licenses/LICENSE-2.0 + 1. Definitions. -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. \ No newline at end of file + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/README.md b/README.md index 52653f9..b325443 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ · CLI · - Web UI + Web UI · Proxy UI · @@ -26,7 +26,9 @@ ## What is Blazar? Blazar is a standalone application designed to automate network upgrades for [Cosmos SDK](https://github.com/cosmos/cosmos-sdk) based blockchain networks. -### The Need for Blazar +![Web UI](https://github.com/user-attachments/assets/834d4903-b5ab-4a54-8f74-ed1768cf7e6f) + +## The Need for Blazar At [Chorus One](https://chorus.one), we manage over 50 blockchain networks, many of which are part of the Cosmos Ecosystem. Each network has its own upgrade schedule, which can vary from monthly to bi-weekly, depending on the urgency of the upgrade and Cosmos SDK releases. Our 24/7 on-call team handles multiple upgrades weekly. The upgrade process is generally straightforward but can be time-consuming. Here's how it typically works: @@ -38,10 +40,17 @@ The upgrade process is generally straightforward but can be time-consuming. Here Blazar was created to automate this process, allowing our team to use their time more productively. It currently handles the majority of network upgrades for Cosmos Networks at Chorus One. -## Requirements: Docker & Docker Compose -Blazar is designed to work with nodes configured and spawned via Docker Compose. +## Key Features +- **Upgrade Feeds:** Fetch upgrade information from multiple sources like "Governance", "Database", and "Local". +- **Upgrade Strategies:** Supports various upgrade scenarios, including height-specific and manually coordinated upgrades. +- **Pre and Post Upgrade Checks:** Automate checks like docker image existence, node and consensus status. +- **Stateful Execution:** Tracks upgrade stages to ensure consistent execution flow. +- **Cosmos SDK Gov/Upgrade Module Compliance:** Understands and respects the Cosmos SDK governance module upgrades. +- **Slack Integration:** Optional Slack notifications for every action Blazar performs. +- **Modern Stack:** Includes CLI, UI, REST, gRPC, Prometheus metrics, and Protobuf. +- **Built by Ops Team:** Developed by individuals with firsthand experience in node operations. -### Why Not Cosmovisor? +## Comparison to Cosmovisor While many operators use [Cosmovisor](https://docs.cosmos.network/main/build/tooling/cosmovisor) with systemd services, this setup doesn't meet our specific needs. Instead of relying on GitHub releases, we [build our own binaries](https://handbook.chorus.one/node-software/build-process.html), ensuring a consistent build environment with Docker. This approach allows us to use exact software versions and generate precise build artifacts (e.g., libwasmvm.so). Cosmovisor is designed to run as the parent process of a validator node, replacing node binaries at the upgrade height. However, this model isn't compatible with Docker Compose managed services. To address this, we developed Blazar as a more effective solution tailored to our setup. @@ -67,18 +76,8 @@ Cosmovisor is designed to run as the parent process of a validator node, replaci \** For Cosmovisor everything looks as [if it was scheduled through governance](https://docs.cosmos.network/main/build/tooling/cosmovisor#detecting-upgrades) -## Key Features -- **Upgrade Feeds:** Fetch upgrade information from multiple sources like GOVERNANCE, DATABASE, and LOCAL. -- **Upgrade Strategies:** Supports various upgrade scenarios, including height-specific and manually coordinated upgrades. -- **Pre and Post Upgrade Checks:** Automate checks like docker image existence, node and consensus status. -- **Stateful Execution:** Tracks upgrade stages to ensure consistent execution flow. -- **Cosmos SDK Gov/Upgrade Module Compliance:** Understands and respects the Cosmos SDK governance module upgrades. -- **Slack Integration:** Optional Slack notifications for every action Blazar performs. -- **Modern Stack:** Includes CLI, UI, REST, gRPC, Prometheus metrics, and Protobuf. -- **Built by Ops Team:** Developed by individuals with firsthand experience in node operations. - ## How Blazar Works -![Blazar Under the Hood](https://github.com/user-attachments/assets/4c72c53a-44d7-4b74-85d7-5fe193e1560a) +![Blazar Under the Hood](https://github.com/user-attachments/assets/1ecb0629-24bc-472f-a9cf-4d8d5e271a86) Blazar constructs a prioritized list of upgrades from multiple providers and takes appropriate actions based on the most recent state. It retrieves block heights from WSS endpoints or periodic gRPC polls and triggers Docker components when the upgrade height is reached. Notifications are sent to logs and Slack (if configured). @@ -90,16 +89,16 @@ In simple terms, Blazar performs the following steps: 5. **Notification Delivery:** Blazar sends notifications to logs and Slack (if configured). While the logic is simple, it's important to understand the differences between the types of upgrades: -1. **GOVERNANCE:** A coordinated upgrade initiated by chain governance, expected to be executed by all validators at a specified block height. -2. **NON-GOVERNANCE COORDINATED:** An upgrade initiated by operators, not by the chain, but it is expected to occur at the same block height across all validators. -3. **NON-GOVERNANCE UNCOORDINATED:** An operator-initiated upgrade, independent of chain governance, that can be executed at any time. +1. **Governance:** A coordinated upgrade initiated by chain governance, expected to be executed by all validators at a specified block height. +2. **Non Governance Coordinated:** An upgrade initiated by operators, not by the chain, but it is expected to occur at the same block height across all validators. +3. **Non Governance Uncoordinated:** An operator-initiated upgrade, independent of chain governance, that can be executed at any time. NOTE: Blazar does one job and does it well, meaning you need one Blazar instance per Cosmos-SDK node. NOTE: You are free to choose your upgrade proposal providers. An SQL database is not mandatory - you can opt to use the "LOCAL" provider or both simultaneously, depending on your needs. ## Getting Started -To run Blazar, you need Go (compiler) and Docker Compose on the target machine: +To use Blazar, first build the binary with the Go compiler, then deploy it on a host with Docker Compose installed. ```sh $ apt-get install golang $ apt-get install docker-compose @@ -112,6 +111,9 @@ $ make build $ ./blazar run --config blazar.toml ``` +### Requirements: Docker & Docker Compose +Blazar is designed to work with nodes configured and spawned via Docker Compose. + ### CLI & REST Interface Register or list upgrades using the CLI: ```sh @@ -126,12 +128,6 @@ Or use the REST interface: curl -s http://127.0.0.1:1234/v1/upgrades/list ``` -### Blazar UI -Quickly register a new version tag and upgrade using the UI. - -![Web UI](https://github.com/user-attachments/assets/834d4903-b5ab-4a54-8f74-ed1768cf7e6f) - - ### Slack Integration Track the upgrade process in a single Slack thread 🧵.