Skip to content

This repo is intended to provide signature services for arbiters.

License

Notifications You must be signed in to change notification settings

BeL2Labs/Arbiter_Signer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Arbiter Signer

Go Report Card Build Status MIT License GoDoc

Introduction

The Arbiter Signer is used to provide signing services for the bel2 loan arbiter.

Requirements

Go 1.20 or newer.

Build and run

1. build arbiter

use main branch to build:

$ git clone [email protected]:BeL2Labs/Arbiter_Signer.git

$ cd Arbiter_Signer

$ go mod tidy

$ make

2. prepare config file

  1. listener: listen to esc arbiter contract event

  2. signer: sign request_arbitration_btc_tx and submit to esc arbiter contract

  3. network: use mainnet or testnet for btc address generation

  4. escStartHeight: listen from this height to get esc arbiter contract event

  5. escTransactionManagerContractAddress: esc transaction manager contract address

  6. escArbiterManagerContractAddress: esc arbiter manager contract address

  7. escConfigManagerContractAddress: esc config manager contract address

  8. escArbiterAddress: arbiter wallet address, not operator address

  9. dataPath: defines the path to record event file

  10. keyFilePath: defines the path of arbiter BTC keystore and ESC keystore

config.yaml example

# Chain api
chain:
  esc: "https://api.elastos.io/esc"

# Arbiter
arbiter:
  listener: true,
  signer: true,
  network: "mainnet"
  escStartHeight: 21205821
  escTransactionManagerContractAddress: "0xD206be45b53Fa5C2065049c7a70B1aa1755a9475"
  escArbiterManagerContractAddress: "0x54eE4fc8951A936b6AA02079B76c497c0471c52A"
  escConfigManagerContractAddress: "0x4421c63241A262C423277FFA82C376953072d25f"
  escArbiterAddress: "0x0262aB0ED65373cC855C34529fDdeAa0e686D913"
  dataPath: "~/loan_arbiter/data"
  keyFilePath: "~/loan_arbiter/keys"

3. prepare keystore to keyFilePath

  1. create btcKey escKey and put it into keyFilePath btcKey is used to sign request_arbitration_btc_tx escKey is used to submit arbitration signature to esc arbiter contract, gas fee(esc ELA) is needed

  2. Use keystore-generator tool to create keystore files:

    Generate BTC keystore:

    keystore-generator -c btc -s YOUR_PRIVATE_KEY -p YOUR_PASSWORD -o btcKey

    Generate ESC keystore:

    keystore-generator -c eth -s YOUR_PRIVATE_KEY -p YOUR_PASSWORD -o escKey

4. run arbiter

run arbiter

./arbiter

run arbiter with go file

go run app/arbiter/main.go

Automated Deployment

The automated deployment process can be referenced in the documentation: deploy_loan_arbiter.md

License

arbiter signer is licensed under the copyfree MIT License.

About

This repo is intended to provide signature services for arbiters.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages