Replies: 2 comments
-
Near and far references are concepts in Agoric that are related to how objects and their capabilities are managed. Near References:
Far References:
In Agoric, the combination of near and far references supports the principle of least authority, which means that code and components should only have the minimum set of capabilities necessary to perform their tasks. This helps improve security by limiting the potential impact of a security breach. |
Beta Was this translation helpful? Give feedback.
0 replies
-
so you're interested in an example of using |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Background
My familiarity with "near" references stems from time spent reading through erights.org, which helped me develop an understanding of the different kinds of references. (I've included links to some of these pages I found particularly helpful.) Still, I struggle to come up with concrete examples for Near references vs. Far references in the context of Agoric smart contracting systems (and distributed JavaScript execution in general), so I'm opening this discussion in an effort to get some clarity around the topic.
The motivation to open this discussion can be traced back to the
setupZoeForTest
function shown below. As you can see, it takes an object with an optionaluseNearRemote
property that defaults tofalse
.agoric-sdk/packages/inter-protocol/test/vaultFactory/test-vault.js
Lines 34 to 37 in cd437ef
It seems important to have an understanding of how to replicate cross-vat communication so that, upon deployment of a smart contracting system, we can be confident in the ways in which our objects will interact.
Unfortunately, my efforts to gain more insight into the usage of this property proved unsuccessful. A search of the agoric-sdk shows just 2 instances of
useNearRemote
being settrue
.This is quite a small sample size, so any input on how this function is used, when to use it, etc. is greatly appreciated! Also, any input on the usage of
makeLoopback
would be really helpful as it seems relevant to the discussion of Near and Far references.ERights.org Links
Beta Was this translation helpful? Give feedback.
All reactions