* fix: challangee rewards stay in dao module if challenge is not sucessful
* refactor: split up coin conversion functions
* fix: add dao module coin conversion
* test: adjust test case for updated behavior
* chore: fix typo
* fix: do not mint claims for dao
* refactor: remove redundant statement
* fix: error handling on claim converstion fail
* fix: linter error
* chore: add comment to test case
---------
Signed-off-by: Lorenz Herzberger <lorenzherzberger@gmail.com>
* ensure PoP is always initialized even without a defined challenger and challengee
* send the MQTT PoPInit if challenger and challengee are defined
* store the challenge in any case without regarding the minting of the rewards
* structured the added test and their staging
* fixed SelectPopParticipants bug
* restore the previous pop epoch after running dao/suite.go
* avoid popInit during machine attestations (within test cases)
---------
Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>
* test: fix crddl assertion on pop result e2e test
* test: replace contains with equal assertion
---------
Signed-off-by: Lorenz Herzberger <lorenzherzberger@gmail.com>
* feat: verify the availability of PoP participants
* simplified and improved logging
* added MQTT-based availability check for PoP participants
* extended MQTT mocking
* Only the block proposer will send out the MQTT messages to the pop participants
* Added a configuration value for the MQTT response timeout
* removed parallel execution of one test case
* added r/w locking to the MQTT response processing
* set MQTT timeout unit to ms
Signed-off-by: Julian Strobl <jmastr@mailbox.org>
* feature: add ante handler to block non validators from sending restricted txs
* fix: add missing msg types and linter errors
* fix: staticcheck error
* refactor: use fallthrough on ante handle switch
* fix: set val address on machine attest test
---------
Signed-off-by: Lorenz Herzberger <lorenzherzberger@gmail.com>
* refactor: switch log level for PoP messages
Needs to be the other way around, otherwise we receive up to 720
messages on info level.
* refactor: align spelling in comments and log messages
* fix: config key
Commit fc9e795bd0678746993806ac21c92a675ed7006f changed the reissuance
variable. The config key was forgotten to change.
* refactor: return early to reduce indentation
Signed-off-by: Julian Strobl <jmastr@mailbox.org>
Reissue and reissuance are standalone words and should not contain an
uppercase `I` in the variable name. This should only happen to connect
different word like: file name gets `fileName` resp. `FileName`.
Signed-off-by: Julian Strobl <jmastr@mailbox.org>
In the beginning we wanted to send the raw transaction to elements, but
what we ended up doing is to send the command like:
```
"reissueasset assetID amount"
```
to elements-cli/elements-rpc.
Closes#226
Signed-off-by: Julian Strobl <jmastr@mailbox.org>
`k.isNFTCreationRequest(msg.Machine)` was removed as it became obsolete
and we are not issuing generic tokens from within the machine
attestation process.
Closes#242
Signed-off-by: Julian Strobl <jmastr@mailbox.org>
* refactor: Split up machine e2e test suites
* refactor: move CreateAccount and FundAccount to testutil/e2e
* refactor: add AttestMachine to testutil/e2e
* refactor: split up asset e2e test suites
* refactor: make use of testutil in e2e dao suite
Signed-off-by: Lorenz Herzberger <lorenzherzberger@gmail.com>
* fix: only increase counter if broadcast was successful
Otherwise we will get account and sequence numbers mismatches.
* test: add initial e2e tests for `lib/`
Signed-off-by: Julian Strobl <jmastr@mailbox.org>
* refactor: remove unwanted function in `lib`
The `lib` shall always be used with file lock.
* refactor: log `txResponse` in `buildSignBroadcastTx`
- Move `GetTxResponseFromOut` from `testutil` to `lib`
Signed-off-by: Julian Strobl <jmastr@mailbox.org>
* ci: support releasing from different branch
* fix: git tags are not fetched
This preveted to detect if a `LIB_TAG` is already there.
Signed-off-by: Julian Strobl <jmastr@mailbox.org>
* implemented SelectPopParticipants
* added check if enough participants to initiate PoP
* make use of lib for broadcasting tx
Signed-off-by: Lorenz Herzberger <lorenzherzberger@gmail.com>
* added MQTT lib
* added MQTT config params: domain, port user, password
* sending PoPInit commands to devices par of the pop (after delivery of the PoPInit message)
* Added test case to verify the working of the MQTT connection (test is skipped and designed for manual tests (lack of credentials))
---------
Signed-off-by: Jürgen Eckel <juergen@riddleandcode.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>
Just a small improvement to not forget to check the error code of the
transaction and not only from the command itself.
Signed-off-by: Julian Strobl <jmastr@mailbox.org>
* [log] Do not create a new object of `GetAppLogger()` every time
* [tests] Enable AppLogger during testing
Signed-off-by: Julian Strobl <jmastr@mailbox.org>