unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: pukkamustard <pukkamustard@posteo.net>
To: Vijaya Anand <sunrockers8@gmail.com>
Cc: Attila Lendvai <attila@lendvai.name>, guix-devel@gnu.org
Subject: Re: [GSoC 23] distributed substitutes, cost of storage
Date: Wed, 29 Mar 2023 09:34:12 +0000	[thread overview]
Message-ID: <86wn2zriop.fsf@posteo.net> (raw)
In-Reply-To: <CAKg+GqbaO3eadLk50g1cw295f4aaDB2HfPHC7SP=kJ_r29s_aQ@mail.gmail.com>


Vijaya Anand <sunrockers8@gmail.com> writes:

> Sorry for the late reply.
> So in the case we are running swarm nodes that serves the network and hence help fund the substitute server, we can also use these
> to also upload eris encoded substitute blocks onto the network am I right? The total cost will thus be cost to run the swarm nodes +
> storage cost of substitute blocks in the network + cost to run substitute servers - money earned by running swarm nodes. But when
> we don't run swarm nodes which run to serve the network, the total cost is not really affect right as the cost to run swarm nodes will
> be lessened and no money will be earned. 
> So in the context of fallback mechanism the user client can send request to the substitute server for the missing block and the
> substitute server will serve the eris encoded data block back to the user (using HTTP). The responsibility of uploading these missing
> blocks back to the network is of the third party nodes (which are running to serve the desired content to the network). But how do we
> send the message to the node to report the missing block on the network? Can it be done by the user itself?

Some remarks:

- Maybe we don't need to do too much of an economic cost estimation, the
  current p2p networks (blocks over HTTP and IPFS) as well as ones that
  will quite possibly work soonish (GNUnet) do not incur any additional
  monetary storage cost. I think we should focus on resource usage
  (memory, disk, network) of users, servers and caching peers instead.

- One fallback strategy we absolutely need is to use get a substitute
  using the existing mechanism (substitute is a single nar file that is
  retrieved over HTTP without ERIS or any other p2p stuff).

- I like the principle "Think globally, act locally". Maybe users
  downloading substitutes who want to improve access to substitutes over
  p2p should only try to do so withing the scope of what they can do
  locally. I.e. by making the blocks available on the p2p network from
  the local machine. For IPFS and GNUnet this works very well and
  elimintates necessity of more RPC endpoints.

> "i can dream about a future where there's a social network that is based on digital signatures and encryption, and my Guix client
> authorizes compiled binaries based on some weighted transitive closure of signatures of my trusted peers"....Interesting! In the case
> of accessing Guix substitutes from p2p network, we ensure authorization by Guix team by making sure the urn of the substitute is the
> urn mentioned in the narinfo (which we get from a trusted source like the substitute server). So in the case of accessing some random
> compiled binary from the network, we just need to verify the authority of the document providing the urn of the content?

This is a very nice vision, that I share! However, maybe we should keep
it out of scope from the GSoC project and rely on the existing signature
mechanism for authenticity.

A web-of-trust like system for substitute system would be an excellent
and very interesting follow-up project.

-pukkamustard

> On Mon, 27 Mar 2023 at 2:49 AM Attila Lendvai <attila@lendvai.name> wrote:
>
>  > Also I didn't really think about the point about having to pay for
>  > the p2p services at some point of time.
>
>  a quick note here: i forgot to mention that e.g. the Swarm Foundation has programs for supporting opensource projects. so,
>  chances are high that the storage needs for Guix would be paid for by the foundation.
>
>  > In this case we will have to pay for the storage of substitutes both
>  > on the p2p storage backend as well as for storage in the substitute
>  > server am I right?
>
>  well, the substitute servers are currently already operated (and paid for) by the Guix team. i don't think that p2p storage solutions
>  have reached a point of maturity that we could rely on them alone. there should definitely be some time where both
>  infrastructures are running in parallel. somewhere down the road a choice could be made to stop running the current substitute
>  servers, but we are far away from that.
>
>  also, running swarm nodes that serve the network can earn money. so, the cost of running enough swarm nodes to pay for the
>  storage needs of Guix on the swarm network should be in the same ballpark of the costs of running the current substitute servers.
>  the storage price will be market based (this part is just being rolled out on the live network), so it's reasonable to expect that
>  people will fire up nodes if the storage price go well above the VPS costs.
>
>  and not all p2p storage networks are made equal. e.g. IPFS is only a registry of who is serving what. if you want to keep your data
>  alive on IPFS, then you need to run some nodes and make sure that they are serving the content that you care about... and bear
>  the costs of running these nodes. i.e. the DoS attack surface of IPFS is much smaller. (IPFS stores only the metadata in the DHT
>  (i.e. where is what), while Swarm stores there the data itself -- they are different architectures with different features)
>
>  (i need to learn more about GNUnet)
>
>  > So ideally we will want to eliminate the usage of these substitute
>  > servers and shift totally to p2p services and in this case we will
>  > have to shift the responsibility of re-uploading the blocks to the
>  > clients itself.
>
>  yep, that's my way of thinking, too.
>
>  note that 'client' here has two meanings:
>
>   1) some part of the codebase
>
>   2) a program that is running on the computers of the Guix users
>
>  i was using it in the first sense.
>
>  without a functional Web of Trust solution, the Guix team will have to run nodes that compile packages, sign them with their PGP
>  keys, and make them available somewhere. currently it's published through a HTTP based service that we call 'substitute
>  servers'. this GSoC project is about adding more storage backends.
>
>  but those backends don't solve the problem that the Guix users need to trust someone with a private key who compiles and signs
>  packages, regadless of the transport mechanism that gets the packages to the clients.
>
>  i can dream about a future where there's a social network that is based on digital signatures and encryption, and my Guix client
>  authorizes compiled binaries based on some weighted transitive closure of signatures of my trusted peers... but we are not there
>  yet. for now it's either trusting the Guix team's signature, or setting up your own substitute servers and build workers (or trusting
>  someone else, but i'm not aware of any third party offering substitutes).
>
>  > Also if we dont keep the re-uploading blocks option as default for
>  > the users, won't users usually not choose to enable it? Maybe we can
>  > keep it on as default and resource conscious users can choose to
>  > turn it off? Please let me know your thoughts on these points and I
>  > will change the implementation point of my proposal accordingly.
>
>  first, it's a philosophical question: i value consensual relationships, and that implies that the other party is well informed. and
>  clogging someone's network bandwidth is not an expected behavior from installing a linux distribution.
>
>  there's also a technical issue: these p2p backends will need to be configured. i have my doubts that we could ship a default config
>  with Guix with which these p2p backends could just work out of the box, but... let's hope that i'm wrong!
>
>  and then there's the issue of payments: it's not obvious that a random client can just upload binaries into a p2p storage network.
>  on some p2p networks someone needs to pay for that, and i don't yet understand well enough how the data is authorized through
>  payments (they are called postage stamps in swarm).
>
>  a good, high level comparison of p2p storage solutions would be useful.
>
>  -- 
>  • attila lendvai
>  • PGP: 963F 5D5F 45C7 DFCD 0A39
>  --
>  “There is something in the human spirit that will survive and prevail, there is a tiny and brilliant light burning in the heart of man
>  that will not go out no matter how dark the world becomes.”
>          — Leo Tolstoy (1828–1910)



  parent reply	other threads:[~2023-03-29  9:54 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-25 19:00 [GSoC 23] distributed substitutes, cost of storage Attila Lendvai
2023-03-26 20:06 ` Vijaya Anand
2023-03-26 21:19   ` Attila Lendvai
2023-03-28 20:19     ` Vijaya Anand
2023-03-29  8:45       ` Andreas Enge
2023-03-29  9:26         ` pukkamustard
2023-03-29  9:34       ` pukkamustard [this message]
2023-03-30 11:08 ` Maxime Devos
2023-04-04 10:53   ` Attila Lendvai
2023-04-04 18:51     ` Maxime Devos
2023-04-05  7:19       ` Attila Lendvai
2023-04-06  8:13     ` Simon Tournier
2023-04-07 22:45       ` Attila Lendvai
2023-04-08  0:46         ` Csepp
2023-04-08 16:05           ` Attila Lendvai
2023-04-08  9:30         ` Simon Tournier
2023-04-08 15:53           ` Attila Lendvai

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=86wn2zriop.fsf@posteo.net \
    --to=pukkamustard@posteo.net \
    --cc=attila@lendvai.name \
    --cc=guix-devel@gnu.org \
    --cc=sunrockers8@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).