-
Notifications
You must be signed in to change notification settings - Fork 294
Store contract class data in client #1631
Store contract class data in client #1631
Conversation
58d8c7a
to
b40b67c
Compare
ci linter failed because counter10 doesn't exist on main, but it is built during the starknet-rpc-test and those passes. So not an issue |
@@ -369,6 +371,16 @@ pub fn new_full( | |||
} | |||
} | |||
|
|||
task_manager.spawn_essential_handle().spawn( |
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.
this is currently spawned inside role.is_authority()
. do we want this worker to be there for full nodes as well? although, this entire setup doesn't work with multiple full nodes anyways right? as far as I understand, only the full node that receives the txn will store the class data
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.
as far as I understand, only the full node that receives the txn will store the class data
Yup. Him and the sequencer that produces the block.
I think it is better to relly on p2p to share this data. It should be there soon
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.
I asked internally about the future p2p protocol
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.
WIll the sequencer store it though? The storing only happens at the RPC layer. If a txn reaches the full node, it gets validated and is then gossiped in the mempool. It never enters the RPC of the sequencer, just goes inside the pallet directly no?
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.
I think Starknet full nodes, relay the RPC calls directly, not the TXs.
So they will send the full data to the sequencer, it needs it to compile sierra into casm and check the hashes match
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.
Oh ok, I thought we were talking about running Madara as a full node. That won't work anymore with this then, right?
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.
Madara full node will also just relay the write RPC. not store anything
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.
Oh, I thought only extrinsics are gossiped from the full node to the validator in Substrate
unsafe { std::str::from_utf8_unchecked(crate::static_keys::LAST_PROVED_BLOCK) }.to_string(), | ||
)), | ||
} | ||
pub fn last_proved_block(&self) -> Result<Option<BlockHash>, DbError> { |
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.
we can delete this actually, not used anymore. or we can create an issue if you want to do it in another PR :)
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.
We will start using it in the future, when we read messages from l1 again, won't we?
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.
Hmm, I don't think we need the last proved block to read a message from the L1
crates/primitives/transactions/src/from_broadcasted_transactions.rs
Outdated
Show resolved
Hide resolved
8ad406a
to
5f20367
Compare
5f20367
to
d66f38a
Compare
d66f38a
to
3b07dc0
Compare
There hasn't been any activity on this pull request recently, and in order to prioritize active work, it has been marked as stale. |
repository archived in favor of https://github.com/madara-alliance/madara |
No description provided.