Skip to content

Commit

Permalink
Merge pull request #36 from rollkit/MSevey-patch-1
Browse files Browse the repository at this point in the history
chore: update dependabot.yml
  • Loading branch information
MSevey authored Sep 23, 2024
2 parents e01f97b + a7c6b4a commit 4aea9a2
Show file tree
Hide file tree
Showing 11 changed files with 55 additions and 56 deletions.
14 changes: 13 additions & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,22 @@ updates:
open-pull-requests-limit: 10
labels:
- T:dependencies
# Group all patch updates into a single PR
groups:
patch-updates:
applies-to: version-updates
update-types:
- "patch"
- package-ecosystem: gomod
directory: "/"
schedule:
interval: weekly
interval: daily
open-pull-requests-limit: 10
labels:
- T:dependencies
# Group all patch updates into a single PR
groups:
patch-updates:
applies-to: version-updates
update-types:
- "patch"
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ lint: vet
@echo "--> Running golangci-lint"
@golangci-lint run
@echo "--> Running markdownlint"
@markdownlint --config .markdownlint.yaml --ignore './cmd/rollkit/docs/*.md' '**/*.md'
@markdownlint --config .markdownlint.yaml '**/*.md'
@echo "--> Running yamllint"
@yamllint --no-warnings . -c .yamllint.yml

Expand All @@ -38,7 +38,7 @@ lint: vet
## fmt: Run fixes for linters.
fmt:
@echo "--> Formatting markdownlint"
@markdownlint --config .markdownlint.yaml --ignore './cmd/rollkit/docs/*.md' '**/*.md' -f
@markdownlint --config .markdownlint.yaml '**/*.md' -f
@echo "--> Formatting go"
@golangci-lint run --fix
.PHONY: fmt
Expand Down
1 change: 0 additions & 1 deletion sdk/docs/instructions/demo.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ parent: Instructions

# Run the demo RappDK rollup


## Prerequisites

- Go version >= 1.21
Expand Down
2 changes: 1 addition & 1 deletion sdk/docs/instructions/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
has_children: true
---

# Instructions
# Instructions
25 changes: 7 additions & 18 deletions sdk/docs/instructions/integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,13 @@ This guide will teach you how to integrate RappDK to your cometBFT chain.
```go
require (
...
github.com/rollkit/cosmos-sdk-starter/sdk
v<VERSION>
github.com/rollkit/cosmos-sdk-starter/sdk vX.Y.Z
...
)
```

Use our fork rollkit version:


```go
github.com/rollkit/rollkit => github.com/decentrio/rollkit v0.0.0-20240516071120-d40857416a55s
```
Expand All @@ -35,47 +33,38 @@ This guide will teach you how to integrate RappDK to your cometBFT chain.
```go
import (
...
rollkitstaking "github.com/rollkit/cosmos-sdk-starter/sdk
/x/staking"
rollkitstakingkeeper "github.com/rollkit/cosmos-sdk-starter/sdk
/x/staking/keeper"
rollkitstaking "github.com/rollkit/cosmos-sdk-starter/sdk/x/staking"
rollkitstakingkeeper "github.com/rollkit/cosmos-sdk-starter/sdk/x/staking/keeper"
...
)
```
2. Replace staking AppModule by RappDK staking
1. Replace staking AppModule by RappDK staking
In `app.ModuleManager` initial
replace
```go
staking.NewAppModule(appCodec, app.StakingKeeper, app.AccountKeeper, app.BankKeeper, app.GetSubspace(stakingtypes.ModuleName)),
```
by
```go
rollkitstaking.NewAppModule(appCodec, app.StakingKeeper, app.AccountKeeper, app.BankKeeper, app.GetSubspace(stakingtypes.ModuleName)),
```
3. Replace Cosmos-SDK staking keeper by RappDK staking keeper
1. Replace Cosmos-SDK staking keeper by RappDK staking keeper
In `app.StakingKeeper` initial
replace
```go
app.StakingKeeper = stakingkeeper.NewKeeper(
appCodec, runtime.NewKVStoreService(keys[stakingtypes.StoreKey]), app.AccountKeeper, app.BankKeeper, authtypes.NewModuleAddress(govtypes.ModuleName).String(), authcodec.NewBech32Codec(sdk.Bech32PrefixValAddr), authcodec.NewBech32Codec(sdk.Bech32PrefixConsAddr))
app.StakingKeeper = stakingkeeper.NewKeeper(appCodec, runtime.NewKVStoreService(keys[stakingtypes.StoreKey]), app.AccountKeeper, app.BankKeeper, authtypes.NewModuleAddress(govtypes.ModuleName).String(), authcodec.NewBech32Codec(sdk.Bech32PrefixValAddr), authcodec.NewBech32Codec(sdk.Bech32PrefixConsAddr))
```
by
```go
app.StakingKeeper = rollkitstakingkeeper.NewKeeper(
appCodec, runtime.NewKVStoreService(keys[stakingtypes.StoreKey]), app.AccountKeeper, app.BankKeeper, authtypes.NewModuleAddress(govtypes.ModuleName).String(), authcodec.NewBech32Codec(sdk.Bech32PrefixValAddr), authcodec.NewBech32Codec(sdk.Bech32PrefixConsAddr))
app.StakingKeeper = rollkitstakingkeeper.NewKeeper(appCodec, runtime.NewKVStoreService(keys[stakingtypes.StoreKey]), app.AccountKeeper, app.BankKeeper, authtypes.NewModuleAddress(govtypes.ModuleName).String(), authcodec.NewBech32Codec(sdk.Bech32PrefixValAddr), authcodec.NewBech32Codec(sdk.Bech32PrefixConsAddr))
```
## Configuring and adding sequencer module
Expand Down
6 changes: 3 additions & 3 deletions sdk/docs/instructions/migration.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ Before starting the migration process, make sure your chain have the following:

- Integrate rollkit-sdk to your chain following [this guideline](./integration.md)

- Integrate `RappDK` upgrade handler to your chain. Example upgrade handler could be found here [upgrade handler](https://github.com/rollkit/cosmos-sdk-starter/sdk
- Integrate `RappDK` upgrade handler to your chain. Example upgrade handler could be found here [upgrade handler](<https://github.com/rollkit/cosmos-sdk-starter/tree/main/sdk>
/blob/01103c74832314f77b3a9271d18c33d393bc0529/simapp/upgrade/upgrade.go#L28).

**Notice: make sure you use correct sequencer pubkey address in your upgrade handler. You need to set the new sequencer pubkey manually in [your upgrade handler logic](https://github.com/rollkit/cosmos-sdk-starter/sdk
**Notice: make sure you use correct sequencer pubkey address in your upgrade handler. You need to set the new sequencer pubkey manually in [your upgrade handler logic](<https://github.com/rollkit/cosmos-sdk-starter/tree/main/sdk>
/blob/01103c74832314f77b3a9271d18c33d393bc0529/simapp/upgrade/upgrade.go#L30)**

### 2. Submit Upgrade proposal
Expand All @@ -35,7 +35,7 @@ Before starting the migration process, make sure your chain have the following:

When the `upgrade_height` is reached, before run new binary, all node provider and validator need to migrate their node data by using this command:

```
```bash
[app_name] rollup-migration --home [node_dir]
```

Expand Down
18 changes: 8 additions & 10 deletions sdk/docs/intergrationv2.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,37 +2,35 @@

This guide will teach you how to integrate RappDK to your cometBFT chain using depinject.


1. Add the rollkit-sdk package to the go.mod and install it.

```go
require (
...
github.com/rollkit/cosmos-sdk-starter/sdk
v<VERSION>
github.com/rollkit/cosmos-sdk-starter/sdk vX.Y.Z
...
)
```

Use our fork rollkit version:


```go
github.com/rollkit/rollkit => github.com/decentrio/rollkit v0.0.0-20240516071120-d40857416a55s
```

**Notice: Migration requires Rollkit to allow ABCI valset changes so using our fork version is for this. We're working with Rollkit team for upstream this feature ! [Issue Link](https://github.com/rollkit/rollkit/issues/1673) !**
2. Add sequencer and staking module into appconfig.go
1. Add sequencer and staking module into appconfig.go
In this step, you should add sequencer and wrapper staking module to your `app.go` and `appconfig.go` like other normal module in cosmos-SDK.
We have instruction here: https://docs.cosmos.network/main/build/building-apps/app-go-v2.
We have instruction here: <https://docs.cosmos.network/main/build/building-apps/app-go-v2>.
3. Add upgrade handler
1. Add upgrade handler
Example upgrade handler:
```
Example upgrade handler:
```go
func CreateUpgradeHandler(mm *module.Manager, configurator module.Configurator, seqKeeper sequencerkeeper.Keeper, sk stakingkeeper.Keeper) upgradetypes.UpgradeHandler {
return func(ctx context.Context, plan upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) {
seqPubkey := "J3ZVpvQv18IveVGkRuW+Yog9R/7E4gTWLzWIRiOw9Zk="
Expand Down Expand Up @@ -71,4 +69,4 @@ func CreateUpgradeHandler(mm *module.Manager, configurator module.Configurator,
}
}
```
```
2 changes: 1 addition & 1 deletion sdk/docs/modules/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
has_children: true
---

# Modules
# Modules
1 change: 0 additions & 1 deletion sdk/docs/modules/sequencer.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,3 @@ Since the x/staking now only manages the governators, it should no longer be mea
Sequencer is the module that manages the actual valset (the sequencer). It's the only module that can make `abci valset update` to rollkit. When initializing a rollkit rollup, we now have the sequencer module init the actual valset (sequencer) instead of the staking module.

This module can potentially be integrated with other sequencing schemes (such as shared sequencer) other than the current single sequencer

4 changes: 3 additions & 1 deletion sdk/docs/nodummytoken.md
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
// TODO
# No Dummy Token

TBD
34 changes: 17 additions & 17 deletions sdk/proto/buf.yaml
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
breaking:
use:
- FILE
- FILE
deps:
- buf.build/protocolbuffers/wellknowntypes
- buf.build/cosmos/cosmos-sdk
- buf.build/cosmos/cosmos-proto
- buf.build/cosmos/gogo-proto
- buf.build/googleapis/googleapis
- buf.build/cosmos/ics23
- buf.build/cosmos/ibc
- buf.build/protocolbuffers/wellknowntypes
- buf.build/cosmos/cosmos-sdk
- buf.build/cosmos/cosmos-proto
- buf.build/cosmos/gogo-proto
- buf.build/googleapis/googleapis
- buf.build/cosmos/ics23
- buf.build/cosmos/ibc
lint:
except:
- UNARY_RPC
- COMMENT_FIELD
- SERVICE_SUFFIX
- PACKAGE_VERSION_SUFFIX
- RPC_REQUEST_STANDARD_NAME
- UNARY_RPC
- COMMENT_FIELD
- SERVICE_SUFFIX
- PACKAGE_VERSION_SUFFIX
- RPC_REQUEST_STANDARD_NAME
ignore:
- tendermint
- tendermint
use:
- DEFAULT
- COMMENTS
- FILE_LOWER_SNAKE_CASE
- DEFAULT
- COMMENTS
- FILE_LOWER_SNAKE_CASE
version: v1

0 comments on commit 4aea9a2

Please sign in to comment.