GithubHelp home page GithubHelp logo

chainbase-avs-contracts's Introduction

Chainbase Node

Chainbase node CLI Tools

Before registering as an AVS, ensure that the operator has already registered with EigenLayer. For reference, see: https://docs.eigenlayer.xyz/eigenlayer/operator-guides/operator-installation

Node health check

Operator can monitor the process alive by checking api: GET /eigen/node/health, http status 200 means OK

Local release

goreleaser release --snapshot --rm-dist

chainbase-avs-contracts's People

Contributors

ddl-hust avatar dekaiju avatar lxcong avatar

Watchers

jingang song avatar DragonKid avatar  avatar Alan Viast avatar  avatar Conan avatar H avatar

Forkers

0x0conan

chainbase-avs-contracts's Issues

when switch impl address to proxy address, call Register() meet signature problems

log:

level=ERROR msg="failed to get failure reason" error="call contract failed: execution reverted: ECDSA: invalid signature 's' value"

before
holesky:AVSContractAddress = "0x7F521D31170266E49B269B06C65555badEB2a195" which is just a common contract without proxy

signature part:

	r, s, err := ecdsa.Sign(rand.Reader, privateKey, digestHashSlice)
	if err != nil {
		log.Fatal(err)

	}
	v := new(big.Int).SetInt64(27) // v = 27 or 28 default:27
	signature := append(r.Bytes(), s.Bytes()...)
	signature = append(signature, byte(v.Uint64()))

after
holesky:AVSContractAddress = "0x5E78eFF26480A75E06cCdABe88Eb522D4D8e1C9d" which is a transparent proxy address which point to an avs impl

fix

  • notice above signature used a fixed V value
	sig, err := crypto.Sign(digestHashSlice, privateKey)
	if err != nil {
		return fmt.Errorf("failed to sign digest hash: %v", err)
	}
	r := new(big.Int).SetBytes(sig[:32])
	s := new(big.Int).SetBytes(sig[32:64])
	v := sig[64] + 27 // add 27 to v to conform with the Ethereum standard

	signature := append(r.Bytes(), s.Bytes()...)
	signature = append(signature, v)

actually it works

If we go one step further, how is the value of V specifically affected? In this case, is the signature failure really caused by upgrading the contract to a proxy contract?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.