Skip to content

Commit 0da0b01

Browse files
authored
Merge pull request #56 from MinterTeam/dev
v0.0.6
2 parents 5c87d36 + 804903f commit 0da0b01

57 files changed

Lines changed: 2303 additions & 2121 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CHANGELOG.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,26 @@
11
# Changelog
22

3+
## 0.0.6
4+
*Jule 16th, 2018*
5+
6+
BREAKING CHANGES
7+
8+
- [core] Change commissions
9+
- [testnet] New testnet id
10+
- [core] Fix transaction decoding issue
11+
- [core] Remove transaction ConvertCoin, add SellCoin and BuyCoin. For details see the docs.
12+
- [core] Coin name is now limited to max 64 bytes
13+
- [api] Update estimate exchange endpoint
14+
15+
IMPROVEMENT
16+
17+
- [api] Update transaction api
18+
- [api] Add transaction result to block api
19+
- [mempool] Mempool cache is disabled
20+
- [tendermint] Updated to v0.22.4
21+
- [versioning] Adapt Semantic Versioning https://semver.org/
22+
- [client] Add --disable-api flag to client
23+
324
## 0.0.5
425
*Jule 4rd, 2018*
526

Gopkg.lock

Lines changed: 6 additions & 19 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Gopkg.toml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,6 @@
2424
# go-tests = true
2525
# unused-packages = true
2626

27-
28-
[[constraint]]
29-
branch = "master"
30-
name = "github.com/ALTree/floatutils"
31-
3227
[[constraint]]
3328
branch = "master"
3429
name = "github.com/btcsuite/btcd"
@@ -59,7 +54,7 @@
5954

6055
[[constraint]]
6156
name = "github.com/tendermint/tendermint"
62-
version = "0.22.0"
57+
version = "0.22.4"
6358

6459
[[constraint]]
6560
branch = "v2"

README.md

Lines changed: 19 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -10,91 +10,32 @@ Minter is a blockchain network that lets people, projects, and companies issue a
1010

1111
_NOTE: This is alpha software. Please contact us if you intend to run it in production._
1212

13-
## Documentation
14-
15-
For documentation, [Read The Docs](https://minter-go-node.readthedocs.io/en/dev/).
16-
17-
## Run using Docker
18-
19-
You'll need [docker](https://docker.com/) and [docker compose](https://docs.docker.com/compose/) installed.
20-
21-
Clone Minter to your machine
22-
```bash
23-
$ git clone https://github.com/MinterTeam/minter-go-node.git
24-
$ cd minter-go-node
25-
```
26-
27-
Prepare configs
28-
```bash
29-
$ mkdir -p ~/.tendermint/data
30-
$ mkdir -p ~/.minter/data
31-
32-
$ cp -R networks/testnet/ ~/.tendermint/config
33-
34-
$ chmod -R 0777 ~/.tendermint
35-
$ chmod -R 0777 ~/.minter
36-
```
13+
## Installation
3714

38-
Start Minter
39-
```bash
40-
$ docker-compose up
41-
```
15+
You can get official installation instructions in our [docs](https://minter-go-node.readthedocs.io/en/dev/install.html).
4216

43-
## Build and run manually
44-
45-
You'll need **go** [installed](https://golang.org/doc/install) and the required
46-
[environment variables set](https://github.com/tendermint/tendermint/wiki/Setting-GOPATH)
47-
48-
1. Install [Tendermint 0.22.0](https://github.com/tendermint/tendermint/blob/master/docs/install.rst)
49-
50-
2. Clone Minter to your machine
51-
```bash
52-
$ mkdir $GOPATH/src/github.com/MinterTeam
53-
$ cd $GOPATH/src/github.com/MinterTeam
54-
$ git clone https://github.com/MinterTeam/minter-go-node.git
55-
$ cd minter-go-node
56-
```
57-
58-
3. Get Tools & Dependencies
59-
60-
```bash
61-
$ make get_tools
62-
$ make get_vendor_deps
63-
```
64-
65-
4. Compile & install
66-
```bash
67-
$ make install
68-
```
69-
70-
5. Create data directories
71-
```bash
72-
$ mkdir -p ~/.tendermint/data
73-
$ mkdir -p ~/.minter/data
74-
```
17+
## Documentation
7518

76-
6. Copy config and genesis file
77-
```bash
78-
$ cp -R networks/testnet/ ~/.tendermint/config
79-
```
19+
For documentation, [Read The Docs](https://minter-go-node.readthedocs.io/en/dev/).
8020

81-
7. Run Tendermint
82-
```bash
83-
$ tendermint node
84-
```
21+
## Versioning
8522

86-
8. Run Minter
23+
### SemVer
8724

88-
```bash
89-
$ minter
90-
```
25+
Minter uses [SemVer](http://semver.org/) to determine when and how the version changes.
26+
According to SemVer, anything in the public API can change at any time before version 1.0.0
9127

92-
## Troubleshooting
28+
To provide some stability to Minter users in these 0.X.X days, the MINOR version is used
29+
to signal breaking changes across a subset of the total public API. This subset includes all
30+
interfaces exposed to other processes, but does not include the in-process Go APIs.
9331

94-
If you see error like this:
32+
### Upgrades
9533

96-
```
97-
ERROR: Failed to create node: Error starting proxy app connections: Error on replay: Wrong Block.Header.AppHash. Expected 6D94BF43BB6C83F396FD8310BC2983F08C658344F9F348BB6675D1E5913230B3, got A2F322A4891092C690F5F0B80C1B9D5017A703035B63385108628EC244ECB191
98-
```
34+
In an effort to avoid accumulating technical debt prior to 1.0.0,
35+
we do not guarantee that breaking changes (ie. bumps in the MINOR version)
36+
will work with existing tendermint blockchains. In these cases you will
37+
have to start a new blockchain, or write something custom to get the old
38+
data into the new chain.
9939

100-
then your build of Minter Node and network build of Minter Node are different.
40+
However, any bump in the PATCH version should be compatible with existing histories
41+
(if not please open an [issue](https://github.com/MinterTeam/minter-go-node/issues)).

api/api.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ func RunApi(b *minter.Blockchain) {
4141
router.HandleFunc("/api/transactions", Transactions).Methods("GET")
4242
router.HandleFunc("/api/status", Status).Methods("GET")
4343
router.HandleFunc("/api/coinInfo/{symbol}", GetCoinInfo).Methods("GET")
44-
router.HandleFunc("/api/estimateCoinExchangeReturn", EstimateCoinExchangeReturn).Methods("GET")
44+
router.HandleFunc("/api/estimateCoinSell", EstimateCoinSell).Methods("GET")
45+
router.HandleFunc("/api/estimateCoinBuy", EstimateCoinBuy).Methods("GET")
4546

4647
c := cors.New(cors.Options{
4748
AllowedOrigins: []string{"*"},

api/block.go

Lines changed: 31 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -24,23 +24,26 @@ type BlockResponse struct {
2424
}
2525

2626
type BlockTransactionResponse struct {
27-
Hash string `json:"hash"`
28-
From string `json:"from"`
29-
Nonce uint64 `json:"nonce"`
30-
GasPrice *big.Int `json:"gasPrice"`
31-
Type byte `json:"type"`
32-
Data transaction.Data `json:"data"`
33-
Payload []byte `json:"payload"`
34-
ServiceData []byte `json:"serviceData"`
35-
Gas int64 `json:"gas"`
27+
Hash string `json:"hash"`
28+
RawTx string `json:"raw_tx"`
29+
From string `json:"from"`
30+
Nonce uint64 `json:"nonce"`
31+
GasPrice *big.Int `json:"gas_price"`
32+
Type byte `json:"type"`
33+
Data transaction.Data `json:"data"`
34+
Payload []byte `json:"payload"`
35+
ServiceData []byte `json:"service_data"`
36+
Gas int64 `json:"gas"`
37+
TxResult ResponseDeliverTx `json:"tx_result"`
3638
}
3739

3840
func Block(w http.ResponseWriter, r *http.Request) {
3941

4042
vars := mux.Vars(r)
4143
height, _ := strconv.ParseInt(vars["height"], 10, 64)
4244

43-
result, err := client.Block(&height)
45+
block, err := client.Block(&height)
46+
blockResults, err := client.BlockResults(&height)
4447

4548
w.Header().Set("Content-Type", "application/json; charset=UTF-8")
4649

@@ -55,14 +58,15 @@ func Block(w http.ResponseWriter, r *http.Request) {
5558

5659
w.WriteHeader(http.StatusOK)
5760

58-
txs := make([]BlockTransactionResponse, len(result.Block.Data.Txs))
61+
txs := make([]BlockTransactionResponse, len(block.Block.Data.Txs))
5962

60-
for i, rawTx := range result.Block.Data.Txs {
63+
for i, rawTx := range block.Block.Data.Txs {
6164
tx, _ := transaction.DecodeFromBytes(rawTx)
6265
sender, _ := tx.Sender()
6366

6467
txs[i] = BlockTransactionResponse{
6568
Hash: fmt.Sprintf("Mt%x", types.Tx(rawTx).Hash()),
69+
RawTx: fmt.Sprintf("%x", rawTx),
6670
From: sender.String(),
6771
Nonce: tx.Nonce,
6872
GasPrice: tx.GasPrice,
@@ -71,16 +75,25 @@ func Block(w http.ResponseWriter, r *http.Request) {
7175
Payload: tx.Payload,
7276
ServiceData: tx.ServiceData,
7377
Gas: tx.Gas(),
78+
TxResult: ResponseDeliverTx{
79+
Code: blockResults.Results.DeliverTx[i].Code,
80+
Data: blockResults.Results.DeliverTx[i].Data,
81+
Log: blockResults.Results.DeliverTx[i].Log,
82+
Info: blockResults.Results.DeliverTx[i].Info,
83+
GasWanted: blockResults.Results.DeliverTx[i].GasWanted,
84+
GasUsed: blockResults.Results.DeliverTx[i].GasUsed,
85+
Tags: blockResults.Results.DeliverTx[i].Tags,
86+
},
7487
}
7588
}
7689

7790
response := BlockResponse{
78-
Hash: result.Block.Hash(),
79-
Height: result.Block.Height,
80-
Time: result.Block.Time,
81-
NumTxs: result.Block.NumTxs,
82-
TotalTxs: result.Block.TotalTxs,
83-
Precommits: result.Block.LastCommit.Precommits,
91+
Hash: block.Block.Hash(),
92+
Height: block.Block.Height,
93+
Time: block.Block.Time,
94+
NumTxs: block.Block.NumTxs,
95+
TotalTxs: block.Block.TotalTxs,
96+
Precommits: block.Block.LastCommit.Precommits,
8497
Transactions: txs,
8598
}
8699

0 commit comments

Comments
 (0)