-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #64 from blocknative/clean-logs
Clean logs, add metrics and reorg code
- Loading branch information
Showing
44 changed files
with
1,957 additions
and
2,071 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package blstools | ||
|
||
import ( | ||
"github.com/flashbots/go-boost-utils/bls" | ||
"github.com/flashbots/go-boost-utils/types" | ||
) | ||
|
||
func GenerateNewKeypair() (sk *bls.SecretKey, pubKey types.PublicKey, err error) { | ||
|
||
sk, pk, err := bls.GenerateNewKeypair() | ||
if err != nil { | ||
return nil, pubKey, err | ||
} | ||
err = pubKey.FromSlice(pk.Compress()) //nolint | ||
|
||
return sk, pubKey, err | ||
} | ||
|
||
func SecretKeyFromBytes(skBytes []byte) (sk *bls.SecretKey, pk types.PublicKey, err error) { | ||
sk, err = bls.SecretKeyFromBytes(skBytes[:]) | ||
if err != nil { | ||
return nil, types.PublicKey{}, err | ||
} | ||
|
||
err = pk.FromSlice(bls.PublicKeyFromSecretKey(sk).Compress()) //nolint | ||
|
||
return sk, pk, err | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
module github.com/blocknative/dreamboat | ||
|
||
go 1.18 | ||
go 1.19 | ||
|
||
require ( | ||
github.com/dgraph-io/badger/v2 v2.2007.3 | ||
|
Oops, something went wrong.