diff --git a/README.md b/README.md index 5fba296cc..aa49a704f 100644 --- a/README.md +++ b/README.md @@ -46,14 +46,17 @@ Yay open source! Please see our [contributing guidelines](https://tendermint.com ### Sub-projects * [TMSP](http://github.com/tendermint/tmsp) -* [Ethermint](http://github.com/tendermint/ethermint) -* [Basecoin](http://github.com/tendermint/basecoin) * [Mintnet](http://github.com/tendermint/mintnet) * [Go-Wire](http://github.com/tendermint/go-wire) * [Go-P2P](http://github.com/tendermint/go-p2p) * [Go-Merkle](http://github.com/tendermint/go-merkle) -### More +### Applications + +* [Ethermint](http://github.com/tendermint/ethermint) +* [Basecoin](http://github.com/tendermint/basecoin) + +### More * [Tendermint Blog](https://tendermint.com/blog) * [Cosmos Blog](https://cosmos.network/blog) diff --git a/rpc/core/blocks.go b/rpc/core/blocks.go index 92ed7bc7e..115ca2a9c 100644 --- a/rpc/core/blocks.go +++ b/rpc/core/blocks.go @@ -9,6 +9,7 @@ import ( //----------------------------------------------------------------------------- +// TODO: limit/permission on (max - min) func BlockchainInfo(minHeight, maxHeight int) (*ctypes.ResultBlockchainInfo, error) { if maxHeight == 0 { maxHeight = blockStore.Height() diff --git a/rpc/core/net.go b/rpc/core/net.go index f5a1098f6..9e9f027ea 100644 --- a/rpc/core/net.go +++ b/rpc/core/net.go @@ -30,7 +30,7 @@ func NetInfo() (*ctypes.ResultNetInfo, error) { //----------------------------------------------------------------------------- // Dial given list of seeds -func DialSeeds(seeds []string) (*ctypes.ResultDialSeeds, error) { +func UnsafeDialSeeds(seeds []string) (*ctypes.ResultDialSeeds, error) { // starts go routines to dial each seed after random delays p2pSwitch.DialSeeds(seeds) return &ctypes.ResultDialSeeds{}, nil diff --git a/rpc/core/routes.go b/rpc/core/routes.go index 97c013ab7..8a9728aa9 100644 --- a/rpc/core/routes.go +++ b/rpc/core/routes.go @@ -6,30 +6,38 @@ import ( ctypes "github.com/tendermint/tendermint/rpc/core/types" ) +// TODO: better system than "unsafe" prefix var Routes = map[string]*rpc.RPCFunc{ // subscribe/unsubscribe are reserved for websocket events. "subscribe": rpc.NewWSRPCFunc(SubscribeResult, "event"), "unsubscribe": rpc.NewWSRPCFunc(UnsubscribeResult, "event"), + // info API "status": rpc.NewRPCFunc(StatusResult, ""), "net_info": rpc.NewRPCFunc(NetInfoResult, ""), - "dial_seeds": rpc.NewRPCFunc(DialSeedsResult, "seeds"), "blockchain": rpc.NewRPCFunc(BlockchainInfoResult, "minHeight,maxHeight"), "genesis": rpc.NewRPCFunc(GenesisResult, ""), "block": rpc.NewRPCFunc(BlockResult, "height"), "validators": rpc.NewRPCFunc(ValidatorsResult, ""), "dump_consensus_state": rpc.NewRPCFunc(DumpConsensusStateResult, ""), - "broadcast_tx_commit": rpc.NewRPCFunc(BroadcastTxCommitResult, "tx"), - "broadcast_tx_sync": rpc.NewRPCFunc(BroadcastTxSyncResult, "tx"), - "broadcast_tx_async": rpc.NewRPCFunc(BroadcastTxAsyncResult, "tx"), "unconfirmed_txs": rpc.NewRPCFunc(UnconfirmedTxsResult, ""), "num_unconfirmed_txs": rpc.NewRPCFunc(NumUnconfirmedTxsResult, ""), + // broadcast API + "broadcast_tx_commit": rpc.NewRPCFunc(BroadcastTxCommitResult, "tx"), + "broadcast_tx_sync": rpc.NewRPCFunc(BroadcastTxSyncResult, "tx"), + "broadcast_tx_async": rpc.NewRPCFunc(BroadcastTxAsyncResult, "tx"), + + // tmsp API "tmsp_query": rpc.NewRPCFunc(TMSPQueryResult, "query"), "tmsp_info": rpc.NewRPCFunc(TMSPInfoResult, ""), - "unsafe_flush_mempool": rpc.NewRPCFunc(UnsafeFlushMempool, ""), - "unsafe_set_config": rpc.NewRPCFunc(UnsafeSetConfigResult, "type,key,value"), + // control API + "dial_seeds": rpc.NewRPCFunc(UnsafeDialSeedsResult, "seeds"), + "unsafe_flush_mempool": rpc.NewRPCFunc(UnsafeFlushMempool, ""), + "unsafe_set_config": rpc.NewRPCFunc(UnsafeSetConfigResult, "type,key,value"), + + // profiler API "unsafe_start_cpu_profiler": rpc.NewRPCFunc(UnsafeStartCPUProfilerResult, "filename"), "unsafe_stop_cpu_profiler": rpc.NewRPCFunc(UnsafeStopCPUProfilerResult, ""), "unsafe_write_heap_profile": rpc.NewRPCFunc(UnsafeWriteHeapProfileResult, "filename"), @@ -67,8 +75,8 @@ func NetInfoResult() (ctypes.TMResult, error) { } } -func DialSeedsResult(seeds []string) (ctypes.TMResult, error) { - if r, err := DialSeeds(seeds); err != nil { +func UnsafeDialSeedsResult(seeds []string) (ctypes.TMResult, error) { + if r, err := UnsafeDialSeeds(seeds); err != nil { return nil, err } else { return r, nil