Conversation
50098fc to
141120a
Compare
|
Don't look at the failing lint in this PR, it will be fixed with #465 |
29beca2 to
feea7ae
Compare
82c927c to
e3059a2
Compare
emhane
left a comment
There was a problem hiding this comment.
you're missing copyright license on a lot of files, read from copyright licence in kona:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
https://github.com/op-rs/kona/blob/main/LICENSE.md
| Err(err) => match err { | ||
| InteropTxValidatorError::SupervisorServerError(err) => { | ||
| warn!(target: "payload_builder", %err, ?sequencer_tx, "Supervisor error, skipping."); | ||
| self.metrics.inc_num_cross_chain_tx_server_error(); | ||
| continue; | ||
| } | ||
| InteropTxValidatorError::ValidationTimeout(_) => { | ||
| trace!(target: "payload_builder", %err, ?sequencer_tx, "Executing message validation timed out, skipping."); | ||
| self.metrics.inc_num_cross_chain_tx_timeout(); | ||
| continue; | ||
| } | ||
| err => { | ||
| trace!(target: "payload_builder", %err, ?sequencer_tx, "Executing message rejected."); | ||
| self.metrics.inc_num_cross_chain_tx_fail(); | ||
| continue; | ||
| } | ||
| }, | ||
| } |
There was a problem hiding this comment.
there is also the client error which you probably want to match on specifically, because depending on what it is, you may want to try and reconnect with the supervisor
|
@emhane |
f66a68e to
69e0472
Compare
| pool, | ||
| ctx.provider().clone(), | ||
| Arc::new(BasicOpReceiptBuilder::default()), | ||
| self.supervisor_url.clone(), |
There was a problem hiding this comment.
| self.supervisor_url.clone(), | |
| Some(ctx.provider() | |
| .chain_spec() | |
| .is_interop_active_at_timestamp(ctx.provider().chain_spec().genesis_header().timestamp()) | |
| .then(|| self.supervisor_url().ok_or(PayloadBuilderError::SupervisorUrlMissingPostInterop)?), |
smthg like this
c6e079a to
6d842fe
Compare
| /// Returns (is_valid, is_recoverable) | ||
| pub fn is_cross_tx_valid<N: NodePrimitives>( | ||
| tx: &N::SignedTx, | ||
| client: Option<&SupervisorValidator>, |
There was a problem hiding this comment.
| client: Option<&SupervisorValidator>, | |
| client: &SupervisorValidator, |
it seems like the caller is responsible if checking if interop is activated, so supervisor client isn't an optional param
There was a problem hiding this comment.
I want to simplify execute_best_transactions as much as possible, it would look consistent
Don't the same for reth PR
There was a problem hiding this comment.
In the reth PR I will ensure that the supervisor is set during the building, but in here we need to rebase first
| /// | ||
| /// If commitment present pre-interop tx rejected. | ||
| /// | ||
| /// Returns (is_valid, is_recoverable) |
There was a problem hiding this comment.
What exactly is is_recoverable? Is it like an RPC error?
There was a problem hiding this comment.
we remove totally invalid transactions from mempool
And if the transaction is not yet valid - just skip it for the current round
|
I see that the supervisor client calls We probably want to enable a configurable safety level that is used in the client. The safety level could in theory be configured on a per chain or per message basis (accept any unsafe message if value is less than $100 for example) but that is def over engineering for now. I would be ok with either hardcoding the safety level to unsafe for now or allowing a runtime flag that allows it to be set to one of the possible values |
|
@tynes thanks for review a lot! |
Implement SupervisorValidator struct to use for validation
4ebb3ca to
237d2e3
Compare
237d2e3 to
6a41b1b
Compare
Cherry-pick kona structs that we are using for interop validation
Implement SupervisorValidator to be used in rbuilder
Add additional primitives crate, that is used for storing external code
📝 Summary
💡 Motivation and Context
✅ I have completed the following steps:
make lintmake test