Skip to content

Commit

Permalink
Merge pull request #9481 from consensus-shipyard/adlrocha/cns-iface-m…
Browse files Browse the repository at this point in the history
…aster

IPC: Abstract common consensus functions and consensus interface
  • Loading branch information
magik6k authored Jan 11, 2023
2 parents 8519bc2 + 25edb23 commit 9a46682
Show file tree
Hide file tree
Showing 33 changed files with 723 additions and 597 deletions.
16 changes: 8 additions & 8 deletions api/api_full.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ type FullNode interface {

// ChainGetPath returns a set of revert/apply operations needed to get from
// one tipset to another, for example:
//```
// ```
// to
// ^
// from tAA
Expand All @@ -160,7 +160,7 @@ type FullNode interface {
// ^---*--^
// ^
// tRR
//```
// ```
// Would return `[revert(tBA), apply(tAB), apply(tAA)]`
ChainGetPath(ctx context.Context, from types.TipSetKey, to types.TipSetKey) ([]*HeadChange, error) //perm:read

Expand Down Expand Up @@ -388,12 +388,12 @@ type FullNode interface {
ClientCancelRetrievalDeal(ctx context.Context, dealid retrievalmarket.DealID) error //perm:write

// ClientUnimport removes references to the specified file from filestore
//ClientUnimport(path string)
// ClientUnimport(path string)

// ClientListImports lists imported files and their root CIDs
ClientListImports(ctx context.Context) ([]Import, error) //perm:write

//ClientListAsks() []Ask
// ClientListAsks() []Ask

// MethodGroup: State
// The State methods are used to query, inspect, and interact with chain state.
Expand Down Expand Up @@ -640,14 +640,14 @@ type FullNode interface {
// It takes the following params: <multisig address>, <start epoch>, <end epoch>
MsigGetVested(context.Context, address.Address, types.TipSetKey, types.TipSetKey) (types.BigInt, error) //perm:read

//MsigGetPending returns pending transactions for the given multisig
//wallet. Once pending transactions are fully approved, they will no longer
//appear here.
// MsigGetPending returns pending transactions for the given multisig
// wallet. Once pending transactions are fully approved, they will no longer
// appear here.
MsigGetPending(context.Context, address.Address, types.TipSetKey) ([]*MsigTransaction, error) //perm:read

// MsigCreate creates a multisig wallet
// It takes the following params: <required number of senders>, <approving addresses>, <unlock duration>
//<initial balance>, <sender address of the create msg>, <gas price>
// <initial balance>, <sender address of the create msg>, <gas price>
MsigCreate(context.Context, uint64, []address.Address, abi.ChainEpoch, types.BigInt, address.Address, types.BigInt) (*MessagePrototype, error) //perm:sign

// MsigPropose proposes a multisig message
Expand Down
2 changes: 1 addition & 1 deletion api/docgen/docgen.go
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,7 @@ func ExampleValue(method string, t, parent reflect.Type) interface{} {
case reflect.Ptr:
if t.Elem().Kind() == reflect.Struct {
es := exampleStruct(method, t.Elem(), t)
//ExampleValues[t] = es
// ExampleValues[t] = es
return es
}
case reflect.Interface:
Expand Down
16 changes: 8 additions & 8 deletions api/v0api/full.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ type FullNode interface {

// ChainGetPath returns a set of revert/apply operations needed to get from
// one tipset to another, for example:
//```
// ```
// to
// ^
// from tAA
Expand All @@ -150,7 +150,7 @@ type FullNode interface {
// ^---*--^
// ^
// tRR
//```
// ```
// Would return `[revert(tBA), apply(tAB), apply(tAA)]`
ChainGetPath(ctx context.Context, from types.TipSetKey, to types.TipSetKey) ([]*api.HeadChange, error) //perm:read

Expand Down Expand Up @@ -367,12 +367,12 @@ type FullNode interface {
ClientCancelRetrievalDeal(ctx context.Context, dealid retrievalmarket.DealID) error //perm:write

// ClientUnimport removes references to the specified file from filestore
//ClientUnimport(path string)
// ClientUnimport(path string)

// ClientListImports lists imported files and their root CIDs
ClientListImports(ctx context.Context) ([]api.Import, error) //perm:write

//ClientListAsks() []Ask
// ClientListAsks() []Ask

// MethodGroup: State
// The State methods are used to query, inspect, and interact with chain state.
Expand Down Expand Up @@ -641,14 +641,14 @@ type FullNode interface {
// It takes the following params: <multisig address>, <start epoch>, <end epoch>
MsigGetVested(context.Context, address.Address, types.TipSetKey, types.TipSetKey) (types.BigInt, error) //perm:read

//MsigGetPending returns pending transactions for the given multisig
//wallet. Once pending transactions are fully approved, they will no longer
//appear here.
// MsigGetPending returns pending transactions for the given multisig
// wallet. Once pending transactions are fully approved, they will no longer
// appear here.
MsigGetPending(context.Context, address.Address, types.TipSetKey) ([]*api.MsigTransaction, error) //perm:read

// MsigCreate creates a multisig wallet
// It takes the following params: <required number of senders>, <approving addresses>, <unlock duration>
//<initial balance>, <sender address of the create msg>, <gas price>
// <initial balance>, <sender address of the create msg>, <gas price>
MsigCreate(context.Context, uint64, []address.Address, abi.ChainEpoch, types.BigInt, address.Address, types.BigInt) (cid.Cid, error) //perm:sign
// MsigPropose proposes a multisig message
// It takes the following params: <multisig address>, <recipient address>, <value to transfer>,
Expand Down
Loading

0 comments on commit 9a46682

Please sign in to comment.