Skip to content

Commit

Permalink
Merge pull request #211 from renproject/release/0.4.7
Browse files Browse the repository at this point in the history
Release v0.4.7
  • Loading branch information
jazg authored Sep 22, 2021
2 parents 9789023 + 5875332 commit 1bfa4a9
Show file tree
Hide file tree
Showing 10 changed files with 124 additions and 70 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: "1.15.8"
go-version: "1.16.6"
- name: Configure git for private modules
env:
TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.4.7

- Fix BCH gateway validation

## 0.4.6

- Update Multichain to v0.3.21
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM debian:stable-slim AS final
FROM debian:buster-slim AS final
# Set up final runner first, so that it caches

# Install Filecoin and Solana dependencies.
Expand Down Expand Up @@ -27,7 +27,7 @@ WORKDIR /lightnode

ARG GITHUB_TOKEN

RUN apt-get update && apt-get install -y ocl-icd-opencl-dev libgmp3-dev
RUN apt-get update && apt-get install -y ocl-icd-opencl-dev libgmp3-dev libhwloc-dev

# Use GitHub personal access token to fetch dependencies.
RUN git config --global url."https://${GITHUB_TOKEN}:[email protected]/".insteadOf "https://github.com/"
Expand Down
14 changes: 7 additions & 7 deletions compat/v0/compat.go
Original file line number Diff line number Diff line change
Expand Up @@ -663,12 +663,12 @@ func V1TxFromV0Burn(ctx context.Context, v0tx Tx, bindings *binding.Binding, net

details, err := gatewayBinding.GetBurn(&bind.CallOpts{}, ref.Int)
if err != nil {
return tx.Tx{}, err
return tx.Tx{}, fmt.Errorf("getting burn with ref=%v: %v", ref, err)
}

latestBlockHeader, err := client.HeaderByNumber(ctx, nil)
if err != nil {
return tx.Tx{}, err
return tx.Tx{}, fmt.Errorf("getting latest block header: %v", err)
}
confirmations := new(big.Int).Sub(latestBlockHeader.Number, details.Blocknumber).Uint64()
if pack.U64(confirmations) > options.MaxConfirmations {
Expand All @@ -682,18 +682,18 @@ func V1TxFromV0Burn(ctx context.Context, v0tx Tx, bindings *binding.Binding, net
Context: ctx,
}, []*big.Int{ref.Int}, nil)
if err != nil {
return tx.Tx{}, err
return tx.Tx{}, fmt.Errorf("filtering burn logs for block #%v (ref=%v): %v", blockNumber, ref, err)
}
if iter == nil {
return tx.Tx{}, err
return tx.Tx{}, fmt.Errorf("no burn logs for block #%v (ref=%v): %v", blockNumber, ref, err)
}
var txid pack.Bytes
for iter.Next() {
txid = iter.Event.Raw.TxHash.Bytes()
break
}
if iter.Error() != nil {
return tx.Tx{}, err
return tx.Tx{}, fmt.Errorf("getting burn log details for block #%v (ref=%v): %v", blockNumber, ref, err)
}

amount := pack.NewU256FromInt(details.Amount)
Expand All @@ -706,7 +706,7 @@ func V1TxFromV0Burn(ctx context.Context, v0tx Tx, bindings *binding.Binding, net
to = multichain.Address(base58.Encode(toBytes))
toDecode, err = decoder.DecodeAddress(to)
if err != nil {
return tx.Tx{}, err
return tx.Tx{}, fmt.Errorf("decoding address=%v (ref=%v): %v", to, ref, err)
}
}

Expand All @@ -726,7 +726,7 @@ func V1TxFromV0Burn(ctx context.Context, v0tx Tx, bindings *binding.Binding, net
Ghash: ghash,
})
if err != nil {
return tx.Tx{}, err
return tx.Tx{}, fmt.Errorf("encoding input (ref=%v): %v", ref, err)
}
return tx.NewTx(selector, pack.Typed(input.(pack.Struct)))
}
Expand Down
2 changes: 1 addition & 1 deletion compat/v0/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ func (store Store) decodeHashString(s string) (id.Hash, error) {
hash := id.Hash{}
hashBytes, err1 := base64.RawURLEncoding.DecodeString(s)
if err1 != nil {
hashBytes2, err2 := base64.RawStdEncoding.DecodeString(s)
hashBytes2, err2 := base64.StdEncoding.DecodeString(s)
if err2 != nil {
err := fmt.Errorf("invalid hash encoding ( %v ) persisted: not base64URL %v not base64 %v", s, err1, err2)
return hash, err
Expand Down
14 changes: 7 additions & 7 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
module github.com/renproject/lightnode

go 1.15
go 1.16

require (
github.com/alicebob/miniredis/v2 v2.14.3
github.com/btcsuite/btcd v0.21.0-beta
github.com/btcsuite/btcutil v1.0.2
github.com/dfuse-io/solana-go v0.2.1-0.20210622202728-1d0a90faa723
github.com/dgryski/go-farm v0.0.0-20191112170834-c2139c5d712b // indirect
github.com/ethereum/go-ethereum v1.10.6
github.com/ethereum/go-ethereum v1.10.7
github.com/evalphobia/logrus_sentry v0.8.2
github.com/go-redis/redis/v7 v7.2.0
github.com/google/go-cmp v0.5.4
github.com/google/go-cmp v0.5.6
github.com/jbenet/go-base58 v0.0.0-20150317085156-6237cf65f3a6
github.com/lib/pq v1.7.0
github.com/mattn/go-sqlite3 v1.11.0
github.com/near/borsh-go v0.3.0
github.com/onsi/ginkgo v1.14.0
github.com/onsi/ginkgo v1.16.4
github.com/onsi/gomega v1.10.1
github.com/renproject/aw v0.4.1-0.20210604011747-50d6a643dc76
github.com/renproject/darknode v0.5.3-0.20210804001818-b8d7d530656d
github.com/renproject/aw v0.5.3
github.com/renproject/darknode v0.5.3-0.20210914051036-04adb12237f0
github.com/renproject/id v0.4.2
github.com/renproject/kv v1.1.2
github.com/renproject/multichain v0.3.21
github.com/renproject/multichain v0.4.0
github.com/renproject/pack v0.2.11
github.com/renproject/phi v0.1.0
github.com/renproject/surge v1.2.6
Expand Down
Loading

0 comments on commit 1bfa4a9

Please sign in to comment.