forked from cosmos/cosmos-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request cosmos#44 from tendermint/develop
v0.2.0
- Loading branch information
Showing
56 changed files
with
1,349 additions
and
505 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# Changelog | ||
|
||
## 0.2.0 (March 6, 2017) | ||
|
||
BREAKING CHANGES: | ||
|
||
- Update to ABCI v0.4.0 and Tendermint v0.9.0 | ||
- Coins are specified on the CLI as `Xcoin`, eg. `5gold` | ||
- `Cost` is now `Fee` | ||
|
||
FEATURES: | ||
|
||
- CLI for sending transactions and querying the state, | ||
designed to be easily extensible as plugins are implemented | ||
- Run Basecoin in-process with Tendermint | ||
- Add `/account` path in Query | ||
- IBC plugin for InterBlockchain Communication | ||
- Demo script of IBC between two chains | ||
|
||
IMPROVEMENTS: | ||
|
||
- Use new Tendermint `/commit` endpoint for crafting IBC transactions | ||
- More unit tests | ||
- Use go-crypto S structs and go-data for more standard JSON | ||
- Demo uses fewer sleeps | ||
|
||
BUG FIXES: | ||
|
||
- Various little fixes in coin arithmetic | ||
- More commit validation in IBC | ||
- Return results from transactions | ||
|
||
## PreHistory | ||
|
||
##### January 14-18, 2017 | ||
|
||
- Update to Tendermint v0.8.0 | ||
- Cleanup a bit and release blog post | ||
|
||
##### September 22, 2016 | ||
|
||
- Basecoin compiles again | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
package app | ||
|
||
import ( | ||
"encoding/hex" | ||
"testing" | ||
|
||
"github.com/stretchr/testify/assert" | ||
"github.com/stretchr/testify/require" | ||
"github.com/tendermint/go-crypto" | ||
eyescli "github.com/tendermint/merkleeyes/client" | ||
) | ||
|
||
func TestLoadGenesis(t *testing.T) { | ||
assert, require := assert.New(t), require.New(t) | ||
|
||
eyesCli := eyescli.NewLocalClient("", 0) | ||
app := NewBasecoin(eyesCli) | ||
err := app.LoadGenesis("./testdata/genesis.json") | ||
require.Nil(err, "%+v", err) | ||
|
||
// check the chain id | ||
assert.Equal("foo_bar_chain", app.GetState().GetChainID()) | ||
|
||
// and check the account info - previously calculated values | ||
addr, _ := hex.DecodeString("eb98e0688217cfdeb70eddf4b33cdcc37fc53197") | ||
pkbyte, _ := hex.DecodeString("6880db93598e283a67c4d88fc67a8858aa2de70f713fe94a5109e29c137100c2") | ||
|
||
acct := app.GetState().GetAccount(addr) | ||
require.NotNil(acct) | ||
|
||
// make sure balance is proper | ||
assert.Equal(2, len(acct.Balance)) | ||
assert.EqualValues(12345, acct.Balance[0].Amount) | ||
assert.EqualValues("blank", acct.Balance[0].Denom) | ||
|
||
// and public key is parsed properly | ||
apk := acct.PubKey.PubKey | ||
require.NotNil(apk) | ||
epk, ok := apk.(crypto.PubKeyEd25519) | ||
if assert.True(ok) { | ||
assert.EqualValues(pkbyte, epk[:]) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package app | ||
|
||
import ( | ||
"github.com/tendermint/go-logger" | ||
) | ||
|
||
var log = logger.New("module", "app") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
[ | ||
"base/chainID", "foo_bar_chain", | ||
"base/account", { | ||
"pub_key": { | ||
"type": "ed25519", | ||
"data": "6880db93598e283a67c4d88fc67a8858aa2de70f713fe94a5109e29c137100c2" | ||
}, | ||
"coins": [ | ||
{ | ||
"denom": "blank", | ||
"amount": 12345 | ||
}, | ||
{ | ||
"denom": "ETH", | ||
"amount": 654321 | ||
} | ||
] | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.