Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename portal_*RecursiveFindContent to portal_*GetContent #344

Merged
merged 9 commits into from
Oct 14, 2024
14 changes: 8 additions & 6 deletions jsonrpc/src/content/results.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"schema": {
"title": "FindContentResult",
"type": "object",
"oneOf" :[
"oneOf": [
{
"title": "ContentInfo",
"type": "object",
Expand All @@ -58,7 +58,9 @@
"title": "ENRs",
"description": "List of ENR records of nodes that are closer than the recipient is to the requested content",
"type": "object",
"required": ["enrs"],
"required": [
"enrs"
],
"properties": {
"enrs": {
"type": "array",
Expand Down Expand Up @@ -164,8 +166,8 @@
}
}
},
"RecursiveFindContentResult": {
"name": "RecursiveFindContentResult",
"GetContentResult": {
"name": "GetContentResult",
"description": "Returns the hex encoded content value and utp transfer flag. If the content is not available, returns \"0x\"",
"schema": {
"type": "object",
Expand All @@ -185,8 +187,8 @@
}
}
},
"TraceRecursiveFindContentResult": {
"name": "TraceRecursiveFindContentResult",
"TraceGetContentResult": {
"name": "TraceGetContentResult",
"description": "Returns the hex encoded content value and trace data object. If the content is not available, returns \"0x\"",
"schema": {
"type": "object",
Expand Down
12 changes: 6 additions & 6 deletions jsonrpc/src/methods/beacon.json
Original file line number Diff line number Diff line change
Expand Up @@ -133,27 +133,27 @@
}
},
{
"name": "portal_beaconRecursiveFindContent",
"summary": "Look up a target content key in the network",
"name": "portal_beaconGetContent",
"summary": "Get content from the local database if it exists, otherwise look up the target content key in the network. After fetching from the network the content is validated and stored in the local database before being returned.",
"params": [
{
"$ref": "#/components/contentDescriptors/ContentKey"
}
],
"result": {
"$ref": "#/components/contentDescriptors/RecursiveFindContentResult"
"$ref": "#/components/contentDescriptors/GetContentResult"
}
},
{
"name": "portal_beaconTraceRecursiveFindContent",
"summary": "Look up a target content key in the network and get tracing data",
"name": "portal_beaconTraceGetContent",
"summary": "Look up a target content as defined in portal_beaconGetContent and get tracing data",
"params": [
{
"$ref": "#/components/contentDescriptors/ContentKey"
}
],
"result": {
"$ref": "#/components/contentDescriptors/TraceRecursiveFindContentResult"
"$ref": "#/components/contentDescriptors/TraceGetContentResult"
}
},
{
Expand Down
12 changes: 6 additions & 6 deletions jsonrpc/src/methods/history.json
Original file line number Diff line number Diff line change
Expand Up @@ -125,27 +125,27 @@
}
},
{
"name": "portal_historyRecursiveFindContent",
"summary": "Look up a target content key in the network",
"name": "portal_historyGetContent",
"summary": "Get content from the local database if it exists, otherwise look up the target content key in the network. After fetching from the network the content is validated and stored in the local database before being returned.",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"summary": "Get content from the local database if it exists, otherwise look up the target content key in the network. After fetching from the network the content is validated and stored in the local database before being returned.",
"summary": "Get content from the local database if it exists, otherwise look up the target content key in the network. After fetching from the network the content is validated and stored in the local database if storage criteria is met before being returned.",

Maybe we should be a little more specific, as we won't store it if the storage criteria aren't met.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes good point, will update.

"params": [
{
"$ref": "#/components/contentDescriptors/ContentKey"
}
],
"result": {
"$ref": "#/components/contentDescriptors/RecursiveFindContentResult"
"$ref": "#/components/contentDescriptors/GetContentResult"
}
},
{
"name": "portal_historyTraceRecursiveFindContent",
"summary": "Look up a target content key in the network and get tracing data",
"name": "portal_historyTraceGetContent",
"summary": "Look up a target content as defined in portal_historyGetContent and get tracing data",
"params": [
{
"$ref": "#/components/contentDescriptors/ContentKey"
}
],
"result": {
"$ref": "#/components/contentDescriptors/TraceRecursiveFindContentResult"
"$ref": "#/components/contentDescriptors/TraceGetContentResult"
}
},
{
Expand Down
6 changes: 3 additions & 3 deletions jsonrpc/src/methods/state.json
Original file line number Diff line number Diff line change
Expand Up @@ -125,15 +125,15 @@
}
},
{
"name": "portal_stateRecursiveFindContent",
"summary": "Look up a target content key in the network",
"name": "portal_stateGetContent",
"summary": "Get content from the local database if it exists, otherwise look up the target content key in the network. After fetching from the network the content is validated and stored in the local database before being returned.",
"params": [
{
"$ref": "#/components/contentDescriptors/ContentKey"
}
],
"result": {
"$ref": "#/components/contentDescriptors/RecursiveFindContentResult"
"$ref": "#/components/contentDescriptors/GetContentResult"
}
},
{
Expand Down