8000 fix: more updated sections · filecoin-project/specs@0152b43 · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Commit 0152b43

Browse files
committed
fix: more updated sections
1 parent 50e87ed commit 0152b43

File tree

29 files changed

+212
-187
lines changed

29 files changed

+212
-187
lines changed

next/.site/layouts/partials/docs/menu-filetree.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
{{- partial "docs/title" .Page -}}
3939
</a>
4040
{{ else }}
41-
<a href="{{ range first 1 (sort .Page.Pages "Weight" "asc") }}{{ .RelPermalink }}{{ end }}" class="
41+
<a href="{{ (index .Page.Pages.ByWeight 0).RelPermalink }}" class="
4242
{{- if and .Page.Params.bookCollapseSection .Page.IsSection }}collapsed {{ end }}
4343
{{- if eq .CurrentPage .Page }}active{{ end }}">
4444
{{- partial "docs/title" .Page -}}

next/.site/layouts/shortcodes/dashboard-level.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<i class="gg-permanent"></i> Permanent
66

77
{{ range .Site.Pages }}
8-
{{ if in (slice ($.Get "name")) .Title}}
8+
{{ if in (slice ($.Page.Title)) .Title}}
99
{{ $.Scratch.Set "counter" 0 }}
1010
{{ $.Scratch.Set "counter-audit" 0 }}
1111
{{ range .Data.Pages }}

next/content/intro/concepts.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: "Key Concepts"
3-
audit: 1
3+
audit: 2
44
---
55

66
# Key Concepts
@@ -18,13 +18,13 @@ For clarity, we refer the following types of entities to describe implementation
1818
Depending on the choice of language and the particular component, this might
1919
correspond to a single software module,
2020
a thread or process running some main loop, a disk-backed database, or a variety of other design choices.
21-
For example, the [ChainSync](./../algorithms/block_sync.md#example) is a component: it could be implemented
21+
For example, the [ChainSync](chainsync) is a component: it could be implemented
2222
as a process or thread running a single specified main loop, which waits for network messages
2323
and responds accordingly by recording and/or forwarding block data.
2424

2525
- **_APIs_** are messages that can be sent to components.
2626
A client's view of a given sub-protocol, such as a request to a miner node's
27-
[Storage Provider](/missing-link) component to store files in the storage market,
27+
[Storage Provider](storage_provider) component to store files in the storage market,
2828
may require the execution of a series of APIs.
2929

3030
- **_Nodes_** are complete software and hardware systems that interact with the protocol.
@@ -34,8 +34,8 @@ For clarity, we refer the following types of entities to describe implementation
3434
The term _full node_ refers to a system that runs all of the above components, and supports all of the APIs detailed in the spec.
3535

3636
- **_Subsystems_** are conceptual divisions of the entire Filecoin protocol, either in terms of complete protocols
37-
(such as the [Storage Market](/storage_market) or [Retrieval Market](/retrieval_market)), or in terms of functionality
38-
(such as the [VM - Virtual Machine](/sys_vm)). They do not necessarily correspond to any particular node or software component.
37+
(such as the [Storage Market](storage_market) or [Retrieval Market](retrieval_market)), or in terms of functionality
38+
(such as the [VM - Virtual Machine](intro/filecoin_vm)). They do not necessarily correspond to any particular node or software component.
3939

4040
- **_Actors_** are virtual entities embodied in the state of the Filecoin VM.
4141
Protocol actors are analogous to participants in smart contracts;

next/content/intro/filecoin_vm.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
22
title: "Filecoin VM"
3+
weight: 3
34
---
45

56
# Filecoin VM
@@ -15,7 +16,4 @@ There are two routes to calling a method on an `actor`. First, to call a method
1516

1617
Second, an `actor` may call a method on another actor during the invocation of one of its methods. However, the only time this may happen is as a result of some actor being invoked by an external users message (note: an actor called by a user may call another actor that then calls another actor, as many layers deep as the execution can afford to run for).
1718

18-
For full implementation details, see the [VM Subsystem](/missing-link).
19-
{{< hint danger >}}
20-
link missing
21-
{{< /hint >}}
19+
For full implementation details, see the [VM Subsystem](systems/filecoin_vm).

next/content/intro/systems/_index.md

Lines changed: 3 additions & 132 deletions
Original file line numberDiff line numberDiff line change
@@ -1,134 +1,5 @@
11
---
22
title: System Decomposition
3-
---
4-
5-
# System Decomposition
6-
---
7-
8-
## Implementing Systems
9-
10-
In order to make it easier to decouple functionality into systems, the Filecoin Protocol assumes
11-
a set of functionality available to all systems. This functionality can be achieved by implementations
12-
in a variety of ways, and should take the guidance here as a recommendation (SHOULD).
13-
14-
### System Requirements
15-
16-
All Systems, as defined in this document, require the following:
17-
18-
- **Repository:**
19-
- **Local `IpldStore`.** Some amount of persistent local storage for data structures (small structured objects).
20-
Systems expect to be initialized with an IpldStore in which to store data structures they expect to persist across crashes.
21-
- **User Configuration Values.** A small amount of user-editable configuration values.
22-
These should be easy for end-users to access, view, and edit.
23-
- **Local, Secure `KeyStore`.** A facility to use to generate and use cryptographic keys, which MUST remain secret to the
24-
Filecoin Node. Systems SHOULD NOT access the keys directly, and should do so over an abstraction (ie the `KeyStore`) which
25-
provides the ability to Encrypt, Decrypt, Sign, SigVerify, and more.
26-
- **Local `FileStore`.** Some amount of persistent local storage for files (large byte arrays).
27-
Systems expect to be initialized with a FileStore in which to store large files.
28-
Some systems (like Markets) may need to store and delete large volumes of smaller files (1MB - 10GB).
29-
Other systems (like Storage Mining) may need to store and delete large volumes of large files (1GB - 1TB).
30-
- **Network.** Most systems need access to the network, to be able to connect to their counterparts in other Filecoin Nodes.
31-
Systems expect to be initialized with a `libp2p.Node` on which they can mount their own protocols.
32-
- **Clock.** Some systems need access to current network time, some with low tolerance for drift.
33-
Systems expect to be initialized with a Clock from which to tell network time. Some systems (like Blockchain)
34-
require very little clock drift, and require _secure_ time.
35-
36-
For this purpose, we use the `FilecoinNode` data structure, which is passed into all systems at initialization:
37-
38-
{{< embed src="../../systems/filecoin_nodes/node_base/filecoin_node.id" lang="go" >}}
39-
40-
{{< embed src="../../systems/filecoin_nodes/repository/repository_subsystem.id" lang="go" >}}
41-
42-
### System Limitations
43-
44-
Further, Systems MUST abide by the following limitations:
45-
46-
- **Random crashes.** A Filecoin Node may crash at any moment. Systems must be secure and consistent through crashes.
47-
This is primarily achived by limiting the use of persistent state, persisting such state through Ipld data structures,
48-
and through the use of initialization routines that check state, and perhaps correct errors.
49-
- **Isolation.** Systems must communicate over well-defined, isolated interfaces. They must not build their critical
50-
functionality over a shared memory space. (Note: for performance, shared memory abstractions can be used to power
51-
IpldStore, FileStore, and libp2p, but the systems themselves should not require it.) This is not just an operational
52-
concern; it also significantly simplifies the protocol and makes it easier to understand, analyze, debug, and change.
53-
- **No direct access to host OS Filesystem or Disk.** Systems cannot access disks directly -- they do so over the FileStore
54-
and IpldStore abstractions. This is to provide a high degree of portability and flexibility for end-users, especially
55-
storage miners and clients of large amounts of data, which need to be able to easily replace how their Filecoin Nodes
56-
access local storage.
57-
- **No direct access to host OS Network stack or TCP/IP.** Systems cannot access the network directly -- they do so over the
58-
libp2p library. There must not be any other kind of network access. This provides a high degree of portability across
59-
platforms and network protocols, enabling Filecoin Nodes (and all their critical systems) to run in a wide variety of
60-
settings, using all kinds of protocols (eg Bluetooth, LANs, etc).
61-
62-
63-
## What are systems? How do they work?
64-
---
65-
66-
Filecoin decouples and modularizes functionality into loosely-joined `systems`.
67-
Each system adds significant functionality, usually to achieve a set of important and tightly related goals.
68-
69-
For example, the Blockchain System provides structures like Block, Tipset, and Chain, and provides functionality
70-
like Block Sync, Block Propagation, Block Validation, Chain Selection, and Chain Access. This is
71-
separated from the Files, Pieces, Piece Preparation, and Data Transfer. Both of these systems are separated from
72-
the Markets, which provide Orders, Deals, Market Visibility, and Deal Settlement.
73-
74-
### Why is System decoupling useful?
75-
76-
This decoupling is useful for:
77-
78-
- **Implementation Boundaries:** it is possible to build implementations of Filecoin that only implement a
79-
subset of systems. This is especially useful for _Implementation Diversity_: we want many implementations
80-
of security critical systems (eg Blockchain), but do not need many implementations of Systems that can be
81-
decoupled.
82-
- **Runtime Decoupling:** system decoupling makes it easier to build and run Filecoin Nodes that isolate
83-
Systems into separate programs, and even separate physical computers.
84-
- **Security Isolation:** some systems require higher operational security than others. System decoupling allows
85-
implementations to meet their security and functionality needs. A good example of this is separating Blockchain
86-
processing from Data Transfer.
87-
- **Scalability:** systems, and various use cases, may drive different performance requirements for different opertators.
88-
System decoupling makes it easier for operators to scale their deployments along system boundaries.
89-
90-
91-
### Filecoin Nodes don't need all the systems
92-
93-
Filecoin Nodes vary significantly, and do not need all the systems.
94-
Most systems are only needed for a subset of use cases.
95-
96-
For example, the Blockchain System is required for synchronizing the chain, participating in secure consensus,
97-
storage mining, and chain validation.
98-
Many Filecoin Nodes do not need the chain and can perform their work by just fetching content from the latest
99-
StateTree, from a node they trust.
100-
101-
Note: Filecoin does not use the "full node" or "light client" terminology, in wide use in Bitcoin and other blockchain
102-
networks. In filecoin, these terms are not well defined. It is best to define nodes in terms of their capabilities,
103-
and therefore, in terms of the Systems they run. For example:
104-
105-
- **Chain Verifier Node:** Runs the Blockchain system. Can sync and validate the chain. Cannot mine or produce blocks.
106-
- **Client Node:** Runs the Blockchain, Market, and Data Transfer systems. Can sync and validate the chain. Cannot mine or produce blocks.
107-
- **Retrieval Miner Node:** Runs the Market and Data Transfer systems. Does not need the chain. Can make Retrieval Deals
108-
(Retrieval Provider side). Can send Clients data, and get paid for it.
109-
- **Storage Miner Node:** Runs the Blockchain, Storage Market, Storage Mining systems. Can sync and validate the chain.
110-
Can make Storage Deals (Storage Provider side). Can seal stored data into sectors. Can acquire
111-
storage consensus power. Can mine and produce blocks.
112-
113-
### Separating Systems
114-
115-
> How do we determine what functionality belongs in one system vs another?
116-
117-
Drawing boundaries between systems is the art of separating tightly related functionality from unrelated parts.
118-
In a sense, we seek to keep tightly integrated components in the same system, and away from other unrelated
119-
components. This is sometimes straightforward, the boundaries naturally spring from the data structures or
120-
functionality. For example, it is straightforward to observe that Clients and Miners negotiating a deal
121-
with each other is very unrelated to VM Execution.
122-
123-
Sometimes this is harder, and it requires detangling, adding, or removing abstractions. For
124-
example, the `StoragePowerActor` and the `StorageMarketActor` were a single `Actor` previously. This caused
125-
a large coupling of functionality across `StorageDeal` making, the `StorageMarket`, markets in general, with
126-
Storage Mining, Sector Sealing, PoSt Generation, and more. Detangling these two sets of related functionality
127-
requried breaking apart the one actor into two.
128-
129-
### Decomposing within a System
130-
131-
Systems themselves decompose into smaller subunits. These are sometimes called "subsystems" to avoid confusion
132-
with the much larger, first-class Systems. Subsystems themselves may break down further. The naming here is not
133-
strictly enforced, as these subdivisions are more related to protocol and implementation engineering concerns
134-
than to user capabilities.
3+
weight: 6
4+
bookCollapseSection: true
5+
---
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
---
2+
title: Implementing Systems
3+
weight: 2
4+
---
5+
6+
# Implementing Systems
7+
---
8+
9+
## System Requirements
10+
11+
In order to make it easier to decouple functionality into systems, the Filecoin Protocol assumes
12+
a set of functionality available to all systems. This functionality can be achieved by implementations
13+
in a variety of ways, and should take the guidance here as a recommendation (SHOULD).
14+
15+
All Systems, as defined in this document, require the following:
16+
17+
- **Repository:**
18+
- **Local `IpldStore`.** Some amount of persistent local storage for data structures (small structured objects).
19+
Systems expect to be initialized with an IpldStore in which to store data structures they expect to persist across crashes.
20+
- **User Configuration Values.** A small amount of user-editable configuration values.
21+
These should be easy for end-users to access, view, and edit.
22+
- **Local, Secure `KeyStore`.** A facility to use to generate and use cryptographic keys, which MUST remain secret to the
23+
Filecoin Node. Systems SHOULD NOT access the keys directly, and should do so over an abstraction (ie the `KeyStore`) which
24+
provides the ability to Encrypt, Decrypt, Sign, SigVerify, and more.
25+
- **Local `FileStore`.** Some amount of persistent local storage for files (large byte arrays).
26+
Systems expect to be initialized with a FileStore in which to store large files.
27+
Some systems (like Markets) may need to store and delete large volumes of smaller files (1MB - 10GB).
28+
Other systems (like Storage Mining) may need to store and delete large volumes of large files (1GB - 1TB).
29+
- **Network.** Most systems need access to the network, to be able to connect to their counterparts in other Filecoin Nodes.
30+
Systems expect to be initialized with a `libp2p.Node` on which they can mount their own protocols.
31+
- **Clock.** Some systems need access to current network time, some with low tolerance for drift.
32+
Systems expect to be initialized with a Clock from which to tell network time. Some systems (like Blockchain)
33+
require very little clock drift, and require _secure_ time.
34+
35+
For this purpose, we use the `FilecoinNode` data structure, which is passed into all systems at initialization:
36+
37+
{{<embed src="../../systems/filecoin_nodes/node_base/filecoin_node.id" lang="go">}}
38+
39+
{{<embed src="../../systems/filecoin_nodes/repository/repository_subsystem.id" lang="go" >}}
40+
41+
## System Limitations
42+
43+
Further, Systems MUST abide by the following limitations:
44+
45+
- **Random crashes.** A Filecoin Node may crash at any moment. Systems must be secure and consistent through crashes.
46+
This is primarily achived by limiting the use of persistent state, persisting such state through Ipld data structures,
47+
and through the use of initialization routines that check state, and perhaps correct errors.
48+
- **Isolation.** Systems must communicate over well-defined, isolated interfaces. They must not build their critical
49+
functionality over a shared memory space. (Note: for performance, shared memory abstractions can be used to power
50+
IpldStore, FileStore, and libp2p, but the systems themselves should not require it.) This is not just an operational
51+
concern; it also significantly simplifies the protocol and makes it easier to understand, analyze, debug, and change.
52+
- **No direct access to host OS Filesystem or Disk.** Systems cannot access disks directly -- they do so over the FileStore
53+
and IpldStore abstractions. This is to provide a high degree of portability and flexibility for end-users, especially
54+
storage miners and clients of large amounts of data, which need to be able to easily replace how their Filecoin Nodes
55+
access local storage.
56+
- **No direct access to host OS Network stack or TCP/IP.** Systems cannot access the network directly -- they do so over the
57+
libp2p library. There must not be any other kind of network access. This provides a high degree of portability across
58+
platforms and network protocols, enabling Filecoin Nodes (and all their critical systems) to run in a wide variety of
59+
settings, using all kinds of protocols (eg Bluetooth, LANs, etc).

next/content/intro/systems/system.id

Expand all lines: next/content/intro/systems/system.id
Whitespace-only changes.

0 commit comments

Comments
 (0)
0