Skip to content

Commit

Permalink
Merge branch 'master' into aleem/857-sdk-v0.46
Browse files Browse the repository at this point in the history
  • Loading branch information
aleem1314 authored Aug 3, 2022
2 parents 9aaa8d3 + 682e4de commit fafe166
Show file tree
Hide file tree
Showing 51 changed files with 85 additions and 230 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ about: Create a proposal to request a feature

<!-- Why do we need this feature?
What problems may be addressed by introducing this feature?
What benefits does the SDK stand to gain by including this feature?
What benefits does Regen Ledger stand to gain by including this feature?
Are there any disadvantages of including this feature? -->

## Proposal
Expand Down
3 changes: 3 additions & 0 deletions CODEOWNERS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# https://help.github.com/articles/about-codeowners/

* @regen-network/ledger-core-dev
Binary file modified docs/.vuepress/public/regen-ledger.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 0 additions & 13 deletions docs/validators/get-started/using-cosmovisor.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,18 +63,6 @@ You should see the following (the errors following the version are expected if e
cosmovisor version: 1.2.0
```

Verify the checksum of the binary:

```bash
sha256sum $HOME/go/bin/cosmovisor
```

You should see the following:

```bash
63e5700980eb9442962d00becf0fa6f823209f024c5a1c4133f7d4a88c1614f3
```

## Cosmovisor Service

Create a `cosmovisor.service` systemd service file and make sure the environment variables are set to the desired values (the following example includes the default `cosmovisor` configuration settings with the exception of `DAEMON_NAME` and `DAEMON_HOME`):
Expand All @@ -92,7 +80,6 @@ Environment="DAEMON_NAME=regen"
Environment="DAEMON_HOME=${HOME}/.regen"
Environment="DAEMON_ALLOW_DOWNLOAD_BINARIES=false"
Environment="DAEMON_RESTART_AFTER_UPGRADE=true"
Environment="DAEMON_RESTART_DELAY=0s"
Environment="DAEMON_POLL_INTERVAL=300ms"
Environment="DAEMON_DATA_BACKUP_DIR=${HOME}/.regen"
Environment="UNSAFE_SKIP_BACKUP=false"
Expand Down
36 changes: 0 additions & 36 deletions specs/CODEOWNERS.md

This file was deleted.

16 changes: 0 additions & 16 deletions specs/pull_request_template.md

This file was deleted.

Binary file removed specs/regen-network-image.jpg
Binary file not shown.
6 changes: 3 additions & 3 deletions x/ecocredit/basket/features/msg_create.feature
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ Feature: MsgCreate
}
"""
When the message is validated
Then expect the error "credit type abbreviation cannot be empty: invalid request"
Then expect the error "credit type abbreviation cannot be empty: parse error: invalid request"

Scenario: an error is returned if credit type abbreviation is not formatted
Given the message
Expand All @@ -200,7 +200,7 @@ Feature: MsgCreate
}
"""
When the message is validated
Then expect the error "credit type abbreviation must be 1-3 uppercase latin letters: got foobar: invalid request"
Then expect the error "credit type abbreviation must be 1-3 uppercase latin letters: got foobar: parse error: invalid request"

Scenario: an error is returned if allowed credit classes is empty
Given the message
Expand All @@ -227,7 +227,7 @@ Feature: MsgCreate
}
"""
When the message is validated
Then expect the error "allowed_classes[0] cannot be empty: invalid request"
Then expect the error "allowed_classes[0] is not a valid class ID: class id cannot be empty: parse error: invalid request"

Scenario: an error is returned if an allowed credit class is not formatted
Given the message
Expand Down
2 changes: 1 addition & 1 deletion x/ecocredit/basket/features/msg_put.feature
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ Feature: MsgPut
}
"""
When the message is validated
Then expect the error "credit batch denom cannot be empty: invalid request"
Then expect the error "batch denom cannot be empty: parse error: invalid request"

Scenario: an error is returned if a credit batch denom is not formatted
Given the message
Expand Down
9 changes: 1 addition & 8 deletions x/ecocredit/basket/msg_create.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,22 +42,15 @@ func (m MsgCreate) ValidateBasic() error {
return sdkerrors.ErrInvalidRequest.Wrapf("description length cannot be greater than %d characters", descrMaxLen)
}

if len(m.CreditTypeAbbrev) == 0 {
return sdkerrors.ErrInvalidRequest.Wrapf("credit type abbreviation cannot be empty")
}

if err := core.ValidateCreditTypeAbbreviation(m.CreditTypeAbbrev); err != nil {
return err
return sdkerrors.ErrInvalidRequest.Wrap(err.Error())
}

if len(m.AllowedClasses) == 0 {
return sdkerrors.ErrInvalidRequest.Wrap("allowed classes cannot be empty")
}

for i := range m.AllowedClasses {
if m.AllowedClasses[i] == "" {
return sdkerrors.ErrInvalidRequest.Wrapf("allowed_classes[%d] cannot be empty", i)
}
if err := core.ValidateClassId(m.AllowedClasses[i]); err != nil {
return sdkerrors.ErrInvalidRequest.Wrapf("allowed_classes[%d] is not a valid class ID: %s", i, err)
}
Expand Down
4 changes: 0 additions & 4 deletions x/ecocredit/basket/msg_put.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,6 @@ func (m MsgPut) ValidateBasic() error {

if len(m.Credits) > 0 {
for _, credit := range m.Credits {
if len(credit.BatchDenom) == 0 {
return sdkerrors.ErrInvalidRequest.Wrap("credit batch denom cannot be empty")
}

if err := core.ValidateBatchDenom(credit.BatchDenom); err != nil {
return sdkerrors.ErrInvalidRequest.Wrap(err.Error())
}
Expand Down
4 changes: 2 additions & 2 deletions x/ecocredit/core/features/msg_bridge.feature
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ Feature: MsgBridge
}
"""
When the message is validated
Then expect the error "credits[0]: batch denom cannot be empty: invalid request"
Then expect the error "credits[0]: batch denom cannot be empty: parse error: invalid request"

Scenario: an error is returned if credits batch denom is not formatted
Given the message
Expand All @@ -144,7 +144,7 @@ Feature: MsgBridge
}
"""
When the message is validated
Then expect the error "credits[0]: invalid batch denom: expected format A00-000-00000000-00000000-000: parse error"
Then expect the error "credits[0]: invalid batch denom: expected format A00-000-00000000-00000000-000: parse error: invalid request"

Scenario: an error is returned if credits amount is empty
Given the message
Expand Down
4 changes: 2 additions & 2 deletions x/ecocredit/core/features/msg_bridge_receive.feature
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ Feature: MsgBridgeReceive
}
"""
When the message is validated
Then expect the error "class id cannot be empty: invalid request"
Then expect the error "class id cannot be empty: parse error: invalid request"

Scenario: an error is returned if class id is not formatted
Given the message
Expand Down Expand Up @@ -114,7 +114,7 @@ Feature: MsgBridgeReceive
}
"""
When the message is validated
Then expect the error "project jurisdiction cannot be empty: invalid request"
Then expect the error "jurisdiction cannot be empty, expected format <country-code>[-<region-code>[ <postal-code>]]: parse error: invalid request"

Scenario: an error is returned if project jurisdiction is not formatted
Given the message
Expand Down
2 changes: 1 addition & 1 deletion x/ecocredit/core/features/msg_cancel.feature
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ Feature: MsgCancel
}
"""
When the message is validated
Then expect the error "credits[0]: batch denom cannot be empty: invalid request"
Then expect the error "credits[0]: batch denom cannot be empty: parse error: invalid request"

Scenario: an error is returned if credits amount is empty
Given the message
Expand Down
4 changes: 2 additions & 2 deletions x/ecocredit/core/features/msg_create_batch.feature
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ Feature: MsgCreateBatch
}
"""
When the message is validated
Then expect the error "project id cannot be empty: invalid request"
Then expect the error "project id cannot be empty: parse error: invalid request"

Scenario: an error is returned if project id is not formatted
Given the message
Expand All @@ -133,7 +133,7 @@ Feature: MsgCreateBatch
}
"""
When the message is validated
Then expect the error "invalid project id: foo: parse error"
Then expect the error "invalid project id: foo: parse error: invalid request"

Scenario: an error is returned if issuance is empty
Given the message
Expand Down
4 changes: 2 additions & 2 deletions x/ecocredit/core/features/msg_create_class.feature
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ Feature: MsgCreateClass
}
"""
When the message is validated
Then expect the error "credit type abbreviation cannot be empty: invalid request"
Then expect the error "credit type abbreviation cannot be empty: parse error: invalid request"

Scenario: an error is returned if credit type abbreviation is not formatted
Given the message
Expand All @@ -150,7 +150,7 @@ Feature: MsgCreateClass
}
"""
When the message is validated
Then expect the error "credit type abbreviation must be 1-3 uppercase latin letters: got foobar: invalid request"
Then expect the error "credit type abbreviation must be 1-3 uppercase latin letters: got foobar: parse error: invalid request"

Scenario: an error is returned if fee denom is empty
Given the message
Expand Down
8 changes: 4 additions & 4 deletions x/ecocredit/core/features/msg_create_project.feature
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ Feature: MsgCreateProject
}
"""
When the message is validated
Then expect the error "class id cannot be empty: invalid request"
Then expect the error "class id cannot be empty: parse error: invalid request"

Scenario: an error is returned if class id is not formatted
Given the message
Expand All @@ -77,7 +77,7 @@ Feature: MsgCreateProject
}
"""
When the message is validated
Then expect the error "class ID didn't match the format: expected A00, got foo: parse error"
Then expect the error "class ID didn't match the format: expected A00, got foo: parse error: invalid request"

Scenario: an error is returned if metadata is exceeds 256 characters
Given the message
Expand All @@ -101,7 +101,7 @@ Feature: MsgCreateProject
}
"""
When the message is validated
Then expect the error "jurisdiction cannot be empty: invalid request"
Then expect the error "jurisdiction cannot be empty, expected format <country-code>[-<region-code>[ <postal-code>]]: parse error: invalid request"

Scenario: an error is returned if jurisdiction is not formatted
Given the message
Expand All @@ -114,7 +114,7 @@ Feature: MsgCreateProject
}
"""
When the message is validated
Then expect the error "invalid jurisdiction: foo, expected format <country-code>[-<region-code>[ <postal-code>]]: parse error"
Then expect the error "invalid jurisdiction: foo, expected format <country-code>[-<region-code>[ <postal-code>]]: parse error: invalid request"

Scenario: an error is returned if reference id is exceeds 32 characters
Given the message
Expand Down
4 changes: 2 additions & 2 deletions x/ecocredit/core/features/msg_mint_batch_credits.feature
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ Feature: MsgMintBatchCredits
}
"""
When the message is validated
Then expect the error "batch denom cannot be empty: invalid request"
Then expect the error "batch denom cannot be empty: parse error: invalid request"

Scenario: an error is returned if batch denom is not formatted
Given the message
Expand All @@ -86,7 +86,7 @@ Feature: MsgMintBatchCredits
}
"""
When the message is validated
Then expect the error "invalid batch denom: expected format A00-000-00000000-00000000-000: parse error"
Then expect the error "invalid batch denom: expected format A00-000-00000000-00000000-000: parse error: invalid request"

Scenario: an error is returned if issuance is empty
Given the message
Expand Down
6 changes: 3 additions & 3 deletions x/ecocredit/core/features/msg_retire.feature
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ Feature: MsgRetire
}
"""
When the message is validated
Then expect the error "credits[0]: batch denom cannot be empty: invalid request"
Then expect the error "credits[0]: batch denom cannot be empty: parse error: invalid request"

Scenario: an error is returned if credits amount is empty
Given the message
Expand Down Expand Up @@ -110,7 +110,7 @@ Feature: MsgRetire
}
"""
When the message is validated
Then expect the error "jurisdiction cannot be empty: invalid request"
Then expect the error "jurisdiction cannot be empty, expected format <country-code>[-<region-code>[ <postal-code>]]: parse error: invalid request"

Scenario: an error is returned if jurisdiction is not formatted
Given the message
Expand All @@ -127,4 +127,4 @@ Feature: MsgRetire
}
"""
When the message is validated
Then expect the error "invalid jurisdiction: foo, expected format <country-code>[-<region-code>[ <postal-code>]]: parse error"
Then expect the error "invalid jurisdiction: foo, expected format <country-code>[-<region-code>[ <postal-code>]]: parse error: invalid request"
4 changes: 2 additions & 2 deletions x/ecocredit/core/features/msg_seal_batch.feature
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Feature: MsgSealBatch
}
"""
When the message is validated
Then expect the error "batch denom cannot be empty: invalid request"
Then expect the error "batch denom cannot be empty: parse error: invalid request"

Scenario: an error is returned if batch denom is not formatted
Given the message
Expand All @@ -48,4 +48,4 @@ Feature: MsgSealBatch
}
"""
When the message is validated
Then expect the error "invalid batch denom: expected format A00-000-00000000-00000000-000: parse error"
Then expect the error "invalid batch denom: expected format A00-000-00000000-00000000-000: parse error: invalid request"
8 changes: 4 additions & 4 deletions x/ecocredit/core/features/msg_send.feature
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ Feature: MsgSend
}
"""
When the message is validated
Then expect the error "batch denom cannot be empty: invalid request"
Then expect the error "batch denom cannot be empty: parse error: invalid request"

Scenario: an error is returned if credits batch denom is not formatted
Given the message
Expand All @@ -119,7 +119,7 @@ Feature: MsgSend
}
"""
When the message is validated
Then expect the error "invalid batch denom: expected format A00-000-00000000-00000000-000: parse error"
Then expect the error "invalid batch denom: expected format A00-000-00000000-00000000-000: parse error: invalid request"

Scenario: an error is returned if credits tradable amount and retired amount are empty
Given the message
Expand Down Expand Up @@ -186,7 +186,7 @@ Feature: MsgSend
}
"""
When the message is validated
Then expect the error "retirement jurisdiction required: invalid request"
Then expect the error "retirement jurisdiction: jurisdiction cannot be empty, expected format <country-code>[-<region-code>[ <postal-code>]]: parse error: invalid request"

Scenario: an error is returned if credits retired amount is positive and retirement jurisdiction is not formatted
Given the message
Expand All @@ -204,4 +204,4 @@ Feature: MsgSend
}
"""
When the message is validated
Then expect the error "invalid jurisdiction: foo, expected format <country-code>[-<region-code>[ <postal-code>]]: parse error"
Then expect the error "retirement jurisdiction: invalid jurisdiction: foo, expected format <country-code>[-<region-code>[ <postal-code>]]: parse error: invalid request"
4 changes: 2 additions & 2 deletions x/ecocredit/core/features/msg_update_class_admin.feature
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Feature: MsgUpdateClassAdmin
}
"""
When the message is validated
Then expect the error "class id cannot be empty: invalid request"
Then expect the error "class id cannot be empty: parse error: invalid request"

Scenario: an error is returned if class id is not formatted
Given the message
Expand All @@ -49,7 +49,7 @@ Feature: MsgUpdateClassAdmin
}
"""
When the message is validated
Then expect the error "class ID didn't match the format: expected A00, got foo: parse error"
Then expect the error "class ID didn't match the format: expected A00, got foo: parse error: invalid request"

Scenario: an error is returned if new admin is empty
Given the message
Expand Down
Loading

0 comments on commit fafe166

Please sign in to comment.