-
m-relay<kayabanerve:matrix.org> Not even poll the latest header, just the latest block number should be fine and minimal.
-
m-relay<kayabanerve:matrix.org> Cindy_: Apologies for replying a few hours later. Yes, the Cuprate room is better to discuss this.
-
m-relay<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.
-
m-relay<kayabanerve:matrix.org> monero-interface implements the validated methods _for all unvalidated interfaces_.
-
m-relay<kayabanerve:matrix.org> So as monero-daemon-rpc implements the unvalidated interfaces directly, monero-rpc will still layer the safer validating abstractions on top.
-
m-relay<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.
-
m-relay<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.
-
m-relay<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.
-
m-relay<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.
-
m-relay<kayabanerve:matrix.org> monero-oxide.github.io/monero-oxide…/trait.ProvidesScannableBlocks.html is the literal `trait` to retrieve blocks with.
-
m-relay<kayabanerve:matrix.org> As you can see, it's automatically implemented for ProvidesUnvalidatedScannableBlocks, which is what MoneroDaemon (from monero-daemon-rpc) implements.
-
Cindy_kayabaNerve: it's impl<P:ProvidesTransactions+ProvidesUnvalidatedScannableBlocks> though
-
Cindy_MoneroDaemon does not implement ProvidesTransactions
-
Cindy_oh wait, impl<P:ProvidesUnvalidatedTransactions> ProvidesTransactions for P
-
Cindy_nevermind, sorry for bothering you
-
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
-
m-relay_<kayabanerve:matrix.org> Yep. That's all as expected for now.