Commit Graph

112 Commits

Author SHA1 Message Date
Jürgen Eckel
01ef2dbfd0 Improve communication to liquid issuance service (#58)
* 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>
2023-08-04 16:38:18 +02:00
Julian Strobl
70b61372d2 Merge pull request #61 from planetmint/53-adjust-json-configuration-loading-for-node-setup
[config] Add planetmint section to `app.toml`
2023-08-04 11:49:21 +02:00
Julian Strobl
4ba12f7b03 [config] Add planetmint section to app.toml
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>
2023-08-04 10:53:38 +02:00
Julian Strobl
459c0ae931 Make sure correct purpose and cointype are used (#60)
* Fix .gitignore

Signed-off-by: Julian Strobl <jmastr@mailbox.org>

* [test] Make sure correct Purpose and CoinType are used

Signed-off-by: Julian Strobl <jmastr@mailbox.org>

---------

Signed-off-by: Julian Strobl <jmastr@mailbox.org>
2023-08-03 10:03:13 +02:00
Jürgen Eckel
1a5d673a86 adjusted the default derivation path for the test cases to planetmint… (#59)
* adjusted the default derivation path for the test cases to planetmint cointype

* [test] Update sample.PubKey

Changed due to updated derivation path.

* [test] Set comment for DefaultDerivationPath

---------

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>
2023-08-03 09:48:03 +02:00
Julian Strobl
9ea8a64fbb Add go build output to .gitignore
Signed-off-by: Julian Strobl <jmastr@mailbox.org>
2023-08-03 08:07:02 +02:00
Julian Strobl
e8986a136e [openapi] Add missing variables
```
$ ignite chain build
```

Signed-off-by: Julian Strobl <jmastr@mailbox.org>
2023-08-02 09:16:13 +02:00
Julian Strobl
f763e32355 Merge pull request #51 from planetmint/27-issue-liquid-nft-creation-request-on-a-watchman
27 issue liquid nft creation request on a watchman
2023-07-31 08:39:21 +02:00
Lorenz Herzberger
b92758268d rename config and adjust osc call
Signed-off-by: Lorenz Herzberger <lorenzherzberger@gmail.com>
Signed-off-by: Julian Strobl <jmastr@mailbox.org>
2023-07-31 08:21:28 +02:00
Lorenz Herzberger
238e68808b add config for watchmen
Signed-off-by: Lorenz Herzberger <lorenzherzberger@gmail.com>
2023-07-31 08:21:28 +02:00
Lorenz Herzberger
a63f390490 add error handling to reissueMachineNFT
Signed-off-by: Lorenz Herzberger <lorenzherzberger@gmail.com>
2023-07-31 08:21:28 +02:00
Lorenz Herzberger
722eb60bcf add domain to machine proto
Signed-off-by: Lorenz Herzberger <lorenzherzberger@gmail.com>
2023-07-31 08:21:28 +02:00
Lorenz Herzberger
f6c96094c6 implement osc client mock on msg_attest_machine
Signed-off-by: Lorenz Herzberger <lorenzherzberger@gmail.com>
2023-07-31 08:14:56 +02:00
Jürgen Eckel
34182773dc Eckelj/removed hashing twice and decoding issue (#55)
removed not working hex.DecodeString(cid)

removed potential double hashing (hashing the hash with the same hash method)
removed the double hashing and the encoding issue from the serverside asset message verification code.

Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>
2023-07-31 08:12:30 +02:00
Julian Strobl
229b649a69 Merge pull request #54 from planetmint/eckelj/define_unittest_chain_id
pinned the chain id for unit tests
2023-07-31 08:07:21 +02:00
Jürgen Eckel
1b1bd2f790 pinned the chain id for the unit tests
Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>
2023-07-28 13:47:25 +02:00
Julian Strobl
520833e36a [sonar] Exclude generated simulation_test.go
Signed-off-by: Julian Strobl <jmastr@mailbox.org>
2023-07-26 14:55:00 +02:00
Julian Strobl
1a126d9e5c Merge pull request #49 from planetmint/jmastr/set-cointype-to-planetmint
[config] Set PLMNT coin type
2023-07-26 13:02:16 +02:00
Julian Strobl
4f3a71618e Merge pull request #50 from planetmint/jmastr/add-more-generated-files-to-sonar-exclusion
[sonar] Add more generated files to exclusion
2023-07-26 12:56:51 +02:00
Julian Strobl
414ab6c556 [sonar] Add more generated files to exclusion
We get a lot of code duplication errors on those files, which is to be
expected since they are generated.

Signed-off-by: Julian Strobl <jmastr@mailbox.org>
2023-07-26 12:49:22 +02:00
Julian Strobl
860847d269 [config] Set PLMNT coin type
Signed-off-by: Julian Strobl <jmastr@mailbox.org>
2023-07-26 12:41:28 +02:00
Lorenz Herzberger
0fb349354f Merge pull request #48 from planetmint/35-add-validation-of-pub-key-hd-path-for-machine-attestation
35 add validation of pub key hd path for machine attestation
2023-07-25 14:03:59 +02:00
Lorenz Herzberger
d54a5dc8c4 move liquid key validation to function
Signed-off-by: Lorenz Herzberger <lorenzherzberger@gmail.com>
2023-07-25 13:58:38 +02:00
Lorenz Herzberger
053f38cf0d add comment
Signed-off-by: Lorenz Herzberger <lorenzherzberger@gmail.com>
2023-07-25 13:52:37 +02:00
Lorenz Herzberger
4263b09835 add msg server test case
Signed-off-by: Lorenz Herzberger <lorenzherzberger@gmail.com>
2023-07-25 13:52:37 +02:00
Lorenz Herzberger
017014317c adjust msg_attest_machine validation
Signed-off-by: Lorenz Herzberger <lorenzherzberger@gmail.com>
2023-07-25 13:51:38 +02:00
Lorenz Herzberger
75616169f4 Merge pull request #46 from planetmint/jmastr/code-improvements
Code Improvements
2023-07-24 13:02:01 +02:00
Julian Strobl
5a205e1b4c Merge pull request #47 from planetmint/jmastr/revert-account-address-prefix
Revert AccountAddressPrefix to default
2023-07-24 11:01:05 +02:00
Julian Strobl
555b61f278 Revert AccountAddressPrefix to default
Turns out that we have a bunch of tests and setups, that need to default
identifier.

We decided to change this value at a later point in time and make the
transition in alignment.

Signed-off-by: Julian Strobl <jmastr@mailbox.org>
2023-07-24 10:47:04 +02:00
Julian Strobl
9fe804ee2f [test] Add more asserts to test cases
Signed-off-by: Julian Strobl <jmastr@mailbox.org>
2023-07-21 08:04:51 +02:00
Julian Strobl
e97a7f714a [test] Refactor code into own functions
- Parse `TxResponse` from output of `ExecTestCLICmd`
- Get RawLog from `TxResponse`

Signed-off-by: Julian Strobl <jmastr@mailbox.org>
2023-07-21 08:01:40 +02:00
Julian Strobl
3778f52b24 [test] DRY
Signed-off-by: Julian Strobl <jmastr@mailbox.org>
2023-07-20 10:45:05 +02:00
Julian Strobl
fd136b6219 [test] Switch const PubKey to hex version
This aligns with the return values of `sample.KeyPair()`.

Signed-off-by: Julian Strobl <jmastr@mailbox.org>
2023-07-20 10:43:42 +02:00
Julian Strobl
d287f2ff94 Merge pull request #45 from planetmint/jmastr/improve-staticcheck-setup
Improve staticcheck setup
2023-07-20 09:24:14 +02:00
Julian Strobl
224cd27f9f Merge pull request #30 from planetmint/dependabot/go_modules/github.com/cometbft/cometbft-0.37.2
Bump github.com/cometbft/cometbft from 0.37.1 to 0.37.2
2023-07-20 09:19:00 +02:00
Julian Strobl
1f56b2d704 [test] Fix gofmt issue
Signed-off-by: Julian Strobl <jmastr@mailbox.org>
2023-07-20 09:08:55 +02:00
Julian Strobl
a6b862860a [ci] Check for proper code formatting
Signed-off-by: Julian Strobl <jmastr@mailbox.org>
2023-07-20 09:08:55 +02:00
Julian Strobl
6037c6009c [ci] Add lint-ignore comment to generated files
Signed-off-by: Julian Strobl <jmastr@mailbox.org>
2023-07-20 09:08:54 +02:00
Julian Strobl
b0e12a8f7d Re-generate proto-go files
```
$ ignite generate proto-go --clear-cache
```

Signed-off-by: Julian Strobl <jmastr@mailbox.org>
2023-07-20 09:08:52 +02:00
Julian Strobl
bb39d64653 Merge pull request #43 from planetmint/32-rename-machineissue-to-reissue
32 rename machineissue to reissue
2023-07-20 09:06:16 +02:00
Lorenz Herzberger
dc17cf118c resolve merge conflicts
Signed-off-by: Lorenz Herzberger <lorenzherzberger@gmail.com>
2023-07-19 17:47:39 +02:00
Lorenz Herzberger
81a798e4c9 remove .staticcheckignore and add lint ignore
Signed-off-by: Lorenz Herzberger <lorenzherzberger@gmail.com>
2023-07-19 17:37:03 +02:00
Julian Strobl
5e09152484 Merge pull request #44 from planetmint/jmastr/code-improvements
Code Improvements
2023-07-19 16:52:26 +02:00
Julian Strobl
359cbbc5d9 [lint] Switch to golangci-lint and fix errors
Signed-off-by: Julian Strobl <jmastr@mailbox.org>
2023-07-19 16:34:42 +02:00
Julian Strobl
a97d1126f9 [tests] DRY
Signed-off-by: Julian Strobl <jmastr@mailbox.org>
2023-07-19 16:34:42 +02:00
Julian Strobl
18ce58f139 [tests] Use sample.Machine()
Signed-off-by: Julian Strobl <jmastr@mailbox.org>
2023-07-19 16:34:42 +02:00
Lorenz Herzberger
4b506537e5 add rule for ignoring proto generated files on staticcheck
Signed-off-by: Lorenz Herzberger <lorenzherzberger@gmail.com>
2023-07-19 16:33:30 +02:00
Lorenz Herzberger
a6814a0594 add check for machine.reissue == true
Signed-off-by: Lorenz Herzberger <lorenzherzberger@gmail.com>
2023-07-19 16:21:44 +02:00
Lorenz Herzberger
fbe1a475a7 adjust machine proto message and tests
Signed-off-by: Lorenz Herzberger <lorenzherzberger@gmail.com>
2023-07-19 16:09:15 +02:00
Julian Strobl
5a435575b5 [lint] Fix some errors
Signed-off-by: Julian Strobl <jmastr@mailbox.org>
2023-07-19 15:53:42 +02:00