Skip to content

Commit

Permalink
Merge branch 'main' of github.com:omni-network/omni into dependabot/g…
Browse files Browse the repository at this point in the history
…o_modules/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp-1.33.0
  • Loading branch information
kc1116 committed Dec 21, 2024
2 parents 2984795 + e122fd6 commit 77c9667
Show file tree
Hide file tree
Showing 110 changed files with 1,892 additions and 613 deletions.
128 changes: 0 additions & 128 deletions CODE_OF_CONDUCT.md

This file was deleted.

10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<h1 align="center">Omni Monorepo</h1>

<p align="center"><a href="https://docs.omni.network/"><img src="https://img.shields.io/badge/Docs-docs.omni.network-blue.svg"></a>
<a href="https://github.com/omni-network/omni/releases/"><img src="https://img.shields.io/github/release/omni-network/omni.svg"></a>
<p align="center"><a href="https://docs.omni.network/"><img src="https://img.shields.io/badge/Docs-docs.omni.network-176CFF.svg"></a>
<a href="https://github.com/omni-network/omni/releases/"><img src="https://img.shields.io/github/release/omni-network/omni.svg?color=176CFF"></a>
<a href="https://goreportcard.com/report/github.com/omni-network/omni"><img src="https://goreportcard.com/badge/github.com/omni-network/omni"></a>
<a href="https://github.com/omni-network/omni/actions?query=workflow%3Aci-main"><img src="https://img.shields.io/github/actions/workflow/status/omni-network/omni/ci-main.yaml?label=Tests&logoColor=white" alt="Tests"></a>
<a href="https://x.com/OmniFDN"><img src="https://img.shields.io/twitter/follow/OmniFDN.svg?label=Follow"></a></p>

<div align="center"><img src="static/omni_banner.png" alt="Logo"></div>
<div align="center"><img src="docs/website/static/img/omni-banner.png" alt="Logo"></div>

## About Omni

Expand Down Expand Up @@ -58,7 +58,7 @@ _If any of above commands fail, see the [troubleshooting section](./e2e/README.m

## Contributing

We are open to contributions, but don't currently have a formal process for contributors. If you are interested, browse through [open issues](https://github.com/omni-network/omni/issues), read our [code of conduct](./CODE_OF_CONDUCT.md), or chat with the team.
We are open to contributions, but don't currently have a formal process for contributors. If you are interested, browse through [open issues](https://github.com/omni-network/omni/issues) or reach out to chat with the team.

Follow these steps to set up a functional development environment:

Expand All @@ -72,4 +72,4 @@ Follow these steps to set up a functional development environment:

## Security

Please refer to [SECURITY.md](./SECURITY.md).
We are currently setting up a Bug Bounty program via Immunefi. Until then, you can report security issues to us via email at security at omni dot network.
25 changes: 0 additions & 25 deletions SECURITY.md

This file was deleted.

8 changes: 4 additions & 4 deletions cli/cmd/register.go → cli/cmd/avs_register.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@ type RegDeps struct {

type regOpt func(*RegDeps)

// Register registers the operator with the omni AVS contract.
// AVSRegister registers the operator with the omni AVS contract.
//
// It assumes that the operator is already registered with the Eigen-Layer
// and that the eigen-layer configuration file (and ecdsa keystore) is present on disk.
func Register(ctx context.Context, cfg RegConfig, opts ...regOpt) error {
func AVSRegister(ctx context.Context, cfg RegConfig, opts ...regOpt) error {
// Default dependencies.
deps := RegDeps{
Prompter: eigenutils.NewPrompter(),
Expand Down Expand Up @@ -137,8 +137,8 @@ func Register(ctx context.Context, cfg RegConfig, opts ...regOpt) error {
return nil
}

// Deregister deregisters the operator from the omni AVS contract.
func Deregister(ctx context.Context, cfg RegConfig, opts ...regOpt) error {
// AVSDeregister deregisters the operator from the omni AVS contract.
func AVSDeregister(ctx context.Context, cfg RegConfig, opts ...regOpt) error {
// Default dependencies.
deps := RegDeps{
Prompter: eigenutils.NewPrompter(),
Expand Down
4 changes: 2 additions & 2 deletions cli/cmd/register_test.go → cli/cmd/avs_register_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,7 @@ func registerOperator(t *testing.T, ctx context.Context, contracts Contracts, b
AVSAddr: contracts.OmniAVSAddr.Hex(),
}

err = clicmd.Register(ctx, regCfg, testOpts)
err = clicmd.AVSRegister(ctx, regCfg, testOpts)
tutil.RequireNoError(t, err)
}

Expand Down Expand Up @@ -570,7 +570,7 @@ func deregisterOperator(t *testing.T, ctx context.Context, contracts Contracts,
AVSAddr: contracts.OmniAVSAddr.Hex(),
}

err = clicmd.Deregister(ctx, regCfg, testOpts)
err = clicmd.AVSDeregister(ctx, regCfg, testOpts)
tutil.RequireNoError(t, err)
}

Expand Down
16 changes: 8 additions & 8 deletions cli/cmd/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ func newOperatorCmds() *cobra.Command {
}

cmd.AddCommand(
newRegisterCmd(),
newDeregisterCmd(),
newAVSRegisterCmd(),
newAVSDeregisterCmd(),
newInitCmd(),
newCreateValCmd(),
newCreateOperatorKeyCmd(),
Expand All @@ -41,19 +41,19 @@ func newOperatorCmds() *cobra.Command {
return cmd
}

func newRegisterCmd() *cobra.Command {
func newAVSRegisterCmd() *cobra.Command {
var cfg RegConfig

cmd := &cobra.Command{
Use: "register",
Use: "avs-register",
Short: "Register an operator with the Omni AVS contract",
Long: `Register command expects a Eigen-Layer yaml config file as an argument
to successfully register an operator address with the Omni AVS contract.
Note the operator must already be registered with Eigen-Layer.`,
Args: cobra.NoArgs,
RunE: func(cmd *cobra.Command, _ []string) error {
err := Register(cmd.Context(), cfg)
err := AVSRegister(cmd.Context(), cfg)
if err != nil {
return errors.Wrap(err, "registration failed")
}
Expand All @@ -67,19 +67,19 @@ Note the operator must already be registered with Eigen-Layer.`,
return cmd
}

func newDeregisterCmd() *cobra.Command {
func newAVSDeregisterCmd() *cobra.Command {
var cfg RegConfig

cmd := &cobra.Command{
Use: "deregister",
Use: "avs-deregister",
Short: "Deregister an operator from the Omni AVS contract",
Long: `Deregister command expects a EigenLayer yaml config file as an argument
to successfully deregister an operator from the Omni AVS contract.
Note the operator must already be registered on the Omni AVS contract.`,
Args: cobra.NoArgs,
RunE: func(cmd *cobra.Command, _ []string) error {
err := Deregister(cmd.Context(), cfg)
err := AVSDeregister(cmd.Context(), cfg)
if err != nil {
return errors.Wrap(err, "deregistration failed")
}
Expand Down
1 change: 1 addition & 0 deletions cli/cmd/compose.yaml.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ services:
container_name: halo
image: omniops/halovisor:{{.HaloTag}}
restart: unless-stopped
environment: [{{ if .GenesisBinary}}COSMOVISOR_CUSTOM_GENESIS={{.GenesisBinary}}{{ end }}]
ports:
- 26656:26656 # CometBFT Consensus P2P
- 26657:26657 # CometBFT Consensus RPC
Expand Down
3 changes: 3 additions & 0 deletions cli/cmd/flags.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package cmd

import (
"github.com/omni-network/omni/lib/feature"
"github.com/omni-network/omni/lib/netconf"

"github.com/spf13/cobra"
Expand Down Expand Up @@ -28,11 +29,13 @@ func bindRegConfig(cmd *cobra.Command, cfg *RegConfig) {

func bindInitConfig(cmd *cobra.Command, cfg *InitConfig) {
netconf.BindFlag(cmd.Flags(), &cfg.Network)
feature.BindFlag(cmd.Flags(), &cfg.HaloFeatureFlags)
cmd.Flags().StringVar(&cfg.Moniker, "moniker", "", "Human-readable node name used in p2p networking")
cmd.Flags().StringVar(&cfg.Home, "home", "", "Home directory. If empty, defaults to: $HOME/.omni/<network>/")
cmd.Flags().BoolVar(&cfg.Clean, "clean", cfg.Clean, "Delete contents of home directory")
cmd.Flags().BoolVar(&cfg.Archive, "archive", cfg.Archive, "Enable archive mode. Note this requires more disk space")
cmd.Flags().BoolVar(&cfg.Debug, "debug", cfg.Debug, "Configure nodes with debug log level")
cmd.Flags().StringVar(&cfg.HaloTag, "halo-tag", cfg.HaloTag, "Configure halo tag to use for node")
}

func bindAVSAddress(cmd *cobra.Command, addr *string) {
Expand Down
Loading

0 comments on commit 77c9667

Please sign in to comment.