* Initializing rootDir of dao and machine keeper with the home path of the validator key material
* added Block height logging of context decorator
* removed SetRoot usage
* fixed data races of the attest machine go-routine
* reproduction of the issue
* fixed testing URL issue
* refactored the machine-nft functions/mock
* fixed keeper.param read-bug that increased the gas prices in an inconsistent way
* increased the validator number to 3 for all e2e tests
* added go routine to attest machine workflow
---------
Signed-off-by: Julian Strobl <jmastr@mailbox.org>
Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>
Signed-off-by: Lorenz Herzberger <lorenzherzberger@gmail.com>
Co-authored-by: Julian Strobl <jmastr@mailbox.org>
Co-authored-by: Lorenz Herzberger <lorenzherzberger@gmail.com>
* Fix typo and align log messages
* Align some variable names with rest of the program
* [log] Fix log formatting and change log level
* Fix comment
Signed-off-by: Julian Strobl <jmastr@mailbox.org>
* [tests] Avoid potential data races
* Revert "[lib] Switch from RPC (REST) to gRPC (#183)"
This reverts commit db5f4fb3fe6899bcfdadf3471f826a6a97035440.
* [lib] DRY: Use build and broadcast tx from cosmos-sdk
This is in preparation for: https://github.com/rddl-network/issues/issues/46
Without this patch broadcasting a transaction in "offline mode" (setting
the sequence number manually) would not work consistently. Every so
often the endpoint would report back, that it got an unexpected sequence
number. Executing the request with the same sequence number couple of
seconds later would be successful.
I decided to better use the same source code, that the CLI uses, because
I know that offline mode works there.
Signed-off-by: Julian Strobl <jmastr@mailbox.org>
* [linter] Add `musttag`
Enforce field tags in (un)marshaled structs.
* [linter] Add `nestif`
Reports deeply nested if statements.
* [linter] Add `noctx`
Finds sending http request without context.Context.
* [linter] Add `paralleltest`
Paralleltest detects missing usage of t.Parallel() method in your Go
test.
* [linter] Add `tagalign`
Check that struct tags are well aligned.
* [linter] Add `tagliatelle`
Checks the struct tags.
* [linter] Add `whitespace`
Tool for detection of leading and trailing whitespace.
* [paralleltest] Exclude files bc of data race in tests
Signed-off-by: Julian Strobl <jmastr@mailbox.org>
* [linter] Remove unused exclusions
Linter `nosnakecase` was removed in 1e1138d0268a9896a1bd058e9b65b808eb20666e.
* [linter] Add tool for code clone detection
* [linter] Add `errorlint`
Find code that will cause problems with the error wrapping scheme
introduced in Go 1.13.
* [linter] Add `exhaustive`
Check exhaustiveness of enum switch statements.
* [linter] Add `forcetypeassert`
Finds type assertions which did forcely such as below:
```
func f() {
var a interface{}
_ = a.(int) // type assertion must be checked
}
```
* [linter] Add `gocritic`
Provides diagnostics that check for bugs, performance and style issues.
Signed-off-by: Julian Strobl <jmastr@mailbox.org>
This is the quasi-standard and fixes the error below:
```
$ go get -u github.com/planetmint/planetmint-go@v0.1.0
go: github.com/planetmint/planetmint-go@v0.1.0: parsing go.mod:
module declares its path as: planetmint-go
but was required as: github.com/planetmint/planetmint-go
```
Signed-off-by: Julian Strobl <jmastr@mailbox.org>
* added OSC response listener with logging
added Machine NFT issuance for each machine attestation process
added CID and Planetmint Issuer extPublicKey to the issuance process
removed type inconsistency
* added machine NFT creation criteria
* [toml] Parsing does not allow sub-structs
* made OSC listener port configurable
Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>
Signed-off-by: Julian Strobl <jmastr@mailbox.org>
Co-authored-by: Julian Strobl <jmastr@mailbox.org>
This patch extends `app.toml` and adds the following section with these
default values:
```
[planetmint]
watchmen-endpoint = "localhost"
watchmen-port = 7401
```
A global singleton `plmntConfig` is introduced to save and access the
values similar to how cosmos does it (see
vendor/github.com/cosmos/cosmos-sdk/types/config.go).
Different environments can be managed by changing the values in
`app.toml` and restarting the daemon.
// Closes#53
Signed-off-by: Julian Strobl <jmastr@mailbox.org>