Skip to content

Commit

Permalink
fix: fix sync script and resync (#214)
Browse files Browse the repository at this point in the history
* chore: run script again (???)

* update script

* updates

* updates

* updates

* updates

* updates

* sidebar
  • Loading branch information
julienrbrt authored Oct 10, 2024
1 parent 0641410 commit 12812a0
Show file tree
Hide file tree
Showing 210 changed files with 2,519 additions and 1,004 deletions.
18 changes: 8 additions & 10 deletions docs/build/build.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
---
sidebar_position: 0
---

# Build

* [Architecture](./architecture/README.md) - Overview and detailed explanation of the system architecture.
* [Building Apps](./building-apps/00-app-go.md) - The documentation in this section will guide you through the process of developing your dApp using the Cosmos SDK framework.
* [Modules](./modules/README.md) - Information about the various modules available in the Cosmos SDK: Auth, Authz, Bank, Crisis, Distribution, Evidence, Feegrant, Governance, Mint, Params, Slashing, Staking, Upgrade, NFT, Consensus, Circuit, Genutil.
* [Migrations](./migrations/01-intro.md) - See what has been updated in each release the process of the transition between versions.
* [Packages](./packages/README.md) - Explore a curated collection of pre-built modules and functionalities, streamlining the development process.
* [Tooling](./tooling/README.md) - A suite of utilities designed to enhance the development workflow, optimizing the efficiency of Cosmos SDK-based projects.
* [ADR's](./architecture/README.md) - Provides a structured repository of key decisions made during the development process, which have been documented and offers rationale behind key decisions being made.
* [RFC](./rfc/README.md) - A Request for Comments (RFC) is a record of discussion on an open-ended topic related to the design and implementation of the Cosmos SDK, for which no immediate decision is required.
* [Specifications](./spec/README.md) - A detailed reference for the specifications of various components and features.
* [REST API](https://docs.cosmos.network/api) - A comprehensive reference for the application programming interfaces (APIs) provided by the SDK.
* [Building Apps](./building-apps/00-app-go.md) - The documentation in this section will guide you through the process of developing your dApp using the Cosmos SDK framework.
* [Modules](./modules/README.md) - Information about the various modules available in the Cosmos SDK: Auth, Authz, Bank, Crisis, Distribution, Evidence, Feegrant, Governance, Mint, Params, Slashing, Staking, Upgrade, NFT, Consensus, Circuit, Genutil.
* [Migrations](./migrations/01-intro.md) - See what has been updated in each release the process of the transition between versions.
* [Packages](./packages/README.md) - Explore a curated collection of pre-built modules and functionalities, streamlining the development process.
* [Tooling](./tooling/README.md) - A suite of utilities designed to enhance the development workflow, optimizing the efficiency of Cosmos SDK-based projects.
* [ADR's](./architecture/README.md) - Provides a structured repository of key decisions made during the development process, which have been documented and offers rationale behind key decisions being made.
* [REST API](https://docs.cosmos.network/api) - A comprehensive reference for the application programming interfaces (APIs) provided by the SDK.
19 changes: 18 additions & 1 deletion docs/glossary.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,52 +6,69 @@ sidebar_position: 3
# Glossary

## ABCI (Application Blockchain Interface)

The interface between the Tendermint consensus engine and the application state machine, allowing them to communicate and perform state transitions. ABCI is a critical component of the Cosmos SDK, enabling developers to build applications using any programming language that can communicate via ABCI.

## ATOM

The native staking token of the Cosmos Hub, used for securing the network, participating in governance, and paying fees for transactions.

## CometBFT

A Byzantine Fault Tolerant (BFT) consensus engine that powers the Cosmos SDK. CometBFT is responsible for handling the consensus and networking layers of a blockchain.

## Cosmos Hub

The first blockchain built with the Cosmos SDK, functioning as a hub for connecting other blockchains in the Cosmos ecosystem through IBC.

## Cosmos SDK

A framework for building blockchain applications, focusing on modularity, scalability, and interoperability.

## CosmWasm

A smart contract engine for the Cosmos SDK that enables developers to write and deploy smart contracts in WebAssembly (Wasm). CosmWasm is designed to be secure, efficient, and easy to use, allowing developers to build complex applications on top of the Cosmos SDK.

## Delegator

A participant in a Proof of Stake network who delegates their tokens to a validator. Delegators share in the rewards and risks associated with the validator's performance in the consensus process.

## Gas

A measure of computational effort required to execute a transaction or smart contract on a blockchain. In the Cosmos ecosystem, gas is used to meter transactions and allocate resources fairly among users. Users must pay a gas fee, usually in the native token, to have their transactions processed by the network.

## Governance

The decision-making process in the Cosmos ecosystem, which allows token holders to propose and vote on network upgrades, parameter changes, and other critical decisions.

## IBC (Inter-Blockchain Communication)

A protocol for secure and reliable communication between heterogeneous blockchains built on the Cosmos SDK. IBC enables the transfer of tokens and data across multiple blockchains.

## Interoperability

The ability of different blockchains and distributed systems to communicate and interact with each other, enabling the seamless transfer of information, tokens, and other digital assets. In the context of Cosmos, the Inter-Blockchain Communication (IBC) protocol is a core technology that enables interoperability between blockchains built with the Cosmos SDK and other compatible blockchains. Interoperability allows for increased collaboration, innovation, and value creation across different blockchain ecosystems.

## Light Clients

Lightweight blockchain clients that verify and process only a small subset of the blockchain data, allowing users to interact with the network without downloading the entire blockchain. ABCI++ aims to enhance the security and performance of light clients by enabling them to efficiently verify state transitions and proofs.

## Module

A self-contained, reusable piece of code that can be used to build blockchain functionality within a Cosmos SDK application. Modules can be developed by the community and shared for others to use.

## Slashing

The process of penalizing validators or delegators by reducing their staked tokens if they behave maliciously or fail to meet the network's performance requirements.

## Staking

The process of locking up tokens as collateral to secure the network, participate in consensus, and earn rewards in a Proof of Stake (PoS) blockchain like Cosmos.

## State Sync

A feature that allows new nodes to quickly synchronize with the current state of the blockchain without downloading and processing all previous blocks. State Sync is particularly useful for nodes that have been offline for an extended period or are joining the network for the first time. ABCI++ aims to improve the efficiency and security of State Sync.

## Validator
A network participant responsible for proposing new blocks, validating transactions, and securing the Cosmos SDK-based blockchain through staking tokens. Validators play a crucial role in maintaining the security and integrity of the network.

A network participant responsible for proposing new blocks, validating transactions, and securing the Cosmos SDK-based blockchain through staking tokens. Validators play a crucial role in maintaining the security and integrity of the network.
21 changes: 9 additions & 12 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ const config = {
path: "main",
banner: "unreleased",
},
"0.52": {
0.52: {
path: "v0.52",
label: "v0.52",
},
Expand Down Expand Up @@ -123,7 +123,8 @@ const config = {
type: "doc",
label: "Tutorials",
collapsed: false,
docId: "tutorials/vote-extensions/auction-frontrunning/getting-started",
docId:
"tutorials/vote-extensions/auction-frontrunning/getting-started",
position: "left",
},
{
Expand Down Expand Up @@ -247,7 +248,7 @@ const config = {
markdown: {
mermaid: true,
},
themes: ["@you54f/theme-github-codeblock", '@docusaurus/theme-mermaid'],
themes: ["@you54f/theme-github-codeblock", "@docusaurus/theme-mermaid"],
plugins: [
async function myPlugin(context, options) {
return {
Expand Down Expand Up @@ -498,9 +499,6 @@ const config = {
if (existingPath.includes("/user/run-node")) {
return [existingPath.replace("/user/run-node", "/run-node")];
}
if (existingPath.includes("/user/validate")) {
return [existingPath.replace("/user/validate", "/validate")];
}
return undefined;
},
},
Expand All @@ -512,15 +510,14 @@ const config = {
"data-website-id": "752cab42-f5d6-4af3-9d31-fb0d6e501c4a",
"data-project-name": "Cosmos SDK",
"data-project-color": "#5064FB",
"data-modal-disclaimer": "This is a custom LLM for Interchain with access to Cosmos SDK developer documentation and resources. Please note that answers are generated by an AI so please use your best judgement before implementing.",
"data-modal-image":
"img/logo-sdk.svg",
"data-project-logo":
"img/logo-sdk-white.svg",
"data-modal-disclaimer":
"This is a custom LLM for Interchain with access to Cosmos SDK developer documentation and resources. Please note that answers are generated by an AI so please use your best judgement before implementing.",
"data-modal-image": "img/logo-sdk.svg",
"data-project-logo": "img/logo-sdk-white.svg",
"data-user-analytics-fingerprint-enabled": "true",
async: true,
},
]
],
};

module.exports = config;
59 changes: 26 additions & 33 deletions sync_script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,15 @@

set -e -o pipefail

# Set the remote repository URL to clone from
REMOTE_REPO_URL="https://github.com/cosmos/cosmos-sdk.git"

# Store the current working directory in WORK_DIR
WORK_DIR=$(pwd)

# Remove any existing 'cosmos-sdk' directory and clone the remote repository
rm -rf ./cosmos-sdk
git clone "$REMOTE_REPO_URL" cosmos-sdk
git clone https://github.com/cosmos/cosmos-sdk.git cosmos-sdk

# Read the versions from a JSON file and remove the 'v' prefix
# Read the versions from a JSON file
VERSIONS=($(jq -r '.[]' versions.json))

VERSIONS+=("main")

# Iterate over each version
Expand All @@ -24,7 +20,6 @@ for version in "${VERSIONS[@]}"; do
branch="main" # Set the branch to 'main'
version_directory="" # For 'main', the version directory is empty
else
version="${version#v}" # Remove the 'v' prefix from the version number
branch="release/v$version.x" # Determine the branch name
version_directory="version-$version" # Create a directory name based on the version
fi
Expand All @@ -42,39 +37,37 @@ for version in "${VERSIONS[@]}"; do
git fetch origin "$branch"
git checkout "$branch"

# Check if the branch exists in the remote repository
if ! git show-ref --verify "refs/remotes/origin/$branch" &>/dev/null; then
echo "Branch $branch does not exist in the remote repository."
continue
else
echo "Branch $branch exists, continuing..."
fi

# Run the pre.sh script
cd docs && sh ./pre.sh

for folder in "build" "learn"; do
if [ "$version" == "main" ]; then
cp -r "$WORK_DIR/cosmos-sdk/docs/$folder" "$WORK_DIR/docs/"
elif [[ -d "$WORK_DIR/cosmos-sdk/docs/docs/" ]]; then # 0.50 and 0.47
cp -r "$WORK_DIR/cosmos-sdk/docs/docs/$folder" "$WORK_DIR/versioned_docs/$version_directory/"
else
cp -r "$WORK_DIR/cosmos-sdk/docs/$folder" "$WORK_DIR/versioned_docs/$version_directory/"
fi
done
# Copy the 'build', 'learn' and 'user' directories to the 'docs' directory
if [ "$version" == "main" ]; then
cp -r "$WORK_DIR/cosmos-sdk/client/docs/swagger-ui/swagger.yaml" "$WORK_DIR/openapi/"
mkdir -p "$WORK_DIR/docs"
cp -r "$WORK_DIR/cosmos-sdk/docs/build" "$WORK_DIR/docs"
cp -r "$WORK_DIR/cosmos-sdk/docs/learn" "$WORK_DIR/docs"
cp -r "$WORK_DIR/cosmos-sdk/docs/user" "$WORK_DIR/docs"
cp -r "$WORK_DIR/cosmos-sdk/client/docs/swagger-ui/swagger.yaml" "$WORK_DIR/openapi/"
elif [ "$version" == "0.50" ] || [ "$version" == "0.47" ]; then
mkdir -p "$WORK_DIR/versioned_docs/$version_directory"
cp -r "$WORK_DIR/cosmos-sdk/docs/docs/build" "$WORK_DIR/versioned_docs/$version_directory"
cp -r "$WORK_DIR/cosmos-sdk/docs/docs/learn" "$WORK_DIR/versioned_docs/$version_directory"
cp -r "$WORK_DIR/cosmos-sdk/docs/docs/user" "$WORK_DIR/versioned_docs/$version_directory"
# add main tutorials on versioned_docs
cp -r $WORK_DIR/docs/tutorials "$WORK_DIR/versioned_docs/$version_directory"
else
mkdir -p "$WORK_DIR/versioned_docs/$version_directory"
cp -r "$WORK_DIR/cosmos-sdk/docs/build" "$WORK_DIR/versioned_docs/$version_directory"
cp -r "$WORK_DIR/cosmos-sdk/docs/learn" "$WORK_DIR/versioned_docs/$version_directory"
cp -r "$WORK_DIR/cosmos-sdk/docs/user" "$WORK_DIR/versioned_docs/$version_directory"
# add main tutorials on versioned_docs
cp -r $WORK_DIR/docs/tutorials "$WORK_DIR/versioned_docs/$version_directory"
fi

git checkout -- . # Discard changes to the repository
done

# Leave the 'cosmos-sdk' directory after processing
cd "$WORK_DIR"

# This is copied to ensure main and 0.50 are up to date with one another
cp -a "docs/user" "versioned_docs/version-0.50"

wget -O "docs/user/run-node/04-rosetta.md" "https://raw.githubusercontent.com/cosmos/rosetta/main/README.md"
cp -r "docs/user/run-node/04-rosetta.md" "versioned_docs/version-0.50/user/run-node/04-rosetta.md"

# Remove the 'cosmos-sdk' directory if needed
rm -rf ./cosmos-sdk
# Remove the 'cosmos-sdk' directory
rm -rf ./cosmos-sdk
18 changes: 8 additions & 10 deletions versioned_docs/version-0.50/build/build.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
---
sidebar_position: 0
---

# Build

* [Architecture](./architecture/README.md) - Overview and detailed explanation of the system architecture.
* [Building Apps](./building-apps/00-app-go.md) - The documentation in this section will guide you through the process of developing your dApp using the Cosmos SDK framework.
* [Modules](./modules/README.md) - Information about the various modules available in the Cosmos SDK: Auth, Authz, Bank, Crisis, Distribution, Evidence, Feegrant, Governance, Mint, Params, Slashing, Staking, Upgrade, NFT, Consensus, Circuit, Genutil.
* [Migrations](./migrations/01-intro.md) - See what has been updated in each release the process of the transition between versions.
* [Packages](./packages/README.md) - Explore a curated collection of pre-built modules and functionalities, streamlining the development process.
* [Tooling](./tooling/README.md) - A suite of utilities designed to enhance the development workflow, optimizing the efficiency of Cosmos SDK-based projects.
* [ADR's](./architecture/README.md) - Provides a structured repository of key decisions made during the development process, which have been documented and offers rationale behind key decisions being made.
* [RFC](./rfc/README.md) - A Request for Comments (RFC) is a record of discussion on an open-ended topic related to the design and implementation of the Cosmos SDK, for which no immediate decision is required.
* [Specifications](./spec/README.md) - A detailed reference for the specifications of various components and features.
* [REST API](https://docs.cosmos.network/api) - A comprehensive reference for the application programming interfaces (APIs) provided by the SDK.
* [Building Apps](./building-apps/00-app-go.md) - The documentation in this section will guide you through the process of developing your dApp using the Cosmos SDK framework.
* [Modules](./modules/README.md) - Information about the various modules available in the Cosmos SDK: Auth, Authz, Bank, Crisis, Distribution, Evidence, Feegrant, Governance, Mint, Params, Slashing, Staking, Upgrade, NFT, Consensus, Circuit, Genutil.
* [Migrations](./migrations/01-intro.md) - See what has been updated in each release the process of the transition between versions.
* [Packages](./packages/README.md) - Explore a curated collection of pre-built modules and functionalities, streamlining the development process.
* [Tooling](./tooling/README.md) - A suite of utilities designed to enhance the development workflow, optimizing the efficiency of Cosmos SDK-based projects.
* [ADR's](./architecture/README.md) - Provides a structured repository of key decisions made during the development process, which have been documented and offers rationale behind key decisions being made.
* [REST API](https://docs.cosmos.network/api) - A comprehensive reference for the application programming interfaces (APIs) provided by the SDK.
Loading

0 comments on commit 12812a0

Please sign in to comment.