Skip to content

Commit

Permalink
Version 0.12.1
Browse files Browse the repository at this point in the history
See PR #276
  • Loading branch information
RiccardoM authored Sep 28, 2020
1 parent d2c3b3f commit 4b75957
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Version 0.12.1
## Bug fixes
- Fixed an upgrade migration bug

# Version 0.12.0
## Changes
- Changed `relationships`' implementation adding a `subspace` field to identify in which app users make relationships (#266)
Expand Down
4 changes: 2 additions & 2 deletions docs/validators/validator-faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ Delegators are free to choose validators according to their own subjective crite
- **Commission rate:** Commission applied on revenue by validators before it is distributed to their delegators.
- **Track record:** Delegators will likely look at the track record of the validators they plan to delegate to. This includes seniority, past votes on proposals, historical average uptime and how often the node was compromised.

Apart from these criteria, there will be a possibility for validators to signal a website address to complete their resume. Validators will need to build reputation one way or another to attract delegators. For example, it would be a good practice for validators to have their setup audited by third parties. Note though, that the Tendermint team will not approve or conduct any audit themselves. For more on due diligence, see [this blog post](https://medium.com/@interchain_io/3d0faf10ce6f)
Apart from these criteria, there will be a possibility for validators to signal a website address to complete their resume. Validators will need to build reputation one way or another to attract delegators. For example, it would be a good practice for validators to have their setup audited by third parties. Note though, that the Desmos team will not approve or conduct any audit themselves. For more on due diligence, see [this blog post](https://medium.com/@interchain_io/3d0faf10ce6f)

## Responsibilities
### Do validators need to be publicly identified?
Expand Down Expand Up @@ -230,7 +230,7 @@ Validators should expect to run an HSM that supports ed25519 keys. Here are pote
- Ledger BOLOS SGX enclave
- Thales nShield support

The Tendermint team does not recommend one solution above the other. The community is encouraged to bolster the effort to improve HSMs and the security of key management.
The Desmos team does not recommend one solution above the other. The community is encouraged to bolster the effort to improve HSMs and the security of key management.

### What can validators expect in terms of operations?
Running effective operation is the key to avoiding unexpectedly unbonding or being slashed. This includes being able to respond to attacks, outages, as well as to maintain security and isolation in your data center.
Expand Down
41 changes: 41 additions & 0 deletions x/posts/keeper/legacy/v0.10.0/types.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package v0100

import (
"sort"
"time"

sdk "github.com/cosmos/cosmos-sdk/types"
Expand All @@ -13,6 +14,46 @@ type PostID string
// Amino and JSON serialization and deserialization.
type OptionalData map[string]string

// KeyValue is a simple key/value representation of one field of a OptionalData.
type KeyValue struct {
Key string
Value string
}

// MarshalAmino transforms the OptionalData to an array of key/value.
func (m OptionalData) MarshalAmino() ([]KeyValue, error) {
fieldKeys := make([]string, len(m))
i := 0
for key := range m {
fieldKeys[i] = key
i++
}

sort.Stable(sort.StringSlice(fieldKeys))

p := make([]KeyValue, len(m))
for i, key := range fieldKeys {
p[i] = KeyValue{
Key: key,
Value: m[key],
}
}

return p, nil
}

// UnmarshalAmino transforms the key/value array to a OptionalData.
func (m *OptionalData) UnmarshalAmino(keyValues []KeyValue) error {
tempMap := make(map[string]string, len(keyValues))
for _, p := range keyValues {
tempMap[p.Key] = p.Value
}

*m = tempMap

return nil
}

// Attachment contains the information representing any type of file provided with a post.
// This file can be an image or a multimedia file (vocals, video, documents, etc.).
type Attachment struct {
Expand Down

0 comments on commit 4b75957

Please sign in to comment.