You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Looks like we can do a client.roundAt(Data.now()) and send the round number through the stream. Kinesis consumer can be anything, including a consumer that will send events with receipts. In this scenario, stream consumer would rely on the randomness created with client.get(roundNumber) and sign the UCAN invocation as a proof.
Drand can be used with multiple chains. For now we will be using public one. However, we will be putting it in the stream under object drand so that in the future we can easily use other chains and add their data in the message. When the details are non existent, we can simply use the default one in the future.
The text was updated successfully, but these errors were encountered:
Adds kinesis ucan log stream to ucanto service. Once a UCAN invocation
is handled by the service, it is sent to Amazon Kinesis data streams for
post processing (JSON with invocation CID, invocation bytes, and decoded
invocation).
Kinesis log stream has its own stack named `UcanStreamStack` which will
include resources needed for post processing of ucan stream ops.
`ApiStack` depends on `UcanStreamStack` given it will use its stream, as
well as its data further down the line to get content like user facing
stats
Per https://www.notion.so/UCAN-LOG-0f3870fc4b404f5cbf646bf16b463365
Implementation details:
- Invocation view content
- `{ carCid: string, value: { att: UCAN.Capabilities, aud:
'did:${string}:${string}', iss: 'did:${string}:${string}' } }`
- having att, audience and issuer should be enough for all the
operations we intend to perform. Skipped `prf`, `exp`, `nbf`, `fct`,
`nnc`, `v`, and `signature`.
- see format in comment below
Other notes:
- SST Kinesis guide:
https://sst.dev/examples/how-to-use-kinesis-data-streams-in-your-serverless-app.html
- we are configuring 365 days for now
https://docs.aws.amazon.com/cdk/api/v1/docs/aws-kinesis-readme.html#streams
- aws related deps updated to use same everywhere
- we are currently doing redundant encodings/decodings that could be
avoided if we do storacha/ucanto#169
- Follow up PRs will be created with consumers:
- data aggregation lambda for user facing stats
- dynamoDB
- ...
- NOTE: they can start from before as we talked
https://docs.aws.amazon.com/cdk/api/v1/docs/@aws-cdk_aws-lambda-event-sources.KinesisEventSourceProps.html#properties
- we need to define a partition key, but we do not need to commit now to
one. Only by the time we want more shards for scaling up
Follow ups:
- #98
Co-authored-by: Alan Shaw <[email protected]>
Looks like we can do a client.roundAt(Data.now()) and send the round number through the stream. Kinesis consumer can be anything, including a consumer that will send events with receipts. In this scenario, stream consumer would rely on the randomness created with client.get(roundNumber) and sign the UCAN invocation as a proof.
Implementation
drand
so that in the future we can easily use other chains and add their data in the message. When the details are non existent, we can simply use the default one in the future.The text was updated successfully, but these errors were encountered: