Skip to content
This repository has been archived by the owner on Dec 20, 2023. It is now read-only.

Updates bundle, fund test and serialized versions of RPC calls #150

Merged
merged 4 commits into from
Apr 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions api/api_full.go
Original file line number Diff line number Diff line change
Expand Up @@ -895,6 +895,14 @@ type FullNode interface {
IPCListCheckpoints(ctx context.Context, sn sdk.SubnetID, from, to abi.ChainEpoch) ([]*gateway.BottomUpCheckpoint, error) //perm:read
IPCGetCheckpoint(ctx context.Context, sn sdk.SubnetID, epoch abi.ChainEpoch) (*gateway.BottomUpCheckpoint, error) //perm:read
IPCGetTopDownMsgs(ctx context.Context, gatewayAddr address.Address, sn sdk.SubnetID, nonce uint64) ([]*gateway.CrossMsg, error) //perm:read
// Serialized representation of IPC calls.
// This calls are serialized version of some of the IPC calls. They return directly the CBOR IPCGetCheckpointSerialized
// version of the output of the call. These are really convenient to use the same type of serialization used
// in actor's state, removing the need of then intermediate serialization introduced by the Lotus API.
IPCGetCheckpointSerialized(ctx context.Context, sn sdk.SubnetID, epoch abi.ChainEpoch) ([]byte, error) //perm:read
IPCListCheckpointsSerialized(ctx context.Context, sn sdk.SubnetID, from, to abi.ChainEpoch) ([][]byte, error) //perm:read
IPCGetCheckpointTemplateSerialized(ctx context.Context, gatewayAddr address.Address, epoch abi.ChainEpoch) ([]byte, error) //perm:read
IPCGetTopDownMsgsSerialized(ctx context.Context, gatewayAddr address.Address, sn sdk.SubnetID, nonce uint64) ([][]byte, error) //perm:read

}

Expand Down
60 changes: 60 additions & 0 deletions api/mocks/mock_full.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

52 changes: 52 additions & 0 deletions api/proxy_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified build/actors/ipc-actors.car
Binary file not shown.
Binary file modified build/genesis/spacenet.car
Binary file not shown.
Binary file modified build/openrpc/full.json.gz
Binary file not shown.
Binary file modified build/openrpc/gateway.json.gz
Binary file not shown.
Binary file modified build/openrpc/miner.json.gz
Binary file not shown.
Binary file modified build/openrpc/worker.json.gz
Binary file not shown.
109 changes: 94 additions & 15 deletions documentation/en/api-v1-unstable-methods.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,11 +116,15 @@
* [ID](#ID)
* [IPCAddSubnetActor](#IPCAddSubnetActor)
* [IPCGetCheckpoint](#IPCGetCheckpoint)
* [IPCGetCheckpointSerialized](#IPCGetCheckpointSerialized)
* [IPCGetCheckpointTemplate](#IPCGetCheckpointTemplate)
* [IPCGetCheckpointTemplateSerialized](#IPCGetCheckpointTemplateSerialized)
* [IPCGetPrevCheckpointForChild](#IPCGetPrevCheckpointForChild)
* [IPCGetTopDownMsgs](#IPCGetTopDownMsgs)
* [IPCGetTopDownMsgsSerialized](#IPCGetTopDownMsgsSerialized)
* [IPCHasVotedBottomUpCheckpoint](#IPCHasVotedBottomUpCheckpoint)
* [IPCListCheckpoints](#IPCListCheckpoints)
* [IPCListCheckpointsSerialized](#IPCListCheckpointsSerialized)
* [IPCListChildSubnets](#IPCListChildSubnets)
* [IPCReadGatewayState](#IPCReadGatewayState)
* [IPCReadSubnetActorState](#IPCReadSubnetActorState)
Expand Down Expand Up @@ -3396,9 +3400,7 @@ Response:
"RawAddress": "f01234"
},
"Method": 1,
"Params": {
"Bytes": "Ynl0ZSBhcnJheQ=="
},
"Params": "Ynl0ZSBhcnJheQ==",
"Value": "0",
"Nonce": 42
},
Expand All @@ -3412,6 +3414,28 @@ Response:
}
```

### IPCGetCheckpointSerialized
Serialized representation of IPC calls.
This calls are serialized version of some of the IPC calls. They return directly the CBOR IPCGetCheckpointSerialized
version of the output of the call. These are really convenient to use the same type of serialization used
in actor's state, removing the need of then intermediate serialization introduced by the Lotus API.


Perms: read

Inputs:
```json
[
{
"Parent": "string value",
"Actor": "f01234"
},
10101
]
```

Response: `"Ynl0ZSBhcnJheQ=="`

### IPCGetCheckpointTemplate


Expand Down Expand Up @@ -3470,9 +3494,7 @@ Response:
"RawAddress": "f01234"
},
"Method": 1,
"Params": {
"Bytes": "Ynl0ZSBhcnJheQ=="
},
"Params": "Ynl0ZSBhcnJheQ==",
"Value": "0",
"Nonce": 42
},
Expand All @@ -3486,6 +3508,21 @@ Response:
}
```

### IPCGetCheckpointTemplateSerialized


Perms: read

Inputs:
```json
[
"f01234",
10101
]
```

Response: `"Ynl0ZSBhcnJheQ=="`

### IPCGetPrevCheckpointForChild


Expand Down Expand Up @@ -3546,9 +3583,7 @@ Response:
"RawAddress": "f01234"
},
"Method": 1,
"Params": {
"Bytes": "Ynl0ZSBhcnJheQ=="
},
"Params": "Ynl0ZSBhcnJheQ==",
"Value": "0",
"Nonce": 42
},
Expand All @@ -3557,6 +3592,30 @@ Response:
]
```

### IPCGetTopDownMsgsSerialized


Perms: read

Inputs:
```json
[
"f01234",
{
"Parent": "string value",
"Actor": "f01234"
},
42
]
```

Response:
```json
[
"Ynl0ZSBhcnJheQ=="
]
```

### IPCHasVotedBottomUpCheckpoint


Expand Down Expand Up @@ -3639,9 +3698,7 @@ Response:
"RawAddress": "f01234"
},
"Method": 1,
"Params": {
"Bytes": "Ynl0ZSBhcnJheQ=="
},
"Params": "Ynl0ZSBhcnJheQ==",
"Value": "0",
"Nonce": 42
},
Expand All @@ -3656,6 +3713,30 @@ Response:
]
```

### IPCListCheckpointsSerialized


Perms: read

Inputs:
```json
[
{
"Parent": "string value",
"Actor": "f01234"
},
10101,
10101
]
```

Response:
```json
[
"Ynl0ZSBhcnJheQ=="
]
```

### IPCListChildSubnets


Expand Down Expand Up @@ -3726,9 +3807,7 @@ Response:
"RawAddress": "f01234"
},
"Method": 1,
"Params": {
"Bytes": "Ynl0ZSBhcnJheQ=="
},
"Params": "Ynl0ZSBhcnJheQ==",
"Value": "0",
"Nonce": 42
},
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ require (
github.com/alecthomas/jsonschema v0.0.0-20200530073317-71f438968921
github.com/buger/goterm v1.0.3
github.com/chzyer/readline v1.5.0
github.com/consensus-shipyard/go-ipc-types v0.1.5-0.20230411153557-28414fbc9a28
github.com/consensus-shipyard/go-ipc-types v0.1.5-0.20230412100539-1abab3acf5b1
github.com/containerd/cgroups v1.0.4
github.com/coreos/go-systemd/v22 v22.5.0
github.com/detailyang/go-fallocate v0.0.0-20180908115635-432fa640bd2e
Expand Down
Loading