-
Notifications
You must be signed in to change notification settings - Fork 1
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
Internal Audit #1
base: empty
Are you sure you want to change the base?
Conversation
- price push retries - state initialisation - round details queries - different job type requests - handling of prices/results from cl node - added docs
…changes in the smart contract
Added changes after viewing all comments
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.
Final review.
docs/DOCUMENTATION.md
Outdated
@@ -89,8 +91,8 @@ Smart Contract - https://github.com/Agoric/agoric-sdk/tree/8720d22ddf25a005aee25 | |||
|
|||
The middleware is needed to: | |||
1. Create CL jobs. CL jobs are created every minute. A cron job is not used in order to be able to pass in particular inputs to the job run so that the progress of the request can be stored and monitored. | |||
2. Get results back from the CL node. | |||
3. Query smart contract for new rounds. | |||
2. Get price responses back from the CL node after Job requests are made from the middleware. |
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.
2. Get price responses back from the CL node after Job requests are made from the middleware. | |
2. Get price responses back from the CL node after job requests are made from the middleware. |
What it does: | ||
- Checks whether the following criteria is satisfied: | ||
- SEND_CHECK_INTERVAL seconds passed from the last price push update to ensure that multiple price updates are not pushed simultaneously | ||
- If it is a new round and we the oracle has not started the current on-chain round or if it is not a new round but the oracle has not submitted to the current round on-chain |
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.
- If it is a new round and we the oracle has not started the current on-chain round or if it is not a new round but the oracle has not submitted to the current round on-chain | |
- If it is a new round and the oracle has not started the current on-chain round, or if it is not a new round but the oracle has not submitted to the current round on-chain |
<div id='postadapter'></div> | ||
|
||
a. <u>/adapter</u>: This is the endpoint which is used to accept job results from CL job requests. This endpoint does the following: | ||
- Read the result, request ID, request Type and job name from the received body |
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.
- Read the result, request ID, request Type and job name from the received body | |
- Read the result, request ID, request type and job name from the received body |
| SUBMIT_RETRIES | The number of retries to try when submitting a price<br>on-chain and it fails | 3 | | ||
| BLOCK_INTERVAL | The block time of the chain in seconds. This is used<br>to query the price and round at every interval. | 6 | | ||
| SEND_CHECK_INTERVAL | The interval in seconds which is waited between each send. | 45 | | ||
| AGORIC_RPC | The Agoric's node RPC endpoint | http://0.0.0.0:26657 | |
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.
| AGORIC_RPC | The Agoric's node RPC endpoint | http://0.0.0.0:26657 | | |
| AGORIC_RPC | The Agoric node's RPC endpoint | http://0.0.0.0:26657 | |
…lue and enhanced comments
Added changes from final round of reviews
Switched to template strings
This PR is meant to be a place where we can leave comments and suggestions