* Fix liuqid notarization (#191)
* Fix liuqid notarization - 2nd part (#193)
* fixed missing unmarshaling
* fixed message formatting issue
* fixed config parsing issue (#194)
* [util] Supply fees
But only where we want to see the transaction succeed. The other ones we
let in a broken state.
* Added logger a logger struct to log with a TAG (#198)
Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>
Signed-off-by: Julian Strobl <jmastr@mailbox.org>
Co-authored-by: Jürgen Eckel <eckelj@users.noreply.github.com>
* [lib] Refactor `getClientContextAndTxFactory()`
So that we can pass the account number and sequence number from
outside.
* [lib] Add `BroadcastTxWithFileLock()`
This implements "offline mode" via RPC, but instead of keeping track of
the sequence numbers, we write them into a file and lock them. This way, we can synchronize multiple processes using the same address, trying to
send transactions simultaneously.
// Closes https://github.com/rddl-network/issues/issues/46
Signed-off-by: Julian Strobl <jmastr@mailbox.org>
* [lib] Introduce variable for error
* [lib] Improve error handling in `broadcastTx()`
* Use `BroadcastTxWithFileLock()`
// See https://github.com/rddl-network/issues/issues/46
---------
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>
* distributed & result msgs
* added DistributionResult
* added RDDL token conversion methods
* set proper validatoraddress within the testcases for e2e/dao
* set proper root dir for test cases
* fixed some wordings
---------
Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>
Golang uses:
- Camel Case for variable names, e.g. `firstName`
- Camel Case for private function names, e.g. `getFirstName`
- Pascal Case for public function names, e.g. `GetFirstName`
Signed-off-by: Julian Strobl <jmastr@mailbox.org>
To align with cosmos-sdk and make interoperability easier.
* Fix typo: blockheight -> blockHeight
* Generate protobuf and openapi
Signed-off-by: Julian Strobl <jmastr@mailbox.org>
* added upper and lower case TA resolution testing
* added more detailed error reporting to the ValidateSignature method.
* extended test cases to test and verify these errs and their differences
* fixed CID attestation issue. CIDs are send in web compatible encoding that is not hex encoded and can be utilized without any further decoding on the server side.
* added checks and error handling for the Ta store object storage/loading
Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>