Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin' into eric/remove-lsm
Browse files Browse the repository at this point in the history
  • Loading branch information
Eric-Warehime committed Dec 9, 2024
2 parents e896034 + 46b17a3 commit b1e867e
Show file tree
Hide file tree
Showing 30 changed files with 388 additions and 60 deletions.
2 changes: 1 addition & 1 deletion .changelog/v21.0.1/bug-fixes/3418-bump-cosmossdk-math.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
- Bump [cosmossdk.io/math](https://github.com/cosmos/cosmos-sdk/tree/main/math) to
[v1.4.0](https://github.com/cosmos/cosmos-sdk/tree/math/v1.4.0) in order to
address the the [ASA-2024-010](https://github.com/cosmos/cosmos-sdk/security/advisories/GHSA-7225-m954-23v7)
address the [ASA-2024-010](https://github.com/cosmos/cosmos-sdk/security/advisories/GHSA-7225-m954-23v7)
security advisory.
([\#3418](https://github.com/cosmos/gaia/pull/3418))
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Please go the the `Preview` tab and select the appropriate sub-template:
Please go the `Preview` tab and select the appropriate sub-template:

* [Production code](?expand=1&template=production.md) - for types `fix`, `feat`, and `refactor`.
* [Docs](?expand=1&template=docs.md) - for documentation changes.
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
make build-docs
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@v4.6.8
uses: JamesIves/github-pages-deploy-action@v4.7.2
with:
branch: gh-pages
folder: ~/output
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/docker-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,13 @@ jobs:

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5.5.1
uses: docker/metadata-action@v5.6.1
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
flavor: "latest=false"

- name: Build and push docker image
uses: docker/build-push-action@v6.9.0
uses: docker/build-push-action@v6.10.0
with:
context: .
file: Dockerfile
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/release-sims.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
go-version: 1.22.x
- name: Install runsim
run: go install github.com/cosmos/tools/cmd/[email protected]
- uses: actions/cache@v4.1.1
- uses: actions/cache@v4.2.0
with:
path: ~/go/bin
key: ${{ runner.os }}-go-runsim-binary
Expand All @@ -40,7 +40,7 @@ jobs:
steps:
- name: install runsim
run: go install github.com/cosmos/tools/cmd/[email protected]
- uses: actions/cache@v4.1.1
- uses: actions/cache@v4.2.0
with:
path: ~/go/bin
key: ${{ runner.os }}-go-runsim-binary
Expand All @@ -50,7 +50,7 @@ jobs:
needs: [build, install-runsim]
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4.1.1
- uses: actions/cache@v4.2.0
with:
path: ~/go/bin
key: ${{ runner.os }}-go-runsim-binary
Expand All @@ -72,7 +72,7 @@ jobs:
**/**.go
go.mod
go.sum
- uses: actions/cache@v4.1.1
- uses: actions/cache@v4.2.0
with:
path: ~/go/bin
key: ${{ runner.os }}-go-runsim-binary
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/sim-label.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
go-version: 1.22.x
- name: Install runsim
run: go install github.com/cosmos/tools/cmd/[email protected]
- uses: actions/cache@v4.1.1
- uses: actions/cache@v4.2.0
with:
path: ~/go/bin
key: ${{ runner.os }}-go-runsim-binary
Expand All @@ -34,7 +34,7 @@ jobs:
- uses: actions/setup-go@v5
with:
go-version: 1.22.x
- uses: actions/cache@v4.1.1
- uses: actions/cache@v4.2.0
with:
path: ~/go/bin
key: ${{ runner.os }}-go-runsim-binary
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/sims.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
go-version: 1.22.x
- name: Install runsim
run: go install github.com/cosmos/tools/cmd/[email protected]
- uses: actions/cache@v4.1.1
- uses: actions/cache@v4.2.0
with:
path: ~/go/bin
key: ${{ runner.os }}-go-runsim-binary
Expand All @@ -43,7 +43,7 @@ jobs:
**/**.go
go.mod
go.sum
- uses: actions/cache@v4.1.1
- uses: actions/cache@v4.2.0
with:
path: ~/go/bin
key: ${{ runner.os }}-go-runsim-binary
Expand All @@ -67,7 +67,7 @@ jobs:
**/**.go
go.mod
go.sum
- uses: actions/cache@v4.1.1
- uses: actions/cache@v4.2.0
with:
path: ~/go/bin
key: ${{ runner.os }}-go-runsim-binary
Expand All @@ -85,7 +85,7 @@ jobs:
go-version: 1.22.x
- name: Install runsim
run: go install github.com/cosmos/tools/cmd/[email protected]
- uses: actions/cache@v4.1.1
- uses: actions/cache@v4.2.0
with:
path: ~/go/bin
key: ${{ runner.os }}-go-runsim-binary
Expand All @@ -96,7 +96,7 @@ jobs:
steps:
- name: install runsim
run: go install github.com/cosmos/tools/cmd/[email protected]
- uses: actions/cache@v4.1.1
- uses: actions/cache@v4.2.0
with:
path: ~/go/bin
key: ${{ runner.os }}-go-runsim-binary
Expand All @@ -109,7 +109,7 @@ jobs:
with:
go-version: 1.22.x
- uses: actions/checkout@v4
- uses: actions/cache@v4.1.1
- uses: actions/cache@v4.2.0
with:
path: ~/go/bin
key: ${{ runner.os }}-go-runsim-binary
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
**/go.sum
**/Makefile
Makefile
- uses: actions/cache@v4.1.1
- uses: actions/cache@v4.2.0
with:
path: |
~/.cache/go-build
Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

- Bump [cosmossdk.io/math](https://github.com/cosmos/cosmos-sdk/tree/main/math) to
[v1.4.0](https://github.com/cosmos/cosmos-sdk/tree/math/v1.4.0) in order to
address the the [ASA-2024-010](https://github.com/cosmos/cosmos-sdk/security/advisories/GHSA-7225-m954-23v7)
address the [ASA-2024-010](https://github.com/cosmos/cosmos-sdk/security/advisories/GHSA-7225-m954-23v7)
security advisory.
([\#3418](https://github.com/cosmos/gaia/pull/3418))

Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ When proposing an architecture decision for Gaia, please start by opening an [is

If your architecture decision is a simple change, you may contribute directly without writing an ADR. However, if you are proposing a significant change, please include a corresponding ADR.

To create an ADR, follow the [template](./docs/architecture/adr-template.md) and [doc](./docs/architecture/README.md). If you would like to see examples of how these are written, please refer to the current [ADRs](https://github.com/cosmos/gaia/tree/main/docs/architecture).
To create an ADR, follow the [template](https://github.com/cosmos/gaia/blob/main/docs/docs/architecture/templates/adr-template.md) and [doc](https://github.com/cosmos/gaia/blob/main/docs/docs/architecture/README.md). If you would like to see examples of how these are written, please refer to the current [ADRs](https://github.com/cosmos/gaia/tree/main/docs/docs/architecture).

## Development Procedure

Expand Down
4 changes: 2 additions & 2 deletions STATE-COMPATIBILITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ func someInternalMethod(ctx sdk.Context) {
- It will run out of gas with `gasUsed = 2100` where 2100 is getting merkelized
into the tx results.

Therefore, we introduced a state-incompatibility by merklezing diverging gas
Therefore, we introduced a state-incompatibility by merkelizing diverging gas
usage.

## Secondary Limitations To Keep In Mind
Expand Down Expand Up @@ -208,4 +208,4 @@ to predict when the multi-threaded state can be updated.

### Hardware Errors

This is out of the developer's control but is mentioned for completeness.
This is out of the developer's control but is mentioned for completeness.
4 changes: 2 additions & 2 deletions app/keepers/keepers.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package keepers

import (
"fmt"
"errors"
"os"

feemarketkeeper "github.com/skip-mev/feemarket/x/feemarket/keeper"
Expand Down Expand Up @@ -600,7 +600,7 @@ func (r *DefaultFeemarketDenomResolver) ConvertToDenom(_ sdk.Context, coin sdk.D
return coin, nil
}

return sdk.DecCoin{}, fmt.Errorf("error resolving denom")
return sdk.DecCoin{}, errors.New("error resolving denom")
}

func (r *DefaultFeemarketDenomResolver) ExtraDenoms(_ sdk.Context) ([]string, error) {
Expand Down
3 changes: 2 additions & 1 deletion app/sim/sim_state.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package sim

import (
"encoding/json"
"errors"
"fmt"
"io"
"math/rand"
Expand Down Expand Up @@ -245,7 +246,7 @@ func AppStateFromGenesisFileFn(r io.Reader, cdc codec.JSONCodec, genesisFile str

a, ok := acc.GetCachedValue().(sdk.AccountI)
if !ok {
return genesis, nil, fmt.Errorf("expected account")
return genesis, nil, errors.New("expected account")
}

// create simulator accounts
Expand Down
6 changes: 3 additions & 3 deletions cmd/gaiad/cmd/testnet_set_local_validator.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ func getCommandArgs(appOpts servertypes.AppOptions) (valArgs, error) {
// validate and set validator operator address
valoperAddress := cast.ToString(appOpts.Get(flagValidatorOperatorAddress))
if valoperAddress == "" {
return args, fmt.Errorf("invalid validator operator address string")
return args, errors.New("invalid validator operator address string")
}
_, err := sdk.ValAddressFromBech32(valoperAddress)
if err != nil {
Expand All @@ -100,7 +100,7 @@ func getCommandArgs(appOpts servertypes.AppOptions) (valArgs, error) {
// validate and set validator pubkey
validatorPubKey := cast.ToString(appOpts.Get(flagValidatorPubKey))
if validatorPubKey == "" {
return args, fmt.Errorf("invalid validator pubkey string")
return args, errors.New("invalid validator pubkey string")
}
decPubKey, err := base64.StdEncoding.DecodeString(validatorPubKey)
if err != nil {
Expand Down Expand Up @@ -135,7 +135,7 @@ func getCommandArgs(appOpts servertypes.AppOptions) (valArgs, error) {
// home dir
homeDir := cast.ToString(appOpts.Get(flags.FlagHome))
if homeDir == "" {
return args, fmt.Errorf("invalid home dir")
return args, errors.New("invalid home dir")
}
args.homeDir = homeDir

Expand Down
2 changes: 1 addition & 1 deletion docs/DOCS_README.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ After building the docs website you can start it with `npm run serve`.
2. Edit API docs
1. Directly Edit API docs manually: `cmd/gaiad/swagger-ui/swagger.yaml`.
2. Edit API docs within the [Swagger Editor](https://editor.swagger.io/). Please refer to this [document](https://swagger.io/docs/specification/2-0/basic-structure/) for the correct structure in `.yaml`.
3. Download `swagger.yaml` and replace the old `swagger.yaml` under fold `cmd/gaiad/swagger-ui`.
3. Download `swagger.yaml` and replace the old `swagger.yaml` under folder `cmd/gaiad/swagger-ui`.
4. Compile gaiad

```bash
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/delegators/delegator-faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,4 +95,4 @@ There is one main slashing condition:

- **Double signing:** If someone reports on that a validator signed two different blocks with the same chain ID at the same height, this validator will get slashed.

This is why Atom holders should perform careful due diligence on validators before delegating. It is also important that delegators actively monitor the activity of their validators. If a validator behaves suspiciously or is too often offline, delegators can choose to unbond from them or switch to another validator. **Delegators can also mitigate risk by distributing their stake across multiple validators.**s
This is why Atom holders should perform careful due diligence on validators before delegating. It is also important that delegators actively monitor the activity of their validators. If a validator behaves suspiciously or is too often offline, delegators can choose to unbond from them or switch to another validator. **Delegators can also mitigate risk by distributing their stake across multiple validators.**
4 changes: 2 additions & 2 deletions docs/docs/delegators/delegator-security.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ The launch of any public blockchain is an incredibly exciting time, and it's def

## Social Engineering

[Social engineering](https://en.wikipedia.org/wiki/Social_engineering_(security)) has existed for about as long as human beings have been on the planet, and in the technical era, it usually takes in the form of [phishing](https://ssd.eff.org/en/module/how-avoid-phishing-attacks) or [spearphishing](https://en.wikipedia.org/wiki/Phishing#Spear_phishing) . Both of these attacks are wildly successful forms of trickery that are responsible for over 95% of account security breaches, and they don't just happen via email: these days, opportunistic and targeted phishing attempts take place [anywhere that you have an inbox](https://www.umass.edu/it/security/phishing-fraudulent-emails-text-messages-phone-calls) . It doesn't matter if you're using Signal, Telegram, SMS, Twitter, or just checking your DMs on forums or social networks, attackers have a [plethora of opportunities](https://lucris.lub.lu.se/ws/portalfiles/portal/85420559/The_Weaponization_of_Social_Media_Bossetta_2018_.pdf) to gain foothold in your digital life in effort to separate you from valuable information and assets that you most definitely don't want to lose. If a deal pops up that [sounds too good to be true](https://www.psychologytoday.com/us/blog/mind-in-the-machine/201712/how-fear-is-being-used-manipulate-cryptocurrency-markets) , or a message shows up asking for information that should never, ever be shared with someone else, you can always verify it before engaging with it by navigating to our official website or an official Cosmos communication channel on your own.
[Social engineering](https://en.wikipedia.org/wiki/Social_engineering_(security)) has existed for about as long as human beings have been on the planet, and in the technical era, it usually takes in the form of [phishing](https://ssd.eff.org/en/module/how-avoid-phishing-attacks) or [spearphishing](https://en.wikipedia.org/wiki/Phishing#Spear_phishing) . Both of these attacks are wildly successful forms of trickery that are responsible for over 95% of account security breaches, and they don't just happen via email: these days, opportunistic and targeted phishing attempts take place [anywhere that you have an inbox](https://www.umass.edu/it/security/phishing-fraudulent-emails-text-messages-phone-calls) . It doesn't matter if you're using Signal, Telegram, SMS, Twitter, or just checking your DMs on forums or social networks, attackers have a [plethora of opportunities](https://lucris.lub.lu.se/ws/portalfiles/portal/85420559/The_Weaponization_of_Social_Media_Bossetta_2018_.pdf) to gain foothold in your digital life in an effort to separate you from valuable information and assets that you most definitely don't want to lose. If a deal pops up that [sounds too good to be true](https://www.psychologytoday.com/us/blog/mind-in-the-machine/201712/how-fear-is-being-used-manipulate-cryptocurrency-markets) , or a message shows up asking for information that should never, ever be shared with someone else, you can always verify it before engaging with it by navigating to our official website or an official Cosmos communication channel on your own.

* **Be skeptical of unexpected attachments, or emails that ask you to visit a suspicious or unfamiliar website in the context of blockchains or cryptocurrency.** An attacker may attempt to lure you to a [compromised site](https://blog.malwarebytes.com/cybercrime/2013/02/tools-of-the-trade-exploit-kits/) designed to steal sensitive information from your computer. If you're a Gmail user, test your resilience against the latest email-based phishing tactics [here](https://phishingquiz.withgoogle.com/) .

Expand All @@ -19,7 +19,7 @@ If you receive an email or tweet that sounds too good to be true, is likely to b

## Key Management

The best way to minimize the risk of theft or loss of ATOM is to have a strong storage and backup strategy for your private keys. The safest way to store your keys is offline, either in a cryptocurrency wallet or on a device that you never connect to the internet. The best backup strategy for your k yes is to ensure that you have multiple copies of them stored in safe places, and to take specific measures to protect at least one copy of your keys from any kind of natural disaster that is a likely possibility in your part of the world.
The best way to minimize the risk of theft or loss of ATOM is to have a strong storage and backup strategy for your private keys. The safest way to store your keys is offline, either in a cryptocurrency wallet or on a device that you never connect to the internet. The best backup strategy for your kyes is to ensure that you have multiple copies of them stored in safe places, and to take specific measures to protect at least one copy of your keys from any kind of natural disaster that is a likely possibility in your part of the world.

**To protect your ATOM, do not share your 12 words with anyone.** The only person who should ever need to know them is you. You do not need to share your private keys if you're delegating ATOM to a validator on the network or to use custodial services. If anyone asks for your key material,

Expand Down
2 changes: 1 addition & 1 deletion docs/docs/governance/process.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ The deposit period lasts either 14 days or until the proposal deposit totals 250

Prior to a governance proposal entering the voting period (i.e., for the proposal to be voted upon), there must be at least a minimum number of ATOMs deposited (250). Anyone may contribute to this deposit, though it is usually filled by the proposal maker. Deposits of passed and failed proposals are returned to the contributors.

In the past, different people have considered contributions amounts differently. There is some consensus that this should be a personal choice. There is also some consensus that this can be an opportunity for supporters to signal their support by adding to the deposit amount, so a proposer may choose to leave contribution room (i.e., a deposit below 250 ATOMs) so that others may participate. It is important to remember that any contributed ATOMs are at risk of being burned.
In the past, different people have considered contribution amounts differently. There is some consensus that this should be a personal choice. There is also some consensus that this can be an opportunity for supporters to signal their support by adding to the deposit amount, so a proposer may choose to leave contribution room (i.e., a deposit below 250 ATOMs) so that others may participate. It is important to remember that any contributed ATOMs are at risk of being burned.

### Burned deposits

Expand Down
2 changes: 1 addition & 1 deletion docs/docs/governance/proposal-types/text-prop.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ Enter proposal title: Title
Enter proposal authors: Author
Enter proposal summary: Proposal summary
Enter proposal details: Details, all the details
Enter proposal proposal forum url: /
Enter proposal forum url: /
Enter proposal vote option context: Vote yes if <...>
Enter proposal deposit: 100001uatom
```
Expand Down
4 changes: 2 additions & 2 deletions docs/docs/modules/lsm-staking.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ LSM shares are not fungible (as they are tied to a delegator/validator pair) and

## Benefits

By tokenizing your staked ATOM into LSM shares, you maintain the benefits of staking while gaining flexibility in using these shares in DeFi protcols and platforms.
By tokenizing your staked ATOM into LSM shares, you maintain the benefits of staking while gaining flexibility in using these shares in DeFi protocols and platforms.

The LSM shares issued by the Hub are powering liquid staking derivatives like stATOM or dATOM and they are the backbone of the Hydro plaftorm.
The LSM shares issued by the Hub are powering liquid staking derivatives like stATOM or dATOM and they are the backbone of the Hydro platform.
Loading

0 comments on commit b1e867e

Please sign in to comment.