![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
@peerbit/trusted-network
Advanced tools
A store that lets you build trusted networks of identities.
The store is defined by the "root trust" which has the responsibility in the beginning to trust additional identities. Later, these identities can add more identities to the network. Trusted identities can also be revoked.
Distributing content among untrusted peers will be unreliable, and not resilient to malicious parties that start to participate in the replication process with large amount (>> min replicas) of nodes followed by shutting them down simultaneously (no way for the original peers recover all lost data). To mitigate this, you can launch your program in a "Network", which is basically a list of nodes that trust each other. Symbolically you could thing of this as a VPC.
To do this, you only have to implement the "Network" interface:
import { Peerbit, Network } from 'peerbit'
import { Log } from '@peerbit/log'
import { Program } from '@peerbit/program'
import { TrustedNetwork } from '@peerbit/trusted-network'
import { field, variant } from '@dao-xyz/borst-ts'
@variant("string_store")
@network({property: 'network'})
class StringStore extends Program
{
@field({type: Store})
log: Log<Uint8Array>
@field({type: TrustedNetwork})
network: TrustedNetwork // this is a database storing all peers. Peers that are trusted can add new peers
constructor(properties:{ log: Store<any>, network: TrustedNetwork }) {
this.log = properties.store
this.network = properties.network;
}
async setup()
{
await store.setup({ encoding: ... , canPerform: ..., index: {... canRead ...}})
await trustedNetwork.setup()
}
}
// Later
const peer1 = await Peerbit.create(LIBP2P_CLIENT, {... options ...})
const peer2 = await Peerbit.create(LIBP2P_CLIENT_2, {... options ...})
const programPeer1 = await peer1.open(new StringStore({log: new Log(), network: new TrustedNetwork()}), {... options ...})
// add trust to another peer
await program.network.add(peer2.identity.publicKey)
// peer2 also has to "join" the network, in practice this means that peer2 adds a record telling that its Peer ID trusts its libp2p Id
const programPeer2 = await peer2.open(programPeer1.address, {... options ...})
await peer2.join(programPeer2) // This might fail with "AccessError" if you do this too quickly after "open", because it has not yet received the full trust graph from peer1 yet
See this test(s) for working examples
FAQs
Access controller that operates on a DB
The npm package @peerbit/trusted-network receives a total of 540 weekly downloads. As such, @peerbit/trusted-network popularity was classified as not popular.
We found that @peerbit/trusted-network demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.