11 Commits

Author SHA1 Message Date
Marko
522a849ba9
get_tools = tools (#3988)
- in the makefile update `get_tools` was changed to just `tools`

Signed-off-by: Marko Baricevic <marbar3778@yahoo.com>
2019-09-16 10:46:10 +02:00
Jack Zampolin
8b7ca8fd99 switch to go mod (#3613)
* Update to using go mod from dep

* Remove references to make get_vendor_deps

* Specify go version

* Set GO111MODULE=on and add -mod=readonly

* Fix exported env

* switch to using go1.12 everywhere

* Fix test scripts

* Typo:

* Prepend GO111MODULE=on

* remove dep cache

* Revert "remove dep cache"

This reverts commit 45117bda

Signed-off-by: Ismail Khoffi <Ismail.Khoffi@gmail.com>

* bring back the dependency cache and change it to cache modules instead
of vendored deps; also:

 - bump version for dependency cache
 - bump version on pkg-cache (includes modules directory)

Signed-off-by: Ismail Khoffi <Ismail.Khoffi@gmail.com>

* remove some more traces of dep:
 - remove Gopkg.(toml | lock)
 - update contributing guidlines
 - set global default in circleci (GO111MODULE=on)

Signed-off-by: Ismail Khoffi <Ismail.Khoffi@gmail.com>

* global var failed for `test_cover` with
`go: unknown environment setting GO111MODULE=true`
although the var was `GO111MODULE: on`

Signed-off-by: Ismail Khoffi <Ismail.Khoffi@gmail.com>

* Changelog pending entry

Signed-off-by: Ismail Khoffi <Ismail.Khoffi@gmail.com>

* Add bbolt dependency to go.mod

Signed-off-by: Ismail Khoffi <Ismail.Khoffi@gmail.com>

* move -mod=readonly to build flags
2019-06-09 16:27:48 +04:00
Thane Thomson
e70f27c8e4 Add remote signer test harness (KMS) (#3149)
* WIP: Starts adding remote signer test harness

This commit adds a new command to Tendermint to allow for us to build a
standalone binary to test remote signers such as KMS
(https://github.com/tendermint/kms).

Right now, all it does is test that the local public key matches the
public key reported by the client, and fails at the point where it
attempts to get the client to sign a proposal.

* Fixes typo

* Fixes proposal validation test

This commit fixes the proposal validation test as per #3149. It also
moves the test harness into its own internal package to isolate its
exports from the `privval` package.

* Adds vote signing validation

* Applying recommendations from #3149

* Adds function descriptions for test harness

* Adds ability to ask remote signer to shut down

Prior to this commit, the remote signer needs to manually be shut down,
which is not ideal for automated testing. This commit allows us to send
a poison pill message to the KMS to let it shut down gracefully once
testing is done (whether the tests pass or fail).

* Adds tests for remote signer test harness

This commit makes some minor modifications to a few files to allow for
testing of the remote signer test harness. Two tests are added here:
checking for a fully successful (the ideal) case, and for the case where
the maximum number of retries has been reached when attempting to accept
incoming connections from the remote signer.

* Condenses serialization of proposals and votes using existing Tendermint functions

* Removes now-unnecessary amino import and codec

* Adds error message for vote signing failure

* Adds key extraction command for integration test

Took the code from here:
https://gist.github.com/Liamsi/a80993f24bff574bbfdbbfa9efa84bc7 to
create a simple utility command to extract a key from a local Tendermint
validator for use in KMS integration testing.

* Makes path expansion success non-compulsory

* Fixes segfault on SIGTERM

We need an additional variable to keep track of whether we're
successfully connected, otherwise hitting Ctrl+Break during execution
causes a segmentation fault. This now allows for a clean shutdown.

* Consolidates shutdown checks

* Adds comments indicating codes for easy lookup

* Adds Docker build for remote signer harness

Updates the `DOCKER/build.sh` and `DOCKER/push.sh` files to allow one to
override the image name and Dockerfile using environment variables.
Updates the primary `Makefile` as well as the `DOCKER/Makefile` to allow
for building the `remote_val_harness` Docker image.

* Adds build_remote_val_harness_docker_image to .PHONY

* Removes remote signer poison pill messaging functionality

* Reduces fluff code in command line parsing

As per
https://github.com/tendermint/tendermint/pull/3149#pullrequestreview-196171788,
this reduces the amount of fluff code in the PR down to the bare
minimum.

* Fixes ordering of error check and info log

* Moves remove_val_harness cmd into tools folder

It seems to make sense to rather keep the remote signer test harness in
its own tool folder (now rather named `tm-signer-harness` to keep with
the tool naming convention). It is actually a separate tool, not meant
to be one of the core binaries, but supplementary and supportive.

* Updates documentation for tm-signer-harness

* Refactors flag parsing to be more compact and less redundant

* Adds version sub-command help

* Removes extraneous flags parsing

* Adds CHANGELOG_PENDING entry for tm-signer-harness

* Improves test coverage

Adds a few extra parameters to the `MockPV` type to fake broken vote and
proposal signing. Also adds some more tests for the test harness so as
to increase coverage for failed cases.

* Fixes formatting for CHANGELOG_PENDING.md

* Fix formatting for documentation config

* Point users towards official Tendermint docs for tools documentation

* Point users towards official Tendermint docs for tm-signer-harness

* Remove extraneous constant

* Rename TestHarness.sc to TestHarness.spv for naming consistency

* Refactor to remove redundant goroutine

* Refactor conditional to cleaner switch statement and better error handling for listener protocol

* Remove extraneous goroutine

* Add note about installing tmkms via Cargo

* Fix typo in naming of output signing key

* Add note about where to find chain ID

* Replace /home/user with ~/ for brevity

* Fixes "signer.key" typo

* Minor edits for clarification for tm-signer-harness bulid/setup process
2019-02-07 10:32:32 +04:00
Thane Thomson
9a0bfafef6 docs: fix links (#3220)
Because there's nothing worse than having to copy/paste a link from a
web page to navigate to it 😁
2019-01-28 17:41:39 +04:00
Zach
303649818c update docs links & sidebar (#2541)
* docs: fix links

* docs: add readme from each section to the sidebar
2018-10-04 17:22:41 -04:00
Ethan Buchman
ead9fc0179
Docs cleanup (#2522)
* minor doc cleanup

* docs/tools: link fixes and readme

* docs/networks: networks/local/README.md

* docs: update vuepress config

* docs: fixes from review
2018-09-30 12:35:52 -04:00
Peng Zhong
20e35654c6 lint markdown docs using a stop-words and write-good linters (#2195)
* lint docs with write-good, stop-words

* remove package-lock.json

* update changelog

* fix wrong paragraph formatting

* fix some docs formatting

* fix docs format

* fix abci spec format
2018-08-27 11:33:46 +04:00
Zach Ramsay
b30596b3a1 docs: fix links & other imrpvoements 2018-08-07 19:47:51 -04:00
Zach Ramsay
bef04114ef docs: md fixes & latest tm-bench/monitor 2018-07-06 14:25:04 -04:00
Zach Ramsay
539722c02d ports 2018-07-06 13:31:39 -04:00
Zach Ramsay
e54c0f804f docs re-orgnization 2018-07-05 16:08:42 -04:00