Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix travis #17

Open
wants to merge 36 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
c4ba841
[messages] Add new messages for long transactions
Jul 9, 2019
b183244
[messages] Updating Go files
Jul 9, 2019
140547c
[messages] Add options for new messages
Jul 9, 2019
6e9c2a1
[messages] Updating messages options
Jul 10, 2019
726c020
[messages] Updating messages options
Jul 13, 2019
630de79
[messages] Updating messages options
Jul 13, 2019
70a8667
[messages] Update messages options
Jul 18, 2019
e0e2754
Merge branch 'master' into stdevAdrianPaez_t25_create_long_transactions
adriantpaez Aug 3, 2019
d0baed7
Update CHANGELOG.md for v2
olemis Aug 12, 2019
3f63446
Merge branch 'develop' of http://github.com/skycoin/hardware-wallet-p…
adriantpaez Sep 5, 2019
7826a51
Add python3 to osx
adriantpaez Sep 6, 2019
378ee64
Merge pull request #60 from simelo/stdevAdrianPaez_t25_create_long_tr…
olemis Sep 6, 2019
2ef861a
Regenerate go code
iketheadore Sep 30, 2019
a729a2a
Update path
iketheadore Sep 30, 2019
c474800
Added Windows support
Macrosrider Oct 2, 2019
158658f
Merge branch 'develop' into windows_support
Macrosrider Oct 2, 2019
b4aca2f
Moved to python3
wardady Oct 3, 2019
c8ac74e
Merge pull request #5 from wardady/wardady_moving_protob_to_python3
Midren Oct 3, 2019
c540aa5
Merge pull request #4 from Macrosrider/windows_support
Midren Oct 3, 2019
31f1b56
Merge pull request #7 from SkycoinProject/master
Midren Oct 7, 2019
49b7d75
Added messages for Bitcoin Integration
Midren Nov 14, 2019
57e63b9
Compiled go files for bitcoin protobuff messages
Midren Nov 16, 2019
13bb133
Fixed wrong compiling
Midren Nov 17, 2019
06c8287
Fix name of import in types.pb.go
Midren Nov 20, 2019
1e671e0
Merge pull request #9 from RomanMilishchuk/milishchuk_t8_add_bitcoin_…
Macrosrider Dec 2, 2019
9d431a6
Add limitations for btc transaction inputs/outputs
Midren Dec 22, 2019
3703bea
Merge pull request #11 from RomanMilishchuk/milishchuk_t8_add_bitcoin…
Midren Dec 22, 2019
8795c61
Added proto files for Ehtereum
Macrosrider Jan 28, 2020
d3f1798
Fixed issues with Etherum input/output
Macrosrider Feb 17, 2020
004d363
.
Macrosrider Feb 17, 2020
0b49949
Fixed protob error related to protobuf version
Macrosrider Aug 6, 2020
97a4e90
Fixed Travis error connected with permission on Linux
Macrosrider Aug 6, 2020
e512dcf
Fixed symbol issue
Macrosrider Aug 6, 2020
be737a5
Removed ifeq for Linux
Macrosrider Aug 6, 2020
db266a2
Fixed permission issue with chmod
Macrosrider Aug 6, 2020
1720c6c
Added su permission for chmod command
Macrosrider Aug 6, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Yes | No

Related issues:

PR skycoin/hardware-wallet# for issue skycoin/hardware-wallet#
PR skycoin/hardware-wallet-js# for issue skycoin/hardware-wallet-js#
PR skycoin/hardware-wallet-go# for issue skycoin/hardware-wallet-go#
PR SkycoinProject/hardware-wallet# for issue SkycoinProject/hardware-wallet#
PR SkycoinProject/hardware-wallet-js# for issue SkycoinProject/hardware-wallet-js#
PR SkycoinProject/hardware-wallet-go# for issue SkycoinProject/hardware-wallet-go#

2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ matrix:
- ubuntu-toolchain-r-test
- os: osx
language: generic
env:
- PYTHON=python3
install:
- if [[ $TRAVIS_OS_NAME == 'linux' ]]; then
export PATH="$PATH:$HOME/bin" ;
Expand Down
16 changes: 15 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,20 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

### Added

### Fixed

### Changed

### Removed

### Fixed

### Security

## v1.0.0

### Added

- Add `RDP` level info in features msg.
- Add `fw_version_head` field to features msg.
- Add a `MessageType_GetMixedEntropy` rename `MessageType_GetEntropy` to `MessageType_GetRawEntropy`.
Expand All @@ -19,6 +33,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Add go code generated from proto files into the `go` folder.
- Make go folder a proper package that can be vendor'ed from another package
- Address `index` of `SkycoinTransactionInput` marked as optional.
- Added Windows support

### Fixed

Expand All @@ -30,4 +45,3 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
### Fixed

### Security

56 changes: 36 additions & 20 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,35 @@
REPO_ROOT := $(dir $(abspath $(lastword $(MAKEFILE_LIST))))

UNAME_S = $(shell uname -s)
PYTHON ?= python
PYTHON ?= /usr/bin/env python3
PIP ?= pip3
PIPARGS ?=
GOPATH ?= $(HOME)/go

ifeq ($(TRAVIS),true)
OS_NAME=$(TRAVIS_OS_NAME)
else
ifeq ($(UNAME_S),Linux)
OS_NAME=linux
endif
ifeq ($(UNAME_S),Darwin)
OS_NAME=osx
endif
VERSION=-x86-64
endif
ifeq ($(OS_NAME), windows)
OS_NAME=win
VERSION=32
endif

PROTOC_VERSION ?= 3.6.1
PROTOC_ZIP ?= protoc-$(PROTOC_VERSION)-$(OS_NAME)-x86_64.zip
ifeq ($(UNAME_S),Linux)
OS_NAME=linux
VERSION=-x86_64
endif
ifeq ($(UNAME_S),Darwin)
OS_NAME=osx
VERSION=-x86_64
endif
ifeq ($(OS),Windows_NT)
OS_NAME=win
VERSION=32
endif

PROTOC_VERSION ?= 3.12.4
PROTOC_ZIP ?= protoc-$(PROTOC_VERSION)-$(OS_NAME)$(VERSION).zip
PROTOC_URL ?= https://github.com/google/protobuf/releases/download/v$(PROTOC_VERSION)/$(PROTOC_ZIP)
PROTOC_GOGO_URL = github.com/gogo/protobuf
PROTOC_NANOPBGEN_DIR = nanopb/vendor/nanopb/generator
Expand All @@ -44,10 +55,10 @@ PROTOB_C_DIR = c
PROTOB_SRC_DIR = $(GOPATH)/src/$(PROTOC_GOGO_URL)

# Use default value when including this repository in vendor/ with dep
# Set it explicitly either when generating to acustom location
# Set it explicitly either when generating to acustom location
# or when this repository is included at a subpath other than vendor
# e.g. go library should set this to github.com/skycoin/hardware-wallet-go/src/device-wallet/messages
GO_IMPORT ?= github.com/skycoin/hardware-wallet-protob
# e.g. go library should set this to github.com/SkycoinProject/hardware-wallet-go/src/device-wallet/messages
GO_IMPORT ?= github.com/SkycoinProject/hardware-wallet-protob
GO_IMPORT_SED = $(shell echo $(GO_IMPORT) | sed 's/\//\\\//g')

PROTOB_MSG_FILES = $(shell ls -1 $(PROTOB_MSG_DIR)/*.proto)
Expand Down Expand Up @@ -79,8 +90,12 @@ install-protoc: /usr/local/bin/protoc
/usr/local/bin/protoc:
echo "Downloading protobuf from $(PROTOC_URL)"
curl -OL $(PROTOC_URL)
echo "Installing protoc"
sudo unzip -o $(PROTOC_ZIP) -d /usr/local bin/protoc
ifeq ($(OS_NAME), win)
unzip -o $(PROTOC_ZIP) -d /usr/local bin/protoc.exe
else
sudo unzip -o $(PROTOC_ZIP) -d /usr/local bin/protoc
sudo chmod -R +x /usr/local/bin/protoc
endif
rm -f $(PROTOC_ZIP)

#----------------
Expand All @@ -97,11 +112,12 @@ install-deps-go: install-protoc ## Install tools to generate protobuf classes fo
fi
( cd $(PROTOB_SRC_DIR)/protoc-gen-gogofast && go install )

build-go: install-deps-go $(PROTOB_MSG_GO) $(OUT_GO)/google/protobuf/descriptor.pb.go ## Generate protobuf classes for go lang
build-go: install-deps-go $(OUT_GO)/google/protobuf/descriptor.pb.go ## Generate protobuf classes for go lang
protoc -I./$(PROTOC_NANOPBGEN_DIR)/proto/ -I protob/messages --gogofast_out=$(OUT_GO) $(PROTOB_MSG_FILES)
sed $(SED_FLAGS) 's/import\ protobuf\ \"google\/protobuf\"/import\ protobuf\ \"$(GO_IMPORT_SED)\/go\/google\/protobuf\"/g' $(OUT_GO)/types.pb.go

$(OUT_GO)/google/protobuf/descriptor.pb.go: $(OUT_GO)/types.pb.go
protoc -I./$(PROTOC_NANOPBGEN_DIR)/proto --gogofast_out=$(OUT_GO) $(PROTOC_NANOPBGEN_DIR)/proto/google/protobuf/descriptor.proto
sed $(SED_FLAGS) 's/import\ protobuf\ \"google\/protobuf\"/import\ protobuf\ \"$(GO_IMPORT_SED)\/go\/google\/protobuf\"/g' $(OUT_GO)/types.pb.go

$(OUT_GO)/%.pb.go: $(PROTOB_MSG_DIR)/%.proto
protoc -I./$(PROTOC_NANOPBGEN_DIR)/proto/ -I protob/messages --gogofast_out=$(OUT_GO) $<
Expand Down Expand Up @@ -133,10 +149,11 @@ install-deps-nanopb: install-protoc ## Install tools to generate protobuf classe
make -C $(PROTOC_NANOPBGEN_DIR)/proto/
$(PIP) install $(PIPARGS) "protobuf==$(PROTOC_VERSION)" ecdsa

build-c: install-deps-nanopb $(PROTOB_MSG_C) $(OUT_C)/messages_map.h ## Generate protobuf classes for C with nanopb
build-c: install-deps-nanopb $(PROTOB_MSG_C) $(OUT_C)/messages_map.h build-py ## Generate protobuf classes for C with nanopb

$(info )

$(OUT_C)/%.pb.c: $(OUT_C)/%.pb $(PROTOB_MSG_DIR)/%.options
#c/%.pb.c: c/%.pb $(PROTOB_MSG_DIR)/%.options
$(eval PROTOBUF_FILE_OPTIONS := $(subst pb,options,$<))
$(eval PROTOBUF_FILE_OPTIONS = $(subst c/,,$(PROTOBUF_FILE_OPTIONS)))
$(PYTHON) $(PROTOC_NANOPBGEN_DIR)/nanopb_generator.py -f $(PROTOB_MSG_DIR)/$(PROTOBUF_FILE_OPTIONS) $< -L '#include "%s"' -T
Expand Down Expand Up @@ -175,4 +192,3 @@ clean-py:

help:
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'

36 changes: 18 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Hardware wallet protobuffer

[![Build Status](https://travis-ci.com/skycoin/hardware-wallet-protob.svg?branch=master)](https://travis-ci.com/skycoin/hardware-wallet-protob)
[![Build Status](https://travis-ci.com/SkycoinProject/hardware-wallet-protob.svg?branch=master)](https://travis-ci.com/SkycoinProject/hardware-wallet-protob)

[Protocol Buffer](https://developers.google.com/protocol-buffers/) schemas for Skycoin hardware wallet communication and scripts for supporting multiple programming languages.

Expand All @@ -25,7 +25,7 @@
All tools needed , including `protoc`, language-specific generators and dependencies, will be installed after executing the following commands.

```sh
git clone https://github.com/skycoin/hardware-wallet-protob
git clone https://github.com/SkycoinProject/hardware-wallet-protob
cd hardware-wallet-protob
make install
```
Expand All @@ -34,13 +34,13 @@ make install

It is highly recommended to invoke code generation scripts by executing the suitable make targets. This repository is meant to be included as a submodule in (at least) the following projects:

- [Skycoin hardware wallet](https://github.com/skycoin/hardware-wallet) : Implements bootloader and firmware for the hardware wallet
- [Skycoin hardware wallet library for go language](https://github.com/skycoin/hardware-wallet-go) :
- [Skycoin hardware wallet library for Javascript](https://github.com/skycoin/hardware-wallet-js) :
- [Skycoin hardware wallet](https://github.com/SkycoinProject/hardware-wallet) : Implements bootloader and firmware for the hardware wallet
- [Skycoin hardware wallet library for go language](https://github.com/SkycoinProject/hardware-wallet-go) :
- [Skycoin hardware wallet library for Javascript](https://github.com/SkycoinProject/hardware-wallet-js) :

The following projects also use it either directly or indirectly:

- [Skycoin desktop wallet ](https://github.com/skycoin/skycoin/tree/master/src/electron) :
- [Skycoin desktop wallet ](https://github.com/SkycoinProject/skycoin/tree/master/src/electron) :

### Make rules

Expand Down Expand Up @@ -75,50 +75,50 @@ Code generation commands (i.e. `build-*` targets) can generate source code at an

To start using these scripts see [installation instructions](#installation). In order to import these specifications and scripts as part of another project follow the following steps:

- Include this repository as submodule e.g. `git submodule add https://github.com/skycoin/hardware-wallet-protob protob`
- Include this repository as submodule e.g. `git submodule add https://github.com/SkycoinProject/hardware-wallet-protob protob`
- In your `Makefile` (or equivalent)
* Define a variable for the target corresponding to the programming language that needs to be generated e.g. `PROTOB_CMD=build-py` to generate Python code
* Define a variable for the path to the folder containing protocol buffer classes e.g. `PROTOB_DIR=protob/py`
* Include a step that executes the target e.g. `make -C protob $(PROTOB_CMD) OUT_PY=$(PROTOB_DIR)` , read about [environment variables](#environment-variables) for further details.
* Include a step that executes the target e.g. `make -C protob $(PROTOB_CMD) OUT_PY=$(PROTOB_DIR)` , read about [environment variables](#environment-variables) for further details.

The project has two branches: `master` and `develop`.

- `develop` is the default branch and will always have the latest development code.
- `master` will always be equal to the current stable release on the website, and should correspond with the latest release tag.

Versioning scheme will match the one of the hardware wallet firmware contract. Release tags will have exactly the same name as [skycoin/hardware-wallet](https://github.com/skycoin/hardware-wallet)'s using it to build firmware deliverables.
Versioning scheme will match the one of the hardware wallet firmware contract. Release tags will have exactly the same name as [SkycoinProject/hardware-wallet](https://github.com/SkycoinProject/hardware-wallet)'s using it to build firmware deliverables.

### Running tests

By design, this repository does not include a test suite. Nevertheless :

- continuous integration of the generation process in [skycoin/hardware-wallet-protob @ Travis](https://travis-ci.com/skycoin/hardware-wallet-protob)
- continuous integration of the generation process in [SkycoinProject/hardware-wallet-protob @ Travis](https://travis-ci.com/SkycoinProject/hardware-wallet-protob)
- external projects do have a test suite that relies upon clases generated by these specifications

### Merging Pull Requests
After changes are merged into this `hardware-wallet-protob` repository the corresponding changes should be updated into the following repositories:
- [Hardware Wallet](https://github.com/skycoin/hardware-wallet):
- [Hardware Wallet](https://github.com/SkycoinProject/hardware-wallet):
Hardware Wallet has a submodule which depends on this repository.
To update the submodule execute the following commands
```bash
$ cd $(GOPATH)/src/github.com/skycoin/hardware-wallet
$ cd $(GOPATH)/src/github.com/SkycoinProject/hardware-wallet
$ git submodule foreach git pull origin master
```

- [Hardware Wallet Go](https://github.com/skycoin/hardware-wallet-go):
- [Hardware Wallet Go](https://github.com/SkycoinProject/hardware-wallet-go):
Hardware Wallet Go has a dep dependency on this repository.
To update it take the commit hash from master of hardware wallet protob and update that in respective constraint in `Gopkg.toml`.
Then execute:
```bash
$ dep ensure -update -v
```
$ dep ensure -update -v
```

- [Hardware Wallet Daemon](https://github.com/skycoin/hardware-wallet-daemon):
- [Hardware Wallet Daemon](https://github.com/SkycoinProject/hardware-wallet-daemon):
Hardware Wallet Daemon has a dep dependency on this repository.
To update it take the commit hash from master of hardware wallet protob and update that in respective constraint in `Gopkg.toml`.
Then execute:
```bash
$ dep ensure -update -v
$ dep ensure -update -v
```

After updating the submodule or depdency PR the changes in the respective respositories.
Expand All @@ -129,5 +129,5 @@ This repository is not meant to have release packages.

#### Update the version

See [skycoin/hardware-wallet README](https://github.com/skycoin/hardware-wallet/tree/master/README.md).
See [SkycoinProject/hardware-wallet README](https://github.com/SkycoinProject/hardware-wallet/tree/master/README.md).

Loading