forked from iov-one/iovns
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add v0.3.0-pre to travis builds * change: move domain & account checks to controllers (iov-one#123) * change: move domain checks to controllers * Shorten controller naming * Improve code organisation * change: move account handlers validity check to controllers * add: account cert existence + docs * add: cert not exist tests * add: account expiration tests * add: account owned by tests * add: valid name tests * add: require account tests * chore: docs * Move subtest suite to different module * Add domain test * Move testing to suite * Revert "Move testing to suite" This reverts commit 3b483ad. * Move suite to x/domain/testing * Make test key generation static * add: domain controller tests * Apply suggestions from code review * Move account controller to new module * Move domain controller to new module * Refactor controllers * Add changelog * Separate handler to account/domain_handler file Co-authored-by: orkunkl <kulceorkun@gmail.com> Co-authored-by: Orkun Külçe <orkunkl@users.noreply.github.com> * Convert HasSuperUser to DomainType (iov-one#137) * Change HasSuperUser to DomainType * Apply review recommendation * Rename close to closed * Delete zero admin assignment; Edit super user references in tests (iov-one#139) * Reconciliate configuration (iov-one#150) * Recon configuration * Update config tx use values on the live chain * Resolve import cycle * Fix errors * Simplify configuration tx * pre requisites for domain reconciliation (iov-one#153) * fix: register domain fee collection * add: max valid until default * V0.3.0 recon (iov-one#161) * change: move remaining domain authorization checks to handlers * change: register domain creation, and create domain related tests * update: delete domain one line auth * change: move blockchain targets checks to controllers * change: move transfer account checks to controllers * add: domain ctrl caching and account ctrl tests * add: add existence and transferability tests for accounts * chore: go mod tidy * chore: update CHANGELOG.md * change: reconcile domain register * change: reconcile domain transfer * change: add iovnscli flag for domain transfer * change: domain renew reconcile * update: CHANGELOG.md * Recon account handlers (iov-one#165) * Recon: register account * Apply review recommendations * Add cli * Recon: transfer account * Add cli tx * Recon: delete account targets * Started replace account targets * Improve replace account targets * Add changelog * Finalize recon replace account targets * Fix changelog * Recon: add account certs * Recon: delete account certs * Recon: replace metadata * Start recon renew account * account reconciliation finalization (iov-one#168) * change: finalize account reconciliation * update: CHANGELOG.md * Last touches * Fix error message Co-authored-by: Frojdi Dymylja <33157909+fdymylja@users.noreply.github.com> Co-authored-by: Frojdi Dymylja <33157909+fdymylja@users.noreply.github.com>
- Loading branch information
Showing
38 changed files
with
4,955 additions
and
1,840 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -84,5 +84,6 @@ notifications: | |
branches: | ||
only: | ||
- master | ||
- v0.3.0-pre | ||
- /^v[0-9]+\.[0-9]+\.x$/ | ||
- /^v[0-9]+\.[0-9]+\.[0-9]+$/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package mock | ||
|
||
import ( | ||
"fmt" | ||
"github.com/cosmos/cosmos-sdk/crypto/keys" | ||
sdk "github.com/cosmos/cosmos-sdk/types" | ||
"os" | ||
) | ||
|
||
func Addresses() (sdk.AccAddress, sdk.AccAddress) { | ||
keyBase := keys.NewInMemory() | ||
addr1, _, err := keyBase.CreateMnemonic("alice", keys.English, "", keys.Secp256k1) | ||
if err != nil { | ||
fmt.Println("unable to generate mock addresses " + err.Error()) | ||
os.Exit(1) | ||
} | ||
addr2, _, err := keyBase.CreateMnemonic("bob", keys.English, "", keys.Secp256k1) | ||
if err != nil { | ||
fmt.Println("unable to generate mock addresses " + err.Error()) | ||
os.Exit(1) | ||
} | ||
return addr1.GetAddress(), addr2.GetAddress() | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package tutils | ||
|
||
import ( | ||
"math/rand" | ||
|
||
sdk "github.com/cosmos/cosmos-sdk/types" | ||
"github.com/tendermint/tendermint/crypto" | ||
"github.com/tendermint/tendermint/crypto/ed25519" | ||
"github.com/tendermint/tendermint/crypto/secp256k1" | ||
) | ||
|
||
func GeneratePrivKeyAddressPairs(n int) (ks []crypto.PrivKey, addrs []sdk.AccAddress) { | ||
r := rand.New(rand.NewSource(12345)) // make the generation deterministic | ||
ks = make([]crypto.PrivKey, n) | ||
addrs = make([]sdk.AccAddress, n) | ||
for i := 0; i < n; i++ { | ||
secret := make([]byte, 32) | ||
_, err := r.Read(secret) | ||
if err != nil { | ||
panic("Could not read randomness") | ||
} | ||
if r.Int63()%2 == 0 { | ||
ks[i] = secp256k1.GenPrivKeySecp256k1(secret) | ||
} else { | ||
ks[i] = ed25519.GenPrivKeyFromSecret(secret) | ||
} | ||
addrs[i] = sdk.AccAddress(ks[i].PubKey().Address()) | ||
} | ||
|
||
return | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.