Conversation
76bc9e7 to
6de7399
Compare
|
Once this is merged I will be able to add the validator client logic to RPC server inside the logic added in #1278 when |
7a16720 to
9285d24
Compare
| .expect("Duality is maintained by the developer"); | ||
|
|
||
| Ok(()) | ||
| } |
There was a problem hiding this comment.
This is duplicated because EmbeddedMigrations is not clone and has ownership transferred to pending_migrations(). We can work around this if we would probably be fighting the design of the relevant module so we might prefer to duplicate in the way we have here.
There was a problem hiding this comment.
It's fine as long as we pick the right migrations if we end up with two different databases, and not accidentally apply the wrong migration to the wrong database.
crates/validator/src/db/models.rs
Outdated
| size_in_bytes, | ||
| } | ||
| } | ||
| } |
There was a problem hiding this comment.
This is duplicated from store crate. Just placeholder for now. I'm unsure what the actual schema will be just yet.
crates/validator/src/db/schema.rs
Outdated
| output_notes -> Binary, | ||
| size_in_bytes -> BigInt, | ||
| } | ||
| } |
There was a problem hiding this comment.
This should be generated for us. Maybe I'm missing something from build.rs or maybe we need to add something to the Makefile
There was a problem hiding this comment.
The idea is to either create this manually or do it as previously described in #928 (comment)
| "Successfully inserted proven transaction into database" | ||
| ); | ||
|
|
||
| Ok(rows_affected) |
There was a problem hiding this comment.
This is all placeholder until we know the actual schema
5d3d2dd to
31e24d3
Compare
| pub address: SocketAddr, | ||
| /// Server-side timeout for an individual gRPC request. | ||
| /// | ||
| /// If the handler takes longer than this duration, the server cancels the call. |
There was a problem hiding this comment.
nit: what's the default value?
There was a problem hiding this comment.
All the serveres rely on const DEFAULT_TIMEOUT: Duration = Duration::from_secs(10); and have this same comment
d118068 to
9eb59da
Compare
9eb59da to
05bcfec
Compare
8fd6334 to
00fd163
Compare
bobbinth
left a comment
There was a problem hiding this comment.
Looks good! Thank you! This is not an in-depth review, but I left some comments inline. The main ones are about reducing the scope of this PR a bit by making the validator "stateless". We can add the database etc. in subsequent PRs.
| ## Architecture | ||
|
|
||
| The validator operates as a gRPC server and integrates with other Miden node components according to the following flow: |
There was a problem hiding this comment.
This is fine for this PR, but in the future, we should probably move this diagram into the relevant section of the node docs (in the docs directory). In the same future PR, we should probably add a section about the validator component there as well.
0904b6e to
5ab7d97
Compare
Context
As part of the network guardrails initiative, we require a component of miden-node which will re-execute proven transactions, store transaction metadata for private account retrieval, and perform block attestation of blocks coming out of the block-producer.
This PR adds the initial scaffolding of the validator component with placeholder protobuf and SQL schema definitions.
Relates to #613.
Changes
validatorcrate with placeholder protobuf and SQL schemas and server scaffolding.pubandpub useto various types and functions from store crate to be used in validator.