Skip to content
This repository has been archived by the owner on Mar 21, 2024. It is now read-only.

Commit

Permalink
Merge pull request #1828 from Bytom/prod
Browse files Browse the repository at this point in the history
Merge prod to master
  • Loading branch information
Paladz authored Feb 5, 2020
2 parents 19d90c0 + e49a099 commit 210e21c
Show file tree
Hide file tree
Showing 292 changed files with 1,107 additions and 6,973 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
language: go
go_import_path: github.com/bytom
go_import_path: github.com/bytom/bytom
dist: trusty
sudo: false

Expand Down
8 changes: 4 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ FROM golang:1.9-alpine as builder

RUN apk add --no-cache make git

ADD . /go/src/github.com/bytom
RUN cd /go/src/github.com/bytom && make bytomd && make bytomcli
ADD . /go/src/github.com/bytom/bytom
RUN cd /go/src/github.com/bytom/bytom && make bytomd && make bytomcli

# Pull Bytom into a second stage deploy alpine container
FROM alpine:latest

RUN apk add --no-cache ca-certificates
COPY --from=builder /go/src/github.com/bytom/cmd/bytomd/bytomd /usr/local/bin/
COPY --from=builder /go/src/github.com/bytom/cmd/bytomcli/bytomcli /usr/local/bin/
COPY --from=builder /go/src/github.com/bytom/bytom/cmd/bytomd/bytomd /usr/local/bin/
COPY --from=builder /go/src/github.com/bytom/bytom/cmd/bytomcli/bytomcli /usr/local/bin/

EXPOSE 1999 46656 46657 9888
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ endif
endif

PACKAGES := $(shell go list ./... | grep -v '/vendor/' | grep -v '/crypto/ed25519/chainkd' | grep -v '/mining/tensority')
PACKAGES += 'github.com/bytom/mining/tensority/go_algorithm'
PACKAGES += 'github.com/bytom/bytom/mining/tensority/go_algorithm'

BUILD_FLAGS := -ldflags "-X github.com/bytom/version.GitCommit=`git rev-parse HEAD`"
BUILD_FLAGS := -ldflags "-X github.com/bytom/bytom/version.GitCommit=`git rev-parse HEAD`"

MINER_BINARY32 := miner-$(GOOS)_386
MINER_BINARY64 := miner-$(GOOS)_amd64
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,18 +40,18 @@ $ go env GOROOT GOPATH
- Get the source code

``` bash
$ git clone https://github.com/Bytom/bytom.git $GOPATH/src/github.com/bytom
$ git clone https://github.com/Bytom/bytom.git $GOPATH/src/github.com/bytom/bytom
```

- Build source code

``` bash
$ cd $GOPATH/src/github.com/bytom
$ cd $GOPATH/src/github.com/bytom/bytom
$ make bytomd # build bytomd
$ make bytomcli # build bytomcli
```

When successfully building the project, the `bytom` and `bytomcli` binary should be present in `cmd/bytomd` and `cmd/bytomcli` directory, respectively.
When successfully building the project, the `bytomd` and `bytomcli` binary should be present in `cmd/bytomd` and `cmd/bytomcli` directory, respectively.

### Executables

Expand Down
6 changes: 3 additions & 3 deletions accesstoken/accesstoken.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ import (
"strings"
"time"

"github.com/bytom/crypto/sha3pool"
"github.com/bytom/errors"
dbm "github.com/bytom/database/leveldb"
"github.com/bytom/bytom/crypto/sha3pool"
"github.com/bytom/bytom/errors"
dbm "github.com/bytom/bytom/database/leveldb"
)

const tokenSize = 32
Expand Down
4 changes: 2 additions & 2 deletions accesstoken/accesstoken_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"strings"
"testing"

"github.com/bytom/errors"
dbm "github.com/bytom/database/leveldb"
"github.com/bytom/bytom/errors"
dbm "github.com/bytom/bytom/database/leveldb"
)

func TestCreate(t *testing.T) {
Expand Down
26 changes: 13 additions & 13 deletions account/accounts.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,19 @@ import (
"github.com/golang/groupcache/lru"
log "github.com/sirupsen/logrus"

"github.com/bytom/blockchain/signers"
"github.com/bytom/blockchain/txbuilder"
"github.com/bytom/common"
"github.com/bytom/consensus"
"github.com/bytom/consensus/segwit"
"github.com/bytom/crypto"
"github.com/bytom/crypto/ed25519/chainkd"
"github.com/bytom/crypto/sha3pool"
"github.com/bytom/errors"
"github.com/bytom/protocol"
"github.com/bytom/protocol/bc"
"github.com/bytom/protocol/vm/vmutil"
dbm "github.com/bytom/database/leveldb"
"github.com/bytom/bytom/blockchain/signers"
"github.com/bytom/bytom/blockchain/txbuilder"
"github.com/bytom/bytom/common"
"github.com/bytom/bytom/consensus"
"github.com/bytom/bytom/consensus/segwit"
"github.com/bytom/bytom/crypto"
"github.com/bytom/bytom/crypto/ed25519/chainkd"
"github.com/bytom/bytom/crypto/sha3pool"
"github.com/bytom/bytom/errors"
"github.com/bytom/bytom/protocol"
"github.com/bytom/bytom/protocol/bc"
"github.com/bytom/bytom/protocol/vm/vmutil"
dbm "github.com/bytom/bytom/database/leveldb"
)

const (
Expand Down
18 changes: 9 additions & 9 deletions account/accounts_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ import (
"strings"
"testing"

"github.com/bytom/blockchain/pseudohsm"
"github.com/bytom/blockchain/signers"
"github.com/bytom/crypto/ed25519/chainkd"
"github.com/bytom/database"
"github.com/bytom/errors"
"github.com/bytom/event"
"github.com/bytom/protocol"
"github.com/bytom/testutil"
dbm "github.com/bytom/database/leveldb"
"github.com/bytom/bytom/blockchain/pseudohsm"
"github.com/bytom/bytom/blockchain/signers"
"github.com/bytom/bytom/crypto/ed25519/chainkd"
"github.com/bytom/bytom/database"
"github.com/bytom/bytom/errors"
"github.com/bytom/bytom/event"
"github.com/bytom/bytom/protocol"
"github.com/bytom/bytom/testutil"
dbm "github.com/bytom/bytom/database/leveldb"
)

func TestCreateAccountWithUppercase(t *testing.T) {
Expand Down
18 changes: 9 additions & 9 deletions account/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ import (
"context"
"encoding/json"

"github.com/bytom/blockchain/signers"
"github.com/bytom/blockchain/txbuilder"
"github.com/bytom/common"
"github.com/bytom/consensus"
"github.com/bytom/crypto/ed25519/chainkd"
"github.com/bytom/errors"
"github.com/bytom/protocol/bc"
"github.com/bytom/protocol/bc/types"
"github.com/bytom/protocol/vm/vmutil"
"github.com/bytom/bytom/blockchain/signers"
"github.com/bytom/bytom/blockchain/txbuilder"
"github.com/bytom/bytom/common"
"github.com/bytom/bytom/consensus"
"github.com/bytom/bytom/crypto/ed25519/chainkd"
"github.com/bytom/bytom/errors"
"github.com/bytom/bytom/protocol/bc"
"github.com/bytom/bytom/protocol/bc/types"
"github.com/bytom/bytom/protocol/vm/vmutil"
)

//DecodeSpendAction unmarshal JSON-encoded data of spend action
Expand Down
12 changes: 6 additions & 6 deletions account/builder_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ import (
"testing"
"time"

"github.com/bytom/blockchain/signers"
"github.com/bytom/blockchain/txbuilder"
"github.com/bytom/consensus"
"github.com/bytom/crypto/ed25519/chainkd"
"github.com/bytom/protocol/bc"
"github.com/bytom/testutil"
"github.com/bytom/bytom/blockchain/signers"
"github.com/bytom/bytom/blockchain/txbuilder"
"github.com/bytom/bytom/consensus"
"github.com/bytom/bytom/crypto/ed25519/chainkd"
"github.com/bytom/bytom/protocol/bc"
"github.com/bytom/bytom/testutil"
)

func TestReserveBtmUtxoChain(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions account/indexer.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package account

import (
"github.com/bytom/blockchain/query"
"github.com/bytom/protocol/bc"
"github.com/bytom/bytom/blockchain/query"
"github.com/bytom/bytom/protocol/bc"
)

const (
Expand Down
6 changes: 3 additions & 3 deletions account/utxo_keeper.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ import (

log "github.com/sirupsen/logrus"

"github.com/bytom/errors"
"github.com/bytom/protocol/bc"
dbm "github.com/bytom/database/leveldb"
"github.com/bytom/bytom/errors"
"github.com/bytom/bytom/protocol/bc"
dbm "github.com/bytom/bytom/database/leveldb"
)

const desireUtxoCount = 5
Expand Down
6 changes: 3 additions & 3 deletions account/utxo_keeper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import (
"testing"
"time"

"github.com/bytom/protocol/bc"
"github.com/bytom/testutil"
dbm "github.com/bytom/database/leveldb"
"github.com/bytom/bytom/protocol/bc"
"github.com/bytom/bytom/testutil"
dbm "github.com/bytom/bytom/database/leveldb"
)

func TestAddUnconfirmedUtxo(t *testing.T) {
Expand Down
12 changes: 6 additions & 6 deletions api/accounts.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ import (

log "github.com/sirupsen/logrus"

"github.com/bytom/account"
"github.com/bytom/blockchain/signers"
"github.com/bytom/common"
"github.com/bytom/consensus"
"github.com/bytom/crypto/ed25519/chainkd"
"github.com/bytom/protocol/vm/vmutil"
"github.com/bytom/bytom/account"
"github.com/bytom/bytom/blockchain/signers"
"github.com/bytom/bytom/common"
"github.com/bytom/bytom/consensus"
"github.com/bytom/bytom/crypto/ed25519/chainkd"
"github.com/bytom/bytom/protocol/vm/vmutil"
)

// POST /create-account
Expand Down
36 changes: 18 additions & 18 deletions api/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,24 +11,24 @@ import (
log "github.com/sirupsen/logrus"
cmn "github.com/tendermint/tmlibs/common"

"github.com/bytom/accesstoken"
"github.com/bytom/blockchain/txfeed"
cfg "github.com/bytom/config"
"github.com/bytom/dashboard/dashboard"
"github.com/bytom/dashboard/equity"
"github.com/bytom/errors"
"github.com/bytom/event"
"github.com/bytom/mining/cpuminer"
"github.com/bytom/mining/miningpool"
"github.com/bytom/net/http/authn"
"github.com/bytom/net/http/gzip"
"github.com/bytom/net/http/httpjson"
"github.com/bytom/net/http/static"
"github.com/bytom/net/websocket"
"github.com/bytom/netsync"
"github.com/bytom/p2p"
"github.com/bytom/protocol"
"github.com/bytom/wallet"
"github.com/bytom/bytom/accesstoken"
"github.com/bytom/bytom/blockchain/txfeed"
cfg "github.com/bytom/bytom/config"
"github.com/bytom/bytom/dashboard/dashboard"
"github.com/bytom/bytom/dashboard/equity"
"github.com/bytom/bytom/errors"
"github.com/bytom/bytom/event"
"github.com/bytom/bytom/mining/cpuminer"
"github.com/bytom/bytom/mining/miningpool"
"github.com/bytom/bytom/net/http/authn"
"github.com/bytom/bytom/net/http/gzip"
"github.com/bytom/bytom/net/http/httpjson"
"github.com/bytom/bytom/net/http/static"
"github.com/bytom/bytom/net/websocket"
"github.com/bytom/bytom/netsync"
"github.com/bytom/bytom/p2p"
"github.com/bytom/bytom/protocol"
"github.com/bytom/bytom/wallet"
)

var (
Expand Down
8 changes: 4 additions & 4 deletions api/api_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ import (
"os"
"testing"

"github.com/bytom/accesstoken"
"github.com/bytom/blockchain/rpc"
dbm "github.com/bytom/database/leveldb"
"github.com/bytom/testutil"
"github.com/bytom/bytom/accesstoken"
"github.com/bytom/bytom/blockchain/rpc"
dbm "github.com/bytom/bytom/database/leveldb"
"github.com/bytom/bytom/testutil"
)

func TestAPIHandler(t *testing.T) {
Expand Down
6 changes: 3 additions & 3 deletions api/assets.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import (
"context"
"strings"

"github.com/bytom/asset"
"github.com/bytom/crypto/ed25519/chainkd"
chainjson "github.com/bytom/encoding/json"
"github.com/bytom/bytom/asset"
"github.com/bytom/bytom/crypto/ed25519/chainkd"
chainjson "github.com/bytom/bytom/encoding/json"

log "github.com/sirupsen/logrus"
)
Expand Down
12 changes: 6 additions & 6 deletions api/block_retrieve.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ import (

"gopkg.in/fatih/set.v0"

"github.com/bytom/blockchain/query"
"github.com/bytom/consensus/difficulty"
chainjson "github.com/bytom/encoding/json"
"github.com/bytom/errors"
"github.com/bytom/protocol/bc"
"github.com/bytom/protocol/bc/types"
"github.com/bytom/bytom/blockchain/query"
"github.com/bytom/bytom/consensus/difficulty"
chainjson "github.com/bytom/bytom/encoding/json"
"github.com/bytom/bytom/errors"
"github.com/bytom/bytom/protocol/bc"
"github.com/bytom/bytom/protocol/bc/types"
)

// return best block hash
Expand Down
8 changes: 4 additions & 4 deletions api/compile.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ package api
import (
"strings"

chainjson "github.com/bytom/encoding/json"
"github.com/bytom/equity/compiler"
"github.com/bytom/errors"
"github.com/bytom/protocol/vm"
chainjson "github.com/bytom/bytom/encoding/json"
"github.com/bytom/bytom/equity/compiler"
"github.com/bytom/bytom/errors"
"github.com/bytom/bytom/protocol/vm"
)

// pre-define contract error types
Expand Down
22 changes: 11 additions & 11 deletions api/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@ package api
import (
"context"

"github.com/bytom/account"
"github.com/bytom/asset"
"github.com/bytom/blockchain/pseudohsm"
"github.com/bytom/blockchain/rpc"
"github.com/bytom/blockchain/signers"
"github.com/bytom/blockchain/txbuilder"
"github.com/bytom/errors"
"github.com/bytom/net/http/httperror"
"github.com/bytom/net/http/httpjson"
"github.com/bytom/protocol/validation"
"github.com/bytom/protocol/vm"
"github.com/bytom/bytom/account"
"github.com/bytom/bytom/asset"
"github.com/bytom/bytom/blockchain/pseudohsm"
"github.com/bytom/bytom/blockchain/rpc"
"github.com/bytom/bytom/blockchain/signers"
"github.com/bytom/bytom/blockchain/txbuilder"
"github.com/bytom/bytom/errors"
"github.com/bytom/bytom/net/http/httperror"
"github.com/bytom/bytom/net/http/httpjson"
"github.com/bytom/bytom/protocol/validation"
"github.com/bytom/bytom/protocol/vm"
)

var (
Expand Down
4 changes: 2 additions & 2 deletions api/hsm.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (

log "github.com/sirupsen/logrus"

"github.com/bytom/blockchain/txbuilder"
"github.com/bytom/crypto/ed25519/chainkd"
"github.com/bytom/bytom/blockchain/txbuilder"
"github.com/bytom/bytom/crypto/ed25519/chainkd"
)

type createKeyResp struct {
Expand Down
Loading

0 comments on commit 210e21c

Please sign in to comment.