-
Notifications
You must be signed in to change notification settings - Fork 88
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_*Gossip JSON-RPC endpoint to portal_*PutContent #346
Merged
KolbyML
merged 5 commits into
ethereum:master
from
bhartnett:jsonrpc-rename-portal_Gossip
Dec 14, 2024
Merged
Changes from 4 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
76bb8f5
Rename portal_*Gossip to portal_*PutContent and update method descrip…
bhartnett f7befbc
Update validation wording.
bhartnett c4aae4f
Update validation wording.
bhartnett 64785fa
Remove references to validation from RPC method descriptions.
bhartnett a12e4fc
PR comment updates.
bhartnett File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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 | ||||
---|---|---|---|---|---|---|
|
@@ -134,7 +134,7 @@ | |||||
}, | ||||||
{ | ||||||
"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 if storage criteria is met 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 stored in the local database if storage criteria is met before being returned.", | ||||||
"params": [ | ||||||
{ | ||||||
"$ref": "#/components/contentDescriptors/ContentKey" | ||||||
|
@@ -143,9 +143,11 @@ | |||||
"result": { | ||||||
"$ref": "#/components/contentDescriptors/GetContentResult" | ||||||
}, | ||||||
"errors":[{ | ||||||
"$ref": "#/components/errors/ContentNotFoundError" | ||||||
}] | ||||||
"errors": [ | ||||||
{ | ||||||
"$ref": "#/components/errors/ContentNotFoundError" | ||||||
} | ||||||
] | ||||||
}, | ||||||
{ | ||||||
"name": "portal_beaconTraceGetContent", | ||||||
|
@@ -158,9 +160,11 @@ | |||||
"result": { | ||||||
"$ref": "#/components/contentDescriptors/TraceGetContentResult" | ||||||
}, | ||||||
"errors":[{ | ||||||
"$ref": "#/components/errors/ContentNotFoundErrorWithTrace" | ||||||
}] | ||||||
"errors": [ | ||||||
{ | ||||||
"$ref": "#/components/errors/ContentNotFoundErrorWithTrace" | ||||||
} | ||||||
] | ||||||
}, | ||||||
{ | ||||||
"name": "portal_beaconStore", | ||||||
|
@@ -188,13 +192,15 @@ | |||||
"result": { | ||||||
"$ref": "#/components/contentDescriptors/LocalContentResult" | ||||||
}, | ||||||
"errors":[{ | ||||||
"$ref": "#/components/errors/ContentNotFoundError" | ||||||
}] | ||||||
"errors": [ | ||||||
{ | ||||||
"$ref": "#/components/errors/ContentNotFoundError" | ||||||
} | ||||||
] | ||||||
}, | ||||||
{ | ||||||
"name": "portal_beaconGossip", | ||||||
"summary": "Send the provided content item to interested peers. Clients may choose to send to some or all peers.", | ||||||
"name": "portal_beaconPutContent", | ||||||
"summary": "Store the content in the local database if storage criteria is met, then send the content to interested peers. Clients may choose to send to some or all peers.", | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
"params": [ | ||||||
{ | ||||||
"$ref": "#/components/contentDescriptors/ContentKey" | ||||||
|
@@ -204,7 +210,7 @@ | |||||
} | ||||||
], | ||||||
"result": { | ||||||
"$ref": "#/components/contentDescriptors/GossipResult" | ||||||
"$ref": "#/components/contentDescriptors/PutContentResult" | ||||||
} | ||||||
} | ||||||
] |
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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like this should also return information about whether the content was added to the database, and possibly if the data was already in the database.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Returning a boolean to indicate if the data was written to the database makes sense. This can be implemented in the same way as portal_*Store currently does. Indicating if the data was already in the database would require a second database lookup to check if the key/data exists before overwriting so I'd say we shouldn't do this for performance reasons.