Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: dymensionxyz/roller
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.9.0-alpha-rc14-hotfix1
Choose a base ref
...
head repository: dymensionxyz/roller
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref
Loading
Showing with 1,331 additions and 500 deletions.
  1. +1 −0 cmd/consts/consts.go
  2. +0 −2 cmd/consts/dymension.go
  3. +6 −0 cmd/consts/eibc.go
  4. +2 −0 cmd/eibc/eibc.go
  5. +69 −0 cmd/eibc/fulfill/feeshare/feeshare.go
  6. +2 −0 cmd/eibc/fulfill/fulfill.go
  7. +16 −0 cmd/eibc/fulfill/rollapps/remove/remove.go
  8. +18 −1 cmd/eibc/fulfill/rollapps/set/set.go
  9. +321 −317 cmd/eibc/init/init.go
  10. +54 −0 cmd/eibc/update/update.go
  11. +1 −1 cmd/observability/export/templates/grafana/dashboard.json
  12. +2 −0 cmd/relayer/relayer.go
  13. +9 −1 cmd/relayer/setup/setup.go
  14. +54 −0 cmd/relayer/update/update.go
  15. +31 −12 cmd/rollapp/drs/update/update.go
  16. +2 −1 cmd/rollapp/init/init.go
  17. +31 −13 cmd/rollapp/migrate/migrate.go
  18. +12 −13 cmd/rollapp/setup/setup.go
  19. +1 −7 cmd/rollapp/start/start.go
  20. +2 −11 cmd/rollapp/status/status.go
  21. +5 −3 go.mod
  22. +12 −6 go.sum
  23. +2 −2 relayer/create_ibc_channel.go
  24. +1 −4 sequencer/config.go
  25. +2 −0 sequencer/status.go
  26. +5 −2 utils/config/tomlconfig/toml.go
  27. +23 −5 utils/dependencies/dependencies.go
  28. +1 −1 utils/dependencies/dymd.go
  29. +10 −5 utils/dependencies/eibc-client.go
  30. +12 −7 utils/dependencies/relayer.go
  31. +7 −6 utils/dependencies/rollapp.go
  32. +0 −4 utils/dymint/dymint.go
  33. +34 −0 utils/eibc/config.go
  34. +2 −2 utils/eibc/eibc.go
  35. +346 −0 utils/eibc/operatormetadata.go
  36. +53 −0 utils/eibc/types.go
  37. +50 −0 utils/firebase/binaries.go
  38. +3 −3 utils/firebase/{firebase.go → drs.go}
  39. +1 −1 utils/rollapp/bechprefix.go
  40. +37 −0 utils/rollapp/rollapp.go
  41. +16 −14 utils/rollapp/types.go
  42. +7 −2 utils/roller/types.go
  43. +22 −11 utils/sequencer/sequencer.go
  44. +2 −0 utils/sequencer/types.go
  45. +1 −2 utils/service_manager/service.go
  46. +43 −41 utils/upgrades/evm-upgrades.go
1 change: 1 addition & 0 deletions cmd/consts/consts.go
Original file line number Diff line number Diff line change
@@ -15,6 +15,7 @@ const (
var InternalBinsDir = fmt.Sprintf("%s/roller_bins", binsDir)

var (
AllServices = []string{"rollapp", "da-light-client", "relayer", "eibc"}
RollappSystemdServices = []string{"rollapp", "da-light-client"}
RelayerSystemdServices = []string{"relayer"}
EibcSystemdServices = []string{"eibc"}
2 changes: 0 additions & 2 deletions cmd/consts/dymension.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package consts

const DefaultIndexer = "http://44.206.211.230:3000/"

var MainnetHubData = HubData{
Environment: "mainnet",
ApiUrl: "https://dymension-mainnet-rest.public.blastapi.io",
6 changes: 6 additions & 0 deletions cmd/consts/eibc.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
package consts

const (
DefaultIndexer = "http://44.206.211.230:3000/"
DefaultEibcOperatorFeeShare = 0.1
)
2 changes: 2 additions & 0 deletions cmd/eibc/eibc.go
Original file line number Diff line number Diff line change
@@ -7,6 +7,7 @@ import (
eibcinit "github.com/dymensionxyz/roller/cmd/eibc/init"
"github.com/dymensionxyz/roller/cmd/eibc/scale"
"github.com/dymensionxyz/roller/cmd/eibc/start"
"github.com/dymensionxyz/roller/cmd/eibc/update"
"github.com/dymensionxyz/roller/cmd/services"
loadservices "github.com/dymensionxyz/roller/cmd/services/load"
restartservices "github.com/dymensionxyz/roller/cmd/services/restart"
@@ -22,6 +23,7 @@ func Cmd() *cobra.Command {

cmd.AddCommand(eibcinit.Cmd())
cmd.AddCommand(start.Cmd())
cmd.AddCommand(update.Cmd())
cmd.AddCommand(scale.Cmd())
cmd.AddCommand(fulfill.Cmd())

69 changes: 69 additions & 0 deletions cmd/eibc/fulfill/feeshare/feeshare.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
package feeshare

import (
"os"
"path/filepath"
"strconv"

"github.com/pterm/pterm"
"github.com/spf13/cobra"

"github.com/dymensionxyz/roller/cmd/consts"
"github.com/dymensionxyz/roller/utils/config/yamlconfig"
eibcutils "github.com/dymensionxyz/roller/utils/eibc"
)

func Cmd() *cobra.Command {
cmd := &cobra.Command{
Use: "fee-share [fee-share]",
Short: "Set",
Example: "roller eibc fulfill fee-share 0.1",
Args: cobra.ExactArgs(1),
Run: func(cmd *cobra.Command, args []string) {
home, err := os.UserHomeDir()
if err != nil {
pterm.Error.Println("failed to get user home dir", err)
return
}

if err != nil {
pterm.Error.Println("failed to expand home directory")
return
}

eibcHome := filepath.Join(home, consts.ConfigDirName.Eibc)
eibcConfigPath := filepath.Join(eibcHome, "config.yaml")

fee := args[0]
ff, err := strconv.ParseFloat(fee, 64)
if err != nil {
pterm.Error.Printf("fee must be a valid number, got %s\n", fee)
return
}

updates := map[string]interface{}{
"operator.min_fee_share": ff,
}
err = yamlconfig.UpdateNestedYAML(eibcConfigPath, updates)
if err != nil {
pterm.Error.Println("failed to update config", err)
return
}

var cfg eibcutils.Config
err = cfg.LoadConfig(eibcConfigPath)
if err != nil {
pterm.Error.Println("failed to load eibc config: ", err)
return
}

err = eibcutils.UpdateGroupOperatorMinFee(eibcConfigPath, ff, cfg, home)
if err != nil {
pterm.Error.Println("failed to update eibc operator metadata: ", err)
return
}
},
}

return cmd
}
2 changes: 2 additions & 0 deletions cmd/eibc/fulfill/fulfill.go
Original file line number Diff line number Diff line change
@@ -3,6 +3,7 @@ package fulfill
import (
"github.com/spf13/cobra"

"github.com/dymensionxyz/roller/cmd/eibc/fulfill/feeshare"
"github.com/dymensionxyz/roller/cmd/eibc/fulfill/order"
"github.com/dymensionxyz/roller/cmd/eibc/fulfill/rollapps"
)
@@ -14,6 +15,7 @@ func Cmd() *cobra.Command {
}

cmd.AddCommand(order.Cmd())
cmd.AddCommand(feeshare.Cmd())
cmd.AddCommand(rollapps.Cmd())

return cmd
16 changes: 16 additions & 0 deletions cmd/eibc/fulfill/rollapps/remove/remove.go
Original file line number Diff line number Diff line change
@@ -10,6 +10,7 @@ import (

"github.com/dymensionxyz/roller/cmd/consts"
"github.com/dymensionxyz/roller/utils/eibc"
eibcutils "github.com/dymensionxyz/roller/utils/eibc"
"github.com/dymensionxyz/roller/utils/filesystem"
)

@@ -54,6 +55,7 @@ func Cmd() *cobra.Command {
return
}

lspn, _ := pterm.DefaultSpinner.Start("removing rollapp to eibc config")
config.RemoveChain(rollAppID)
updatedData, err := yaml.Marshal(&config)
if err != nil {
@@ -66,6 +68,20 @@ func Cmd() *cobra.Command {
pterm.Error.Printf("Error reading file: %v\n", err)
return
}
lspn.Success("rollapp removed from eibc config")

var cfg eibcutils.Config
err = cfg.LoadConfig(eibcConfigPath)
if err != nil {
pterm.Error.Println("failed to load eibc config: ", err)
return
}

err = eibcutils.UpdateGroupSupportedRollapps(eibcConfigPath, cfg, home)
if err != nil {
pterm.Error.Println("failed to update eibc operator metadata: ", err)
return
}
},
}

19 changes: 18 additions & 1 deletion cmd/eibc/fulfill/rollapps/set/set.go
Original file line number Diff line number Diff line change
@@ -10,6 +10,7 @@ import (

"github.com/dymensionxyz/roller/cmd/consts"
"github.com/dymensionxyz/roller/utils/eibc"
eibcutils "github.com/dymensionxyz/roller/utils/eibc"
"github.com/dymensionxyz/roller/utils/filesystem"
)

@@ -34,6 +35,7 @@ instance.
}

eibcHome := filepath.Join(home, consts.ConfigDirName.Eibc)
eibcConfigPath := filepath.Join(eibcHome, "config.yaml")
isEibcClientInitialized, err := filesystem.DirNotEmpty(eibcHome)
if err != nil {
pterm.Error.Println("failed to check eibc client initialized", err)
@@ -54,10 +56,25 @@ instance.

fNodes := strings.Split(fullNodes, ",")

err = eibc.AddRollappToEibc(rollAppID, eibcHome, fNodes)
lspn, _ := pterm.DefaultSpinner.Start("adding rollapp to eibc config")
err = eibc.AddRollappToEibcConfig(rollAppID, eibcHome, fNodes)
if err != nil {
return
}
lspn.Success("rollapp added to eibc config")

var cfg eibcutils.Config
err = cfg.LoadConfig(eibcConfigPath)
if err != nil {
pterm.Error.Println("failed to load eibc config: ", err)
return
}

err = eibcutils.UpdateGroupSupportedRollapps(eibcConfigPath, cfg, home)
if err != nil {
pterm.Error.Println("failed to update eibc operator metadata: ", err)
return
}
},
}

Loading