02:06:20
kayabanerve:matrix.org:
Not even poll the latest header, just the latest block number should be fine and minimal.
02:06:45
kayabanerve:matrix.org:
Cindy_: Apologies for replying a few hours later. Yes, the Cuprate room is better to discuss this.
02:07:17
kayabanerve:matrix.org:
There's two types of interfaces: unvalidated and validated. unvalidated would be a remote RPC, which may tell you anything. validated means some degree of checks has occurred.
02:07:34
kayabanerve:matrix.org:
monero-interface implements the validated methods _for all unvalidated interfaces_.
02:07:59
kayabanerve:matrix.org:
So as monero-daemon-rpc implements the unvalidated interfaces directly, monero-rpc will still layer the safer validating abstractions on top.
02:08:56
kayabanerve:matrix.org:
You should only work with the validated interfaces. The unvalidated interfaces exist solely so an interface definition (like monero-daemon-rpc, for talking to remote nodes) can declare itself unvalidated and defer to the automatic validation provided within monero-interface.
02:09:36
kayabanerve:matrix.org:
Whereas if you were within a Monero node, say if you had local access to a Monero database from a node you _knew_ was honest, you could directly implement the validated interface due to trusting the origin.
02:10:44
kayabanerve:matrix.org:
So ScannableBlock will be from a validated interface. monero-daemon-rpc is not a validated interface itself, but as it implements the unvalidated interface traits, monero-interface will layer the safe validated APIs (with its own implementation), allowing you to use it like it's a validated interface.
02:11:34
kayabanerve:matrix.org:
The type definitions are largely present in monero-oxide. monero-interface sits above it in the crate hierarchy. monero-wallet sits one more step up, but re-exports everything in oxide and re-exports interface.
02:14:02
kayabanerve:matrix.org:
https://monero-oxide.github.io/monero-oxide/monero_interface/trait.ProvidesScannableBlocks.html is the literal `trait` to retrieve blocks with.
02:15:08
kayabanerve:matrix.org:
As you can see, it's automatically implemented for ProvidesUnvalidatedScannableBlocks, which is what MoneroDaemon (from monero-daemon-rpc) implements.
11:59:04
Cindy_:
kayabaNerve: it's impl<P: ProvidesTransactions + ProvidesUnvalidatedScannableBlocks> though
11:59:20
Cindy_:
MoneroDaemon does not implement ProvidesTransactions
12:00:36
Cindy_:
oh wait, impl<P: ProvidesUnvalidatedTransactions> ProvidesTransactions for P
12:00:43
Cindy_:
nevermind, sorry for bothering you
12:07:24
Cindy_:
i can't seem to use the crate from crates.rs normally since the copy there is an empty repo.. so i just import the crate manually from the git repo
17:36:04
kayabanerve:matrix.org:
Yep. That's all as expected for now.