pub enum OracleResponse {
Service(Vec<u8>),
Http(Response),
Blob(BlobId),
Assert,
Round(Option<u32>),
Event(EventId, Vec<u8>),
EventExists(EventId),
Checkpoint {
execution_state_blobs: Vec<CryptoHash>,
used_blobs: Vec<BlobId>,
outbox_block_hashes: Vec<CryptoHash>,
inbox_cursors: Vec<(ChainId, Cursor)>,
},
}Expand description
A record of a single oracle response.
Variants§
Service(Vec<u8>)
The response from a service query.
Http(Response)
The response from an HTTP request.
Blob(BlobId)
A successful read or write of a blob.
Assert
An assertion oracle that passed.
Round(Option<u32>)
The block’s validation round.
Event(EventId, Vec<u8>)
An event was read.
EventExists(EventId)
An event exists.
Checkpoint
A checkpoint of the chain’s execution state was published. The execution-state
dump is chunked into one or more BlobType::CheckpointExecutionState blobs whose
content hashes are listed here in restore order; a bootstrapping node concatenates
the bytes and feeds them to ExecutionStateView::restore_from_content.
Fields
execution_state_blobs: Vec<CryptoHash>Content hashes of the execution-state-dump blobs, in restore order.
used_blobs: Vec<BlobId>All blobs the chain references in its used_blobs set at the time of the
checkpoint. A bootstrapping node must have each of these in shared blob
storage before applying the checkpoint, otherwise subsequent operations on
the chain could try to read blob content the node doesn’t actually have.
outbox_block_hashes: Vec<CryptoHash>Hashes of every block on this chain that the chain’s outboxes still reference at the time of the checkpoint — i.e. the heights with cross-chain messages that recipients haven’t acknowledged yet. The current-epoch certificate over the checkpoint block transitively certifies these older blocks: a node that later receives one of these block’s bytes can verify the bytes hash to a hash in this set, without trusting the (possibly revoked) validator signatures on the older block’s own certificate.
inbox_cursors: Vec<(ChainId, Cursor)>For each chain whose messages we’ve consumed, the next_cursor_to_remove
of the corresponding inbox. A bootstrapping node uses these to seed each
inbox’s restored_cursor, so subsequent sender re-pushes below that cursor
are silently dropped (their effects are already baked into the restored
execution state).
Trait Implementations§
Source§impl Allocative for OracleResponse
impl Allocative for OracleResponse
Source§impl Clone for OracleResponse
impl Clone for OracleResponse
Source§fn clone(&self) -> OracleResponse
fn clone(&self) -> OracleResponse
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for OracleResponse
impl Debug for OracleResponse
Source§impl<'de> Deserialize<'de> for OracleResponse
impl<'de> Deserialize<'de> for OracleResponse
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Hash for OracleResponse
impl Hash for OracleResponse
Source§impl InputType for OracleResponse
impl InputType for OracleResponse
Source§type RawValueType = OracleResponse
type RawValueType = OracleResponse
Source§fn create_type_info(registry: &mut Registry) -> String
fn create_type_info(registry: &mut Registry) -> String
Source§fn parse(value: Option<Value>) -> InputValueResult<Self>
fn parse(value: Option<Value>) -> InputValueResult<Self>
Value. None represents undefined.Source§fn as_raw_value(&self) -> Option<&Self::RawValueType>
fn as_raw_value(&self) -> Option<&Self::RawValueType>
Source§fn qualified_type_name() -> String
fn qualified_type_name() -> String
Source§impl OutputType for OracleResponse
impl OutputType for OracleResponse
Source§fn create_type_info(registry: &mut Registry) -> String
fn create_type_info(registry: &mut Registry) -> String
Source§async fn resolve(
&self,
_: &ContextSelectionSet<'_>,
_field: &Positioned<Field>,
) -> ServerResult<Value>
async fn resolve( &self, _: &ContextSelectionSet<'_>, _field: &Positioned<Field>, ) -> ServerResult<Value>
async_graphql::Value.Source§fn qualified_type_name() -> String
fn qualified_type_name() -> String
Source§impl PartialEq for OracleResponse
impl PartialEq for OracleResponse
Source§impl ScalarType for OracleResponse
impl ScalarType for OracleResponse
Source§impl Serialize for OracleResponse
impl Serialize for OracleResponse
impl BcsHashable<'_> for OracleResponse
impl Eq for OracleResponse
impl StructuralPartialEq for OracleResponse
Auto Trait Implementations§
impl Freeze for OracleResponse
impl RefUnwindSafe for OracleResponse
impl Send for OracleResponse
impl Sync for OracleResponse
impl Unpin for OracleResponse
impl UnsafeUnpin for OracleResponse
impl UnwindSafe for OracleResponse
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CallHasher for T
impl<T> CallHasher for T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Choices> CoproductSubsetter<CNil, HNil> for Choices
impl<Choices> CoproductSubsetter<CNil, HNil> for Choices
Source§impl<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<'de, T> HasTypeName for Twhere
T: BcsHashable<'de>,
impl<'de, T> HasTypeName for Twhere
T: BcsHashable<'de>,
Source§impl<'de, T, Hasher> Hashable<Hasher> for Twhere
T: BcsHashable<'de>,
Hasher: Write,
impl<'de, T, Hasher> Hashable<Hasher> for Twhere
T: BcsHashable<'de>,
Hasher: Write,
Source§fn write(&self, hasher: &mut Hasher)
fn write(&self, hasher: &mut Hasher)
Self to the given hasher.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Source§impl<T> MockResults for T
impl<T> MockResults for T
Source§type Results = T
type Results = T
MockInstance.Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<M, I> RuntimeMemory<&mut I> for Mwhere
M: RuntimeMemory<I>,
impl<M, I> RuntimeMemory<&mut I> for Mwhere
M: RuntimeMemory<I>,
Source§fn read<'instance>(
&self,
instance: &'instance &mut I,
location: GuestPointer,
length: u32,
) -> Result<Cow<'instance, [u8]>, RuntimeError>
fn read<'instance>( &self, instance: &'instance &mut I, location: GuestPointer, length: u32, ) -> Result<Cow<'instance, [u8]>, RuntimeError>
Reads length bytes from memory from the provided location.
Source§fn write(
&mut self,
instance: &mut &mut I,
location: GuestPointer,
bytes: &[u8],
) -> Result<(), RuntimeError>
fn write( &mut self, instance: &mut &mut I, location: GuestPointer, bytes: &[u8], ) -> Result<(), RuntimeError>
Writes the bytes to memory at the provided location.