diff --git a/CHANGELOG.md b/CHANGELOG.md index 4d03e402a..2cd9150f9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,16 @@ # Changelog +## 0.8.1 +*Dec 10th, 2018* + +IMPROVEMENT + +- [core] Speed-up tx processing + +BUG FIXES + +- [config] Change default seed node + ## 0.8.0 *Dec 3rd, 2018* diff --git a/config/config.go b/config/config.go index 1b3c5029a..11090b71b 100644 --- a/config/config.go +++ b/config/config.go @@ -51,7 +51,7 @@ func init() { func DefaultConfig() *Config { cfg := defaultConfig() - cfg.P2P.Seeds = "d20522aa7ba4af8139749c5e724063c4ba18c58b@minter-node-2.testnet.minter.network:26656" + cfg.P2P.Seeds = "647e32df3b9c54809b5aca2877d9ba60900bc2d9@minter-node-1.testnet.minter.network:26656" cfg.TxIndex = &tmConfig.TxIndexConfig{ Indexer: "kv", diff --git a/core/transaction/transaction.go b/core/transaction/transaction.go index a87e189e7..aa71d964b 100644 --- a/core/transaction/transaction.go +++ b/core/transaction/transaction.go @@ -52,6 +52,7 @@ type Transaction struct { decodedData Data sig *Signature multisig *SignatureMulti + sender *types.Address } type Signature struct { @@ -190,14 +191,24 @@ func (tx *Transaction) SetSignature(sig []byte) { } func (tx *Transaction) Sender() (types.Address, error) { + if tx.sender != nil { + return *tx.sender, nil + } + switch tx.SignatureType { case SigTypeSingle: - return RecoverPlain(tx.Hash(), tx.sig.R, tx.sig.S, tx.sig.V) + sender, err := RecoverPlain(tx.Hash(), tx.sig.R, tx.sig.S, tx.sig.V) + if err != nil { + return types.Address{}, err + } + + tx.sender = &sender + return sender, nil case SigTypeMulti: return tx.multisig.Multisig, nil - default: - return types.Address{}, errors.New("unknown signature type") } + + return types.Address{}, errors.New("unknown signature type") } func (tx *Transaction) Hash() types.Hash { diff --git a/docker-compose.yml b/docker-compose.yml index 83f0227d3..1ec30d42e 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,7 +1,7 @@ version: "3.4" services: minter: - image: minterteam/minter:0.8.0 + image: minterteam/minter:0.8.1 volumes: - ~/.minter:/minter ports: diff --git a/docs/api.rst b/docs/api.rst index a164f1002..9415fe2f5 100755 --- a/docs/api.rst +++ b/docs/api.rst @@ -331,7 +331,7 @@ Returns full list of candidates. .. code-block:: bash - curl -s 'localhost:8841/events?height={height}' + curl -s 'localhost:8841/candidates?height={height}' .. code-block:: json diff --git a/version/version.go b/version/version.go index a65cab728..98fb1cc07 100755 --- a/version/version.go +++ b/version/version.go @@ -4,12 +4,12 @@ package version const ( Maj = "0" Min = "8" - Fix = "0" + Fix = "1" ) var ( // Must be a string because scripts like dist.sh read this file. - Version = "0.8.0" + Version = "0.8.1" // GitCommit is the current HEAD set using ldflags. GitCommit string