Skip to content

Commit

Permalink
Merge branch 'develop' into cwgoes/simulation-transubstantiated
Browse files Browse the repository at this point in the history
  • Loading branch information
Aleksandr Bezobchuk committed Nov 3, 2018
2 parents 559ebb7 + 15c2093 commit 7b10ac4
Show file tree
Hide file tree
Showing 22 changed files with 622 additions and 268 deletions.
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# CODEOWNERS: https://help.github.com/articles/about-codeowners/

# Primary repo maintainers
* @ebuchman @rigelrozanski @cwgoes
* @jaekwon

# Precious documentation
/docs/ @zramsay @jolesbi
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ test_sim_gaia_nondeterminism:

test_sim_gaia_fast:
@echo "Running quick Gaia simulation. This may take several minutes..."
@go test ./cmd/gaia/app -run TestFullGaiaSimulation -SimulationEnabled=true -SimulationNumBlocks=500 -SimulationBlockSize=200 -SimulationCommit=true -SimulationSeed=9 -v -timeout 24h
@go test ./cmd/gaia/app -run TestFullGaiaSimulation -SimulationEnabled=true -SimulationNumBlocks=500 -SimulationBlockSize=200 -SimulationCommit=true -SimulationSeed=10 -v -timeout 24h

test_sim_gaia_multi_seed:
@echo "Running multi-seed Gaia simulation. This may take awhile!"
Expand Down
8 changes: 5 additions & 3 deletions PENDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ BREAKING CHANGES
* Gaia

* SDK
* [simulation] \#2665 only argument to simulation.Invariant is now app

* Tendermint

Expand Down Expand Up @@ -44,10 +45,11 @@ IMPROVEMENTS
- #2556 [x/mock/simulation] Fix debugging output
- #2396 [x/mock/simulation] Change parameters to get more slashes
- #2617 [x/mock/simulation] Randomize all genesis parameters
- \#1924 [simulation] Use a transition matrix for block size
- #2610 [x/stake] Block redelegation to and from the same validator
- #2669 [x/stake] Added invarant check to make sure validator's power aligns with its spot in the power store.

- \#1924 [x/mock/simulation] Use a transition matrix for block size
- \#2660 [x/mock/simulation] Staking transactions get tested far more frequently
- #2610 [x/stake] Block redelegation to and from the same validator
- #2652 [x/auth] Add benchmark for get and set account

* Tendermint

Expand Down
7 changes: 6 additions & 1 deletion client/keys/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,12 @@ func GetKeyBaseFromDirWithWritePerm(rootDir string) (keys.Keybase, error) {

// GetKeyBaseFromDir initializes a read-only keybase at a particular dir.
func GetKeyBaseFromDir(rootDir string) (keys.Keybase, error) {
return getKeyBaseFromDirWithOpts(rootDir, &opt.Options{ReadOnly: true})
// Disabled because of the inability to create a new keys database directory
// in the instance of when ReadOnly is set to true.
//
// ref: syndtr/goleveldb#240
// return getKeyBaseFromDirWithOpts(rootDir, &opt.Options{ReadOnly: true})
return getKeyBaseFromDirWithOpts(rootDir, nil)
}

func getKeyBaseFromDirWithOpts(rootDir string, o *opt.Options) (keys.Keybase, error) {
Expand Down
1 change: 1 addition & 0 deletions client/lcd/certificates.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ func generateSelfSignedCert(host string) (certBytes []byte, priv *ecdsa.PrivateK
Subject: pkix.Name{
Organization: []string{"Gaia Lite"},
},
DNSNames: []string{"localhost"},
NotBefore: notBefore,
NotAfter: notAfter,
KeyUsage: x509.KeyUsageKeyEncipherment | x509.KeyUsageDigitalSignature | x509.KeyUsageCertSign,
Expand Down
2 changes: 1 addition & 1 deletion client/lcd/certificates_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ func TestGenerateSelfSignedCert(t *testing.T) {
cert, err := x509.ParseCertificate(certBytes)
require.Nil(t, err)
require.Equal(t, 2, len(cert.IPAddresses))
require.Equal(t, 1, len(cert.DNSNames))
require.Equal(t, 2, len(cert.DNSNames))
require.True(t, cert.IsCA)
}

Expand Down
25 changes: 12 additions & 13 deletions client/lcd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,13 @@ package lcd

import (
"errors"
"net"
"net/http"
"os"

"github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/client/context"
"github.com/cosmos/cosmos-sdk/client/keys"
"github.com/cosmos/cosmos-sdk/client/rpc"
"github.com/cosmos/cosmos-sdk/client/tx"
"github.com/cosmos/cosmos-sdk/codec"
"github.com/cosmos/cosmos-sdk/server"
auth "github.com/cosmos/cosmos-sdk/x/auth/client/rest"
bank "github.com/cosmos/cosmos-sdk/x/bank/client/rest"
gov "github.com/cosmos/cosmos-sdk/x/gov/client/rest"
Expand All @@ -21,9 +18,11 @@ import (
"github.com/rakyll/statik/fs"
"github.com/spf13/cobra"
"github.com/spf13/viper"
cmn "github.com/tendermint/tendermint/libs/common"
"github.com/tendermint/tendermint/libs/log"
tmserver "github.com/tendermint/tendermint/rpc/lib/server"
"net"
"net/http"
"os"
)

const (
Expand Down Expand Up @@ -53,10 +52,16 @@ func ServeCommand(cdc *codec.Codec) *cobra.Command {
sslHosts := viper.GetString(flagSSLHosts)
certFile := viper.GetString(flagSSLCertFile)
keyFile := viper.GetString(flagSSLKeyFile)
cleanupFunc := func() {}

var listener net.Listener
var fingerprint string

server.TrapSignal(func() {
err := listener.Close()
logger.Error("error closing listener", "err", err)
})

var cleanupFunc func()
if viper.GetBool(flagInsecure) {
listener, err = tmserver.StartHTTPServer(
listenAddr, handler, logger,
Expand Down Expand Up @@ -89,6 +94,7 @@ func ServeCommand(cdc *codec.Codec) *cobra.Command {
}
defer cleanupFunc()
}

listener, err = tmserver.StartHTTPAndTLSServer(
listenAddr, handler,
certFile, keyFile,
Expand All @@ -102,13 +108,6 @@ func ServeCommand(cdc *codec.Codec) *cobra.Command {
}
logger.Info("REST server started")

// wait forever and cleanup
cmn.TrapSignal(func() {
defer cleanupFunc()
err := listener.Close()
logger.Error("error closing listener", "err", err)
})

return nil
},
}
Expand Down
4 changes: 2 additions & 2 deletions docs/.vuepress/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ module.exports = {
title: "Light Client",
collapsable: false,
children: [
"/light/",
"/light/getting_started"
"/lite/",
"/lite/getting_started"
]
},
{
Expand Down
86 changes: 0 additions & 86 deletions docs/config.js

This file was deleted.

Loading

0 comments on commit 7b10ac4

Please sign in to comment.