Git Product home page Git Product logo

chainbridge-utils's Introduction

Archiving notice:

This library is no longer in use and maintenance. All further development related to chainbridge will happen in the new repo. More detailed information about chainbridge-core you can find in its readme or Discussions.

If you already running an old ChainBridge version please consider checking chainbridge-migration scripts that allow migrating to a newer version of chainbridge.

chainbridge-utils

Utilities relating to chainbridge v1.

ChainSafe Security Policy

Reporting a Security Bug

We take all security issues seriously, if you believe you have found a security issue within a ChainSafe project please notify us immediately. If an issue is confirmed, we will take all necessary precautions to ensure a statement and patch release is made in a timely manner.

Please email us a description of the flaw and any related information (e.g. reproduction steps, version) to security at chainsafe dot io.

chainbridge-utils's People

Contributors

alirezaly avatar ansermino avatar p1sar avatar polycarpik avatar waymobetta avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

chainbridge-utils's Issues

Test failed when try to upgrade to GSRPC v3

Hi guys, i tried to upgrade GSRPC to v3(which support substrate v3) here, and then make test got some errors. I'm not sure these errors have any side effect

➜  chainbridge-utils git:(main) ✗ make test
go test ./...
ok  	github.com/ChainSafe/chainbridge-utils/blockstore	0.746s
ok  	github.com/ChainSafe/chainbridge-utils/core	1.426s
?   	github.com/ChainSafe/chainbridge-utils/crypto	[no test files]
ok  	github.com/ChainSafe/chainbridge-utils/crypto/secp256k1	0.461s
--- FAIL: TestNewKeypairFromSeed (0.02s)
    sr25519_test.go:16: failed to generate keyring pair from secret: exit status 1
--- FAIL: TestKeypair_AsKeyringPair (0.01s)
    sr25519_test.go:27: failed to generate keyring pair from secret: exit status 1
--- FAIL: TestEncodeAndDecodeKeypair (0.01s)
    sr25519_test.go:43: failed to generate keyring pair from secret: exit status 1
FAIL
FAIL	github.com/ChainSafe/chainbridge-utils/crypto/sr25519	0.728s
--- FAIL: TestEncryptAndDecryptFromFile_Sr25519 (0.01s)
    encrypt_test.go:114: failed to generate keyring pair from secret: exit status 1
--- FAIL: TestDecryptIncorrectType (0.01s)
    encrypt_test.go:139: failed to generate keyring pair from secret: exit status 1
FAIL
FAIL	github.com/ChainSafe/chainbridge-utils/keystore	1.123s
?   	github.com/ChainSafe/chainbridge-utils/metrics/health	[no test files]
?   	github.com/ChainSafe/chainbridge-utils/metrics/types	[no test files]
?   	github.com/ChainSafe/chainbridge-utils/msg	[no test files]
FAIL
make: *** [test] Error 1

Add Github actions CI

Story

As a contributor
I want my PR being automatically tested with CI process

Background

TravisCI was disabled.
Turn on GA with same flow as Travis was

Acceptance criteria

GA runs tests on new PRs

Add existing packages

We should add these packages, and any sub-packages, from ChainBridge:

  • crypto
  • keystore
  • message

Seperate health checks

Rather than have a single endpoint, we should create separate endpoints for each chain dynamically (eg. /health/goerli).

We should also allow for the blockTimeout to be configurable per chain.

Update deprecated package "golang.org/x/crypto/ssh/terminal" --> "golang.org/x/term"

The package golang.org/x/crypto/ssh/terminal has been deprecated and should be replaced by golang.org/x/term.

The deprecation of this package may be linked to an issue experienced by a Discord user (XanMan) whereby he encounters an error when attempting to input the password for his encrypted Keystore:

invalid input: The handle is invalid.
Enter password to encrypt keystore file:

Expected Behavior

Program should accept command line input without error

Current Behavior

Example command:
chainbridge accounts generate

  • This successfully creates the keys directory within ChainBridge repository root, then fails upon prompting the user for password (input).

Program is throwing error: The handle is invalid which is originating from the golang.org/x/crypto/ssh/terminal package and propagated by our method keystore.GetPassword as shown here.

Possible Solution

Update package golang.org/x/crypto/ssh/terminal to golang.org/x/term.

Steps to Reproduce (for bugs)

*Use windows machine

  1. chainbridge accounts generate
  2. attempt inputting keystore password

Related

Gossamer-1599

Versions

ChainBridge commit (or docker tag): v1.1.1
chainbridge-solidity version:
chainbridge-substrate version:
Go version: 1.16.4

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.