-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Current architecture snapshot #123
base: master
Are you sure you want to change the base?
Conversation
Arch structure bullet points
The architecture is now: * components * deployment * flows
…flows Split technical view into three categories
* Bullet points; Defining property description * Describe typical content of the Offer * Checkpoint: Publishing Offers; negotiating (not complete) * Negotiating: describe Agreement conclusion * Example negotiations based on chosen-platform property * Describe Resource allocation and Activity creation/destruction * Add DebitNotes -> Invoice mermaid * Describe termination; potential reasons * Update DebitNotes description: DebitNotes payments triggering * Describe sending Invoice and acceptance semantic * Describe monitoring payments confirmation * Improve bullet points grammar * Simplified sequence diagram for activity from Provider perspective * Sequence diagram for negotiations * Apply simple and obvious review comments * Move diagrams to chapters with more detailed description * Refined simplified negotiations: get rid of yagna daemons * Link topics; Review fixes * Rework payments description (work in progress) * Rework payments descritpion in 5th chapter * Don't mention REST API and market module in chapter about publishing Offer * Remove mentioning of Golem protocol * Gramatically fix chapter about resources * Remove market protocol reference from termination description * Rephrase Activity chapter; mention where are Activity starting parameters comming from * Describe payments confirmation * Replace Golem Node with Core Network :( * APply review fixes
* Add DebitNotes -> Invoice mermaid * Describe termination; potential reasons * Update DebitNotes description: DebitNotes payments triggering * Describe sending Invoice and acceptance semantic * Describe monitoring payments confirmation * Simplified sequence diagram for activity from Provider perspective * Sequence diagram for negotiations * Apply simple and obvious review comments * Move diagrams to chapters with more detailed description * Refined simplified negotiations: get rid of yagna daemons * Link topics; Review fixes * Rework payments description (work in progress) * Rework payments descritpion in 5th chapter * Remove market protocol reference from termination description * Describe payments confirmation * Replace Golem Node with Core Network :( * Offer/Demand specification copy introduction from previous docs * Property naming, types etc * Properties examples; flattened vs nested form * Value-less properties * Add constraints basic description * Describe constraints operators * Demand/Offer matching * Pros and cons of using constraints against postponing decision to negotiations * Add example of constraint expression different operators * Market protocols; Describe subnet (work in progress) * Represent Offer/Demnad as table isntead of mermaid * Decribe negotiable properties * Mention mid-agreement payments and link to specification * Describe capabilities based approach; GPU as an example * ExeUnit progress events as an example of capability based approach * Problem with capabilities based approach * Backward compatiblity of negotiation protocols * Add payment procotol as an example of solving compatiblity issues * Describe potential problems with protocol clashes * Add links; Fixes after first reading * Description: How to determine market protocol specification conformance * Describe: where are specifications * Post-revase fixes * Apply review changes - part 1 * Review fixes: Language requirements * Language introduction * Reverse changes outside of this PR scope * Another round of review fixes
* Introduction chapter to Net module * Mermaid visualalizing net interactions * Describe network addressing and translation * Describe broadcasting * Describe how identities are handled * Improve chapter about network identitfication; add link to identity * Describe different net channels * List channels prefixes; other review fixes * Describe net responsiblities * Rephrase channels to transport types * New round of review fixes * Remove old version * Improved description of transfer transport type * Remove opaque
Add Payment Components to architecture snapshot
* Offers propagation: basic assumptions; Bullet points for further work * Mermaids for Offer propagation * Attempt to fix flowchart arrows * Improve broadcasting mermaids descriptions * Describe requirements for neighborhood functions * Subchapters about hybrid/central net difference in context of market; Description of broadcast triggers * Describe mechanism reducing garbase on market * Apply spliest review fixes * Chnage wording of broadcasts part 1 * Chnage fragment about global and local broadcast * Add paragraph about storing Offers * Remove invalidated neighborhood * Chnage broadcast naming semantic
* Describe network addressing and translation * Describe broadcasting * Describe how identities are handled * Improve chapter about network identitfication; add link to identity * Introduction to hybrid net * Describe relay server * Diagram: connecting to relay server * Describe Challenge and Public IP check * IP check: add alternative: timeout when packet is drpped * Describe p2p connections between Nodes * Describe p2p handshake * Describe Forwarding network traffic and virtual TCP * Describe how different channels are implemented in Hybrid Net * Describe broadcasts to neighborhood * Apply trivial review comments * Raw description of neighborhood * Improve neighborhood chapter * Apply trivial review fixes * Describe Node idenitification; Start describing encryption * Apply distinctions between connection and session; Broadcastign terminology * Describe key dervation and symmetric encryption * Remove triling spaces * Rephrase broadcasting description; add example * Explicite mention that transport types use underying session * Introduction word to neighhood concept * Apply correct broadcast naming semantic * Remove duplicates after rebase * Make transfer transport type description more precise
The description only lists the large ones.
The PR is picked up without review to be amended further afterwards.
Both provider and requestor should specify property `golem.com.payment.protocol.version` | ||
### Why | ||
|
||
Provider is unable to validate transactions made via contract. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The meaning of this is unclear to me - is this a justification for moving to version 2? If so, how is version 2 addressing this problem?
* The range of predefined "services" on Golem is far smaller compared to | ||
traditional cloud providers. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe add something that this range keeps growing, provide examples of recent additions.
The Requestor needs to have a certain level of technical knowledge to interact | ||
with Golem Network's APIs (e.g., using the Python or Node.js SDKs). Through | ||
these APIs, they specify what resources they require and how they intend to pay | ||
for them. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not necessarily true; a Requestor (i.e. the entity demanding services and paying for them) may also have someone else write them the software needed.
Agreement. While this is not mandatory, it is encouraged as it can provide valuable context for the other party, | ||
serving as diagnostic information or for other purposes. | ||
|
||
The [Agreement](#agreement) can be terminated when either party chooses to end it. Core Network doesn't enforce any |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Duplication with line 389 - 404
``` | ||
|
||
|
||
Once the Agreement is terminated, the Provider Agent should send an [Invoice](#invoice) to the Requestor Agent summarizing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Duplication of lines 425 - 429
It's important for the Provider to monitor payments after the Agreement is completed. This is when the Provider Agent | ||
should adjust its market strategy to ensure profitability. Since the Core Network doesn't guarantee payment delivery, | ||
the Provider Agent should implement measures to prevent being exploited by Requestors. One example is rejecting | ||
non-paying Requestors and prioritizing those with a good reputation. Lack of payment isn't the only reason for |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reputation
-> Here, it would be probably good to explain what reputation is. Right now it’s unclear, and the protocol does not support something like Reputation... but from this description someone might assume that reputation is built into the protocol.
Agent should monitor Payment events. This can be done by listening for status changes to Settled on Invoice and Debit Note | ||
events, or by tracking payment events to receive notifications for each transaction. | ||
|
||
Payment confirmation is received by the Provider Agent from the Requestor once the transaction is confirmed on the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Duplication with 454 - 457
|
||
Buying on Golem Network, just like [selling](#selling-on-golem-platform), | ||
involves the [Requestor](#requestor) specifying what one needs in a formal | ||
language, letting the platform match Offers and a [Requestor |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does it mean that the platform matches offers? From earlier descriptions, it seems there is no automatic offer matching, only propagation. It is the responsibility of the respective agents to match offers, not the platform.
|
||
Before the Requestor begins, they must secure appropriate funds. To do this, | ||
they should have funds on the wallet address from which they will pay, on one of | ||
the two supported blockchains: Ethereum or Polygon. It is strongly recommended |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the case now, but shouldn't it be mentioned that these platforms are more generic than just two?
|
||
#### 6. Closure the Agreement | ||
|
||
The Requestor is responsible for terminating the Agreement. This notifies the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We previously wrote that both parties can terminate the agreement. I
s it okay to indicate the Requestor as the responsible party here?
|
||
## Layers | ||
|
||
Golem Network's applications are unknown in advance. Therefore, based on past |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A very strange introduction for the beginning of a section on architecture layers
Typically, humans are not involved in the process of finding, matching, negotiating, or finalizing agreements. Instead, | ||
users define their needs programmatically, allowing the [Provider Agent](#provider-agent) and [Requestor Agent](#requester-agent) | ||
software to handle these tasks automatically. | ||
|
||
The [Provider Agent](#provider-agent) is primarily responsible for implementing the logic needed to sell resources on | ||
the Golem Network. From high level perspective, Provider Agent application should do following things: | ||
1. Describe Resources using property language to create an [Offer](#offer) | ||
2. Publish the Offer on the market | ||
3. Monitor incoming Proposals and negotiate an [Agreement](#agreement) with the most promising [Requestor](#Requestor) | ||
4. Allocate the promised Resources in accordance with the [Agreement](#agreement) | ||
5. Monitor resources usage and charge Requestor Agent | ||
6. Terminate the Agreement or await the Agreement termination event from the [Requestor](#Requestor) | ||
7. Send an [Invoice](#invoice) summarizing the total cost of the [Agreement](#agreement) | ||
8. Wait until the payment for the [Invoice](#invoice) is settled and payment confirmed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This description may seem intimidating. It might be worth stating that a Golem user does not necessarily need to create a program to do all this things, but simply use a default Provider Agent with minimal configuration effort.
#### 1. Describe Resources using property language to create an [Offer](#offer) | ||
|
||
While Golem is currently used for trading computational resources, it was designed to support the exchange of any type of | ||
[resource](#resource). This means the Marketplace does not enforce strict standards on the goods being traded. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[resource](#resource). This means the Marketplace does not enforce strict standards on the goods being traded. | |
[resource](#resource). This means the Marketplace does not enforce strict standards on the services being traded. |
#### 3. Monitor incoming Proposals and negotiate an Agreement with the most promising Requestor | ||
|
||
The [Provider Agent](#provider-agent) plays a passive role in negotiations. Offers are propagated across the network and | ||
received by [Requestors](#Requestor). The offer is matched locally on the Requestor's node with a [Demand](#demand). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the first place the notion of Demand occurs. It might be worthwhile to explain what it is (especially that the linked definition is not very enlightening)
|
||
```mermaid | ||
--- | ||
title: Simplified negotiations from Provider Agent's perspective |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This diagram should be made clearer
a constraint to their demand. | ||
|
||
Instead, the Requestor Agent collects Proposals from the market and evaluates them based on estimated costs. In later stages | ||
of Proposal exchange, they choose the platform by setting the relevant [property](#property) according to the Providers' scores, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Setting the property where? In the counter-proposal? But arch.md#property states "Property is a key-value pair present in Offers and Demands specifying properties of the Node producing the document.". This is confusing.
Both Debit Notes and Invoices can be either accepted or rejected by the other party. Acceptance signals that the | ||
Requestor Agent agrees to pay the specified amount. Rejection, on the other hand, indicates refusal to pay the | ||
non-accepted amount. However, it’s important to note that a rejection does not absolve the Requestor Agent from paying | ||
for all previously accepted Debit Notes. The conditions under which rejection is allowed should be defined in the | ||
Agreement. Currently, no payment scheme permits rejections. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How can a Requestor safeguard against a dishonest provider?
Or even honest mistakes, if "no payment scheme permits rejections"?
information in their Offer or Demand. This is a more lightweight approach compared to going through the full negotiation | ||
process. | ||
|
||
### Buying on golem platform. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
### Buying on golem platform. | |
### Buying on Golem platform. |
1. Create a Demand | ||
1. Negotiate and Agreement | ||
1. Activate the service and supervise the Agreement | ||
1. Closure the Agreement |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think "closure" is usually used as a noun rather than a verb.
The Requestor is responsible for terminating the Agreement. This notifies the | ||
Provider to terminate all activities associated with that contract. The | ||
Requestor receives an Invoice summarizing the expenses from all Activities | ||
active under the agreement. The Requestor confirms that the amount is correct. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and if it is not correct?
|
||
Golem Network's applications are unknown in advance. Therefore, based on past | ||
experience, a decision was made to design the architecture flexible enough to | ||
swap out key components. This resulted in a three-layer architecture. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might be helpful to explain how the layers communicate, since from this descriptions they seem to be mostly independent from each other, so as to represent "dimensions" rather than "layers"
derive the shared secret, allowing it to decrypt the message. No special control packet exchanges are required | ||
between the sender and receiver. | ||
|
||
#### Central net |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Description missing
A description of the component responsible for making offers, counter-offers, | ||
negotiations, etc. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
description missing
|
||
#### Offer propagation | ||
|
||
- Link to design [decision](#only-providers-offers-are-propagated) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
broken link
|
||
#### 3. Monitor incoming Proposals and negotiate an Agreement with the most promising Requestor | ||
|
||
The [Provider Agent](#provider-agent) plays a passive role in negotiations. Offers are propagated across the network and |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yet the diagram below states that the provider "updates Proposals" and sends "Counter Proposals". Is this passive?
these APIs, they specify what resources they require and how they intend to pay | ||
for them. | ||
|
||
## Activities |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Activity" has a specific meaning in Golem, so this section title should probably be changed
## Activities | |
## Using the Golem network |
intended audience is assumed to be technical but not necessarily have deep | ||
expertise in the crypto world. The level of detail stops short of describing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
intended audience is assumed to be technical but not necessarily have deep | |
expertise in the crypto world. The level of detail stops short of describing | |
intended audience is assumed to be technical but not necessarily experts in the crypto world. The level of detail stops short of describing |
|
||
This section outlines the components of the Golem Network, including the actors, | ||
technical artifacts, and the activities these actors may perform. The goal is to | ||
provide a high-level overview that ties together all key terms, offering a clear |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
provide a high-level overview that ties together all key terms, offering a clear | |
provide a high-level overview tying together all key terms, offering a clear |
to give the reader an overview of the terms introduced by Golem without any | ||
details and establish a glossary to ensure consistency within the document. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to give the reader an overview of the terms introduced by Golem without any | |
details and establish a glossary to ensure consistency within the document. | |
to give the reader an overview of the terms introduced by Golem and establish a glossary to ensure consistency within the document. |
these APIs, they specify what resources they require and how they intend to pay | ||
for them. | ||
|
||
## Activities |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One major problem I have with this whole section is that it is provider-centriic, as if we did not care so much for requestors. I wonder if there may be a deeper issue underlying this approach. For example, compare the detailed description of "selling on Golem" vs the rudimentary subsection on buying.
@@ -0,0 +1,2921 @@ | |||
# Golem — current architecture |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My main problem with this document is that it is sadly a tedious, uninspiring read.
An architecture document should convey the most interesting and novel ideas as well and strive to inspire. It may be technically challenging but this should be balanced by a convinvcing story and gripping storytelling. Alas, this document fails to achieve either of this goals.
#### Market strategies | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Empty section
#### Agreement termination | ||
- Who is allowed to terminate? In what situation? | ||
- What is specified by protocol and what is left to future specifications? | ||
- Termination reason concept |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO
This PR summarizes the current Golem's architecture.