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

report back intent execution result #3132

Merged
merged 5 commits into from
Oct 23, 2024

Conversation

kziemianek
Copy link
Member

No description provided.

Copy link

linear bot commented Oct 17, 2024

@kziemianek kziemianek changed the title report back intention execution result report back intent execution result Oct 18, 2024
@kziemianek kziemianek mentioned this pull request Oct 18, 2024
Copy link
Collaborator

@Kailai-Wang Kailai-Wang left a comment

Choose a reason for hiding this comment

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

Looks good, thanks!

@@ -124,6 +132,10 @@ pub mod pallet {
pub type AccountStoreHash<T: Config> =
StorageMap<Hasher = Blake2_128Concat, Key = T::AccountId, Value = H256>;

#[pallet::storage]
#[pallet::getter(fn omni_executor)]
pub type OmniExecutor<T: Config> = StorageValue<_, T::AccountId, OptionQuery>;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Shall we use teebag as the sole place to manage enclaves? I'm not sure if RA is ready for omni-executor though

Copy link
Collaborator

Choose a reason for hiding this comment

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

Btw the TEECallOrigin does go through the teebag storages

Copy link
Member Author

Choose a reason for hiding this comment

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

omni-executor is not registered as enclave at this moment


#[pallet::call_index(7)]
#[pallet::weight((195_000_000, DispatchClass::Normal, Pays::No))]
pub fn intent_executed(
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think later we could have an enum representing the status of an Intent, like:

Submitted,
Synced / ProcessStarted,
Finished,

self.legacy.chain_get_block_hash(Some(block_num.into())).await.map_err(|_| ())?;
async fn get_raw_metadata(&mut self, block_num: Option<u64>) -> Result<Vec<u8>, ()> {
let maybe_hash = self
.legacy
Copy link
Collaborator

Choose a reason for hiding this comment

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

Out of curiosity, what are non-legacy methods for such queries? 😲

Copy link
Member Author

Choose a reason for hiding this comment

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

I think it's Metadata_metadata_at_version

@Kailai-Wang
Copy link
Collaborator

Once CI and conflicts are resolved we are good to go

@kziemianek kziemianek enabled auto-merge (squash) October 23, 2024 07:54
@kziemianek kziemianek merged commit 64136cb into dev Oct 23, 2024
21 checks passed
@kziemianek kziemianek deleted the p-1103-omni-account-request-intention-call branch October 23, 2024 08:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants