Skip to content

Commit 49d9452

Browse files
committed
dependency bump: tendermint, k8s
* app/market: use block creator address in header to determine facilitator. * cmd/akashd: rename context -> session fixes #197
1 parent 233b8bc commit 49d9452

File tree

121 files changed

+1094
-1071
lines changed

Some content is hidden

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

121 files changed

+1094
-1071
lines changed

_build/Dockerfile.akashd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ FROM busybox:glibc
22

33
COPY ./akashd .
44

5-
EXPOSE 46656 46657 46658
5+
EXPOSE 26656 26657 26658

_docs/testnet/client-usage.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ In the example above:
274274

275275
| Short | Verbose | Argument | Required | Description |
276276
|:--|:--|:--|:--|:--|
277-
| -t | --type | (ed25519\|secp256k1\|ledger) | N | Type of key (default "ed25519"). |
277+
| -t | --type | (secp256k1\|ed25519\|ledger) | N | Type of key (default "ed25519"). |
278278

279279
#### `List`
280280
List all your local keys.
@@ -855,4 +855,4 @@ None
855855

856856
**Flags**
857857

858-
None
858+
None

_docs/usage.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ make
5454
example:
5555

5656
```sh
57-
./akash init --node=tcp://localhost:46657 --genesis=data/node/genesis.json
57+
./akash init --node=tcp://localhost:26657 --genesis=data/node/genesis.json
5858
```
5959

6060
## Start node
@@ -211,7 +211,7 @@ For the `[p2p] seeds` field add each validators `[p2p]laddr` separated by comma
211211

212212
Example:
213213
```
214-
"0.0.0.0:46656,0.0.0.0:46666,0.0.0.0:46676,0.0.0.0:46686"
214+
"0.0.0.0:26656,0.0.0.0:26666,0.0.0.0:26676,0.0.0.0:26686"
215215
```
216216

217217
## Start nodes

_integration/cmp/base.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,6 @@ func akash_(root vars.Ref, name string, args ...string) gx.Cmd {
2828

2929
cmd.WithMeta(g.
3030
Require("akash-path", root.Name()).
31-
Default("akash-node", "http://localhost:46657"))
31+
Default("akash-node", "http://localhost:26657"))
3232
return cmd
3333
}

_run/common.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ AKASH_ROOT=../..
33
DATA_ROOT=data
44
AKASH_DIR=$DATA_ROOT/client
55
AKASHD_DIR=$DATA_ROOT/node
6-
DEFAULT_AKASH_NODE="http://localhost:46657"
6+
DEFAULT_AKASH_NODE="http://localhost:26657"
77

88
_akash() {
99
AKASH_NODE="${AKASH_NODE:-$DEFAULT_AKASH_NODE}" \

_run/multi/akash-node/values.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@ ingress:
88

99
akashd:
1010
ports:
11-
p2p: 46656
12-
rpc: 46657
11+
p2p: 26656
12+
rpc: 26657

app/account/app.go

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ import (
1111
appstate "github.com/ovrclk/akash/state"
1212
"github.com/ovrclk/akash/types"
1313
"github.com/ovrclk/akash/types/code"
14-
tmtypes "github.com/tendermint/abci/types"
15-
"github.com/tendermint/tmlibs/log"
14+
abci_types "github.com/tendermint/tendermint/abci/types"
15+
"github.com/tendermint/tendermint/libs/log"
1616
)
1717

1818
const (
@@ -27,51 +27,51 @@ func NewApp(logger log.Logger) (apptypes.Application, error) {
2727
return &app{apptypes.NewBaseApp(Name, logger)}, nil
2828
}
2929

30-
func (a *app) AcceptQuery(req tmtypes.RequestQuery) bool {
30+
func (a *app) AcceptQuery(req abci_types.RequestQuery) bool {
3131
return strings.HasPrefix(req.GetPath(), appstate.AccountPath)
3232
}
3333

34-
func (a *app) Query(state appstate.State, req tmtypes.RequestQuery) tmtypes.ResponseQuery {
34+
func (a *app) Query(state appstate.State, req abci_types.RequestQuery) abci_types.ResponseQuery {
3535

3636
if !a.AcceptQuery(req) {
37-
return tmtypes.ResponseQuery{
37+
return abci_types.ResponseQuery{
3838
Code: code.UNKNOWN_QUERY,
3939
Log: "invalid key",
4040
}
4141
}
4242
id := strings.TrimPrefix(req.Path, appstate.AccountPath)
4343
key, err := keys.ParseAccountPath(id)
4444
if err != nil {
45-
return tmtypes.ResponseQuery{
45+
return abci_types.ResponseQuery{
4646
Code: code.ERROR,
4747
Log: err.Error(),
4848
}
4949
}
5050

5151
acct, err := state.Account().Get(key.ID())
5252
if err != nil {
53-
return tmtypes.ResponseQuery{
53+
return abci_types.ResponseQuery{
5454
Code: code.ERROR,
5555
Log: err.Error(),
5656
}
5757
}
5858

5959
if acct == nil {
60-
return tmtypes.ResponseQuery{
60+
return abci_types.ResponseQuery{
6161
Code: code.NOT_FOUND,
6262
Log: fmt.Sprintf("account %x not found", key),
6363
}
6464
}
6565

6666
bytes, err := proto.Marshal(acct)
6767
if err != nil {
68-
return tmtypes.ResponseQuery{
68+
return abci_types.ResponseQuery{
6969
Code: code.ERROR,
7070
Log: err.Error(),
7171
}
7272
}
7373

74-
return tmtypes.ResponseQuery{
74+
return abci_types.ResponseQuery{
7575
Value: bytes,
7676
Height: state.Version(),
7777
}
@@ -85,95 +85,95 @@ func (a *app) AcceptTx(ctx apptypes.Context, tx interface{}) bool {
8585
return false
8686
}
8787

88-
func (a *app) CheckTx(state appstate.State, ctx apptypes.Context, tx interface{}) tmtypes.ResponseCheckTx {
88+
func (a *app) CheckTx(state appstate.State, ctx apptypes.Context, tx interface{}) abci_types.ResponseCheckTx {
8989
switch tx := tx.(type) {
9090
case *types.TxPayload_TxSend:
9191
return a.doCheckTx(state, ctx, tx.TxSend)
9292
}
93-
return tmtypes.ResponseCheckTx{
93+
return abci_types.ResponseCheckTx{
9494
Code: code.UNKNOWN_TRANSACTION,
9595
Log: "unknown transaction",
9696
}
9797
}
9898

99-
func (a *app) DeliverTx(state appstate.State, ctx apptypes.Context, tx interface{}) tmtypes.ResponseDeliverTx {
99+
func (a *app) DeliverTx(state appstate.State, ctx apptypes.Context, tx interface{}) abci_types.ResponseDeliverTx {
100100
switch tx := tx.(type) {
101101
case *types.TxPayload_TxSend:
102102
return a.doDeliverTx(state, ctx, tx.TxSend)
103103
}
104-
return tmtypes.ResponseDeliverTx{
104+
return abci_types.ResponseDeliverTx{
105105
Code: code.UNKNOWN_TRANSACTION,
106106
Log: "unknown transaction",
107107
}
108108
}
109109

110-
func (a *app) doCheckTx(state appstate.State, ctx apptypes.Context, tx *types.TxSend) tmtypes.ResponseCheckTx {
110+
func (a *app) doCheckTx(state appstate.State, ctx apptypes.Context, tx *types.TxSend) abci_types.ResponseCheckTx {
111111

112112
if !bytes.Equal(ctx.Signer().Address(), tx.From) {
113-
return tmtypes.ResponseCheckTx{
113+
return abci_types.ResponseCheckTx{
114114
Code: code.INVALID_TRANSACTION,
115115
Log: "Not signed by sending address",
116116
}
117117
}
118118

119119
if bytes.Equal(tx.From, tx.To) {
120-
return tmtypes.ResponseCheckTx{
120+
return abci_types.ResponseCheckTx{
121121
Code: code.INVALID_TRANSACTION,
122122
Log: "source and destination can't be the same address",
123123
}
124124
}
125125

126126
acct, err := state.Account().Get(tx.From)
127127
if err != nil {
128-
return tmtypes.ResponseCheckTx{
128+
return abci_types.ResponseCheckTx{
129129
Code: code.INVALID_TRANSACTION,
130130
Log: err.Error(),
131131
}
132132
}
133133
if acct == nil {
134-
return tmtypes.ResponseCheckTx{
134+
return abci_types.ResponseCheckTx{
135135
Code: code.INVALID_TRANSACTION,
136136
Log: "unknown source account",
137137
}
138138
}
139139

140140
if acct.Balance < tx.Amount {
141-
return tmtypes.ResponseCheckTx{
141+
return abci_types.ResponseCheckTx{
142142
Code: code.INVALID_TRANSACTION,
143143
Log: "insufficient funds",
144144
}
145145
}
146146

147-
return tmtypes.ResponseCheckTx{}
147+
return abci_types.ResponseCheckTx{}
148148
}
149149

150-
func (a *app) doDeliverTx(state appstate.State, ctx apptypes.Context, tx *types.TxSend) tmtypes.ResponseDeliverTx {
150+
func (a *app) doDeliverTx(state appstate.State, ctx apptypes.Context, tx *types.TxSend) abci_types.ResponseDeliverTx {
151151

152152
cresp := a.doCheckTx(state, ctx, tx)
153153
if !cresp.IsOK() {
154-
return tmtypes.ResponseDeliverTx{
154+
return abci_types.ResponseDeliverTx{
155155
Code: cresp.Code,
156156
Log: cresp.Log,
157157
}
158158
}
159159

160160
acct, err := state.Account().Get(tx.From)
161161
if err != nil {
162-
return tmtypes.ResponseDeliverTx{
162+
return abci_types.ResponseDeliverTx{
163163
Code: code.INVALID_TRANSACTION,
164164
Log: err.Error(),
165165
}
166166
}
167167
if acct == nil {
168-
return tmtypes.ResponseDeliverTx{
168+
return abci_types.ResponseDeliverTx{
169169
Code: code.INVALID_TRANSACTION,
170170
Log: "unknown source account",
171171
}
172172
}
173173

174174
toacct, err := state.Account().Get(tx.To)
175175
if err != nil {
176-
return tmtypes.ResponseDeliverTx{
176+
return abci_types.ResponseDeliverTx{
177177
Code: code.INVALID_TRANSACTION,
178178
Log: err.Error(),
179179
}
@@ -189,20 +189,20 @@ func (a *app) doDeliverTx(state appstate.State, ctx apptypes.Context, tx *types.
189189
toacct.Balance += tx.Amount
190190

191191
if err := state.Account().Save(acct); err != nil {
192-
return tmtypes.ResponseDeliverTx{
192+
return abci_types.ResponseDeliverTx{
193193
Code: code.INVALID_TRANSACTION,
194194
Log: err.Error(),
195195
}
196196
}
197197

198198
if err := state.Account().Save(toacct); err != nil {
199-
return tmtypes.ResponseDeliverTx{
199+
return abci_types.ResponseDeliverTx{
200200
Code: code.INVALID_TRANSACTION,
201201
Log: err.Error(),
202202
}
203203
}
204204

205-
return tmtypes.ResponseDeliverTx{
205+
return abci_types.ResponseDeliverTx{
206206
Tags: apptypes.NewTags(a.Name(), apptypes.TxTypeSend),
207207
}
208208
}

app/account/app_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
"github.com/ovrclk/akash/types"
1111
"github.com/stretchr/testify/assert"
1212
"github.com/stretchr/testify/require"
13-
tmtypes "github.com/tendermint/abci/types"
13+
tmtypes "github.com/tendermint/tendermint/abci/types"
1414
)
1515

1616
func TestAccountApp(t *testing.T) {

0 commit comments

Comments
 (0)