20 Commits

Author SHA1 Message Date
Lorenz Herzberger
2a5b7c49c8
447 add validatoraddress getter to config (#449)
* feat: add GetValidatorAddress() to config
* feat: add GetDefaultValidatorRecord() to libConfig
---------

Signed-off-by: Lorenz Herzberger <lorenzherzberger@gmail.com>
2024-10-02 13:52:26 +02:00
Jürgen Eckel
588a21f76e
stageing network takedown to avoid leveldb panics (#347)
Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>
2024-03-11 15:30:39 +01:00
Jürgen Eckel
1e1e19bb19
added more sync objects to avoid accidential data races (#345)
* Added more sync objects to avoid accidental data races
* made lib.config.Config variables are private, so they cannot be tampered with (multithreading).
Please introduce Get-methods to retrieve the varialbes outside of the package if you need it.
This way, the race conditions and unexpected change of the global object state can be protected
* added reverse takedown of the validators to avoid the following error
 [app] PoP broadcast tx failed: node0.info: key not found
* moved util.TerminationWaitGroup.Wait()
to the central network cleanup method
* removed mappings for private variables


Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>
2024-03-11 11:11:56 +01:00
Jürgen Eckel
e6f6e43754
fixed crashes when two machines are attested at the same time (#343)
* * added creation of random machines to prepare a test case
* setting all the consensus timeout values at once (if changed)
* mutex protection of the elements tx crafting methods (sequential processing)
* Extending the TestMachineNFTIssuance test case to parallel threads and threading issues
* moving all elements-rpc usage to the elementd-connector.go file
* removed call to fatal
* added WaitForNextBlock to be out of sync with PoP to avoid the following error
                PoP broadcast tx failed: node0.info: key not found
  after the test
---------

Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>
2024-03-08 10:54:52 +01:00
Jürgen Eckel
73e27b6145
tidy up ci logs (#339)
* moved initialization code to network initialization so that failures during the 1st 5 blocks disappear

---------

Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>
2024-03-06 15:04:38 +01:00
Jürgen Eckel
4f5b1e5777
Multi validator setup in test cases (#333)
* 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>
2024-03-05 11:37:01 +01:00
Jürgen Eckel
04e45a7fb2
275 refactor feedenom on e2e test suite (#312)
* extended AttestMachine FundAccount to support a given fee denominator
* renamed testutil/network/network.go to testutil/network/loader.go
* renamed new to Load
* integrated cosmos/testutil/network to planetmint-go/testutil/network
* changed to plmnt token tests only!
* removed obsolete variables
* fixed newest linter issues

---------

Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>
2024-02-14 12:15:40 +01:00
Jürgen Eckel
a29f394bc4
192 migrate config params to on chain module params (#307)
* initial refactoring commit
* added config passing to network creation for some test suits
* fixed refactoring issues
* adjusted params

Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>
2024-01-30 16:12:04 +01:00
Jürgen Eckel
f6509cfa64
removed StakeDenom and it's related code (#299)
* removed StakeDenom and it's related code
* fixed PoP, reissuance & distribution tests

Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>
2024-01-25 15:10:07 +01:00
Julian Strobl
6d05f85cbd
Use lib in rest e2e machine test (#263)
* refactor: align variable name with rest of the code

Signed-off-by: Julian Strobl <jmastr@mailbox.org>
2024-01-09 10:14:54 +01:00
Julian Strobl
1d41d050fe
feat: add mqtt mock client (#245)
Signed-off-by: Julian Strobl <jmastr@mailbox.org>
2023-12-21 13:03:10 +01:00
Julian Strobl
ff2f2eb386
[test] Use elements RPC mock server (#232)
Fix `reissueasset` in tests.

Signed-off-by: Julian Strobl <jmastr@mailbox.org>
2023-12-13 15:42:09 +01:00
Julian Strobl
804a8e5be6
Add AppLogger to test runs (#230)
* [log] Do not create a new object of `GetAppLogger()` every time

* [tests] Enable AppLogger during testing

Signed-off-by: Julian Strobl <jmastr@mailbox.org>
2023-12-12 13:39:37 +01:00
Julian Strobl
df8ece2a30
Fix TestReissuance() E2E test (#214)
* [lib] Add fee denominator parameter

* [lib] Add client context parameter

e.g. the test cases create their own client context.

* [lib] Reset client context's output

Otherwise if the client context does not change, output gets appended
and gets un-parsable.

* [test] Set missing validator client context values

Necessary for sending transactions.

* [test] Configure RPC library

* [test] Fix `TestReissuance()`

// Closes #195

* Partially revert "[lib] Provide default encoding config (#209)"

This reverts commit 8a8a3aaaf2648f87c4052575bc1a60b23056463b.

Fix README example.

Signed-off-by: Julian Strobl <jmastr@mailbox.org>
2023-12-07 09:57:33 +01:00
Julian Strobl
5470fc668b
Improve linter setup (#185)
* [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>
2023-11-16 17:44:38 +01:00
Jürgen Eckel
a982abecf5
Distribute assets (#162)
* 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>
2023-11-15 13:31:20 +01:00
Lorenz Herzberger
94022e1102
100 set fees to be 1 plmnt for a tx (#114)
* replace DeductFeeDecorator and adjust e2e tests
* reorganize decorators and add comments

---------

Signed-off-by: Lorenz Herzberger <lorenzherzberger@gmail.com>
2023-10-03 09:01:39 +02:00
Julian Strobl
d4eed021c8
[go.mod] Switch module to github.com (#86)
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>
2023-09-21 17:37:57 +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
7810d08780
Add initial generated code
```
$ ignite version
Ignite CLI version:             v0.27.1
Cosmos SDK version:             v0.47.3

$ ignite scaffold chain planetmint-go --address-prefix plmt --no-module
```

Signed-off-by: Julian Strobl <jmastr@mailbox.org>
2023-06-27 13:15:02 +02:00