diff --git a/Cargo.lock b/Cargo.lock index 54bc795a0..4d349b4bb 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -65,9 +65,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.43" +version = "1.0.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28ae2b3dec75a406790005a200b1bd89785afc02517a00ca99ecfe093ee9e6cf" +checksum = "61604a8f862e1d5c3229fdd78f8b02c68dcf73a4c4b05fd636d12240aaa242c1" [[package]] name = "aquamarine" @@ -155,7 +155,7 @@ dependencies = [ "parking", "polling", "slab", - "socket2 0.4.1", + "socket2 0.4.2", "waker-fn", "winapi", ] @@ -299,7 +299,7 @@ version = "1.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad" dependencies = [ - "serde 1.0.129", + "serde 1.0.130", ] [[package]] @@ -387,9 +387,9 @@ checksum = "631ae5198c9be5e753e5cc215e1bd73c2b466a3565173db433f52bb9d3e66dba" [[package]] name = "cc" -version = "1.0.69" +version = "1.0.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e70cc2f62c6ce1868963827bd677764c62d07c3d9a3e1fb1177ee1a9ab199eb2" +checksum = "d26a6ce4b6a484fa3edb70f7efa6fc430fd2b87285fe8b84304fd0936faa0dc0" [[package]] name = "cfg-if" @@ -449,7 +449,7 @@ dependencies = [ "lazy_static", "nom", "rust-ini", - "serde 1.0.129", + "serde 1.0.130", "serde-hjson", "serde_json", "toml", @@ -560,9 +560,9 @@ dependencies = [ [[package]] name = "ctor" -version = "0.1.20" +version = "0.1.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e98e2ad1a782e33928b96fc3948e7c355e5af34ba4de7670fe8bac2a3b2006d" +checksum = "ccc0a48a9b826acdf4028595adc9db92caea352f7af011a3034acd172a52a0aa" dependencies = [ "quote", "syn", @@ -679,7 +679,7 @@ dependencies = [ "curve25519-dalek", "ed25519", "rand 0.7.3", - "serde 1.0.129", + "serde 1.0.130", "sha2", "zeroize", ] @@ -738,9 +738,9 @@ checksum = "37ab347416e802de484e4d03c7316c48f1ecb56574dfd4a46a80f173ce1de04d" [[package]] name = "flate2" -version = "1.0.21" +version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80edafed416a46fb378521624fab1cfa2eb514784fd8921adbe8a8d8321da811" +checksum = "1e6988e897c1c9c485f43b47a529cef42fde0547f9d8d41a7062518f1d8fc53f" dependencies = [ "cfg-if", "crc32fast", @@ -780,7 +780,7 @@ dependencies = [ "parking_lot", "rand 0.8.4", "rust-fsm", - "serde 1.0.129", + "serde 1.0.130", "thiserror", "tokio", "typestate", @@ -1071,9 +1071,9 @@ dependencies = [ [[package]] name = "if-addrs" -version = "0.6.5" +version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28538916eb3f3976311f5dfbe67b5362d0add1293d0a9cad17debf86f8e3aa48" +checksum = "c9a83ec4af652890ac713ffd8dc859e650420a5ef47f7b9be29b6664ab50fbc8" dependencies = [ "if-addrs-sys", "libc", @@ -1169,9 +1169,9 @@ checksum = "b71991ff56294aa922b450139ee08b3bfc70982c6b2c7562771375cf73542dd4" [[package]] name = "js-sys" -version = "0.3.53" +version = "0.3.55" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4bf49d50e2961077d9c99f4b7997d770a1114f087c3c2e0069b36c13fc2979d" +checksum = "7cc9ffccd38c451a86bf13657df244e9c3f37493cce8e5e21e940963777acc84" dependencies = [ "wasm-bindgen", ] @@ -1212,9 +1212,9 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.101" +version = "0.2.102" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3cb00336871be5ed2c8ed44b60ae9959dc5b9f08539422ed43f09e34ecaeba21" +checksum = "a2a5ac8f984bfcf3a823267e5fde638acc3325f6496633a5da6bb6eb2171e103" [[package]] name = "libp2p" @@ -1417,7 +1417,7 @@ dependencies = [ "log", "rand 0.8.4", "smallvec", - "socket2 0.4.1", + "socket2 0.4.2", "void", ] @@ -1591,7 +1591,7 @@ dependencies = [ "libc", "libp2p-core", "log", - "socket2 0.4.1", + "socket2 0.4.2", "tokio", ] @@ -1666,7 +1666,7 @@ dependencies = [ "libsecp256k1-gen-ecmult", "libsecp256k1-gen-genmult", "rand 0.7.3", - "serde 1.0.129", + "serde 1.0.130", "sha2", "typenum", ] @@ -1733,7 +1733,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "51b9bbe6c47d51fc3e1a9b945965946b4c44142ab8792c50835a980d362c2710" dependencies = [ "cfg-if", - "serde 1.0.129", + "serde 1.0.130", "value-bag", ] @@ -1846,7 +1846,7 @@ dependencies = [ "data-encoding", "multihash", "percent-encoding", - "serde 1.0.129", + "serde 1.0.130", "static_assertions", "unsigned-varint", "url", @@ -2135,9 +2135,9 @@ checksum = "ac74c624d6b2d21f425f752262f42188365d7b8ff1aff74c82e45136510a4857" [[package]] name = "proc-macro-crate" -version = "1.0.0" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41fdbd1df62156fbc5945f4762632564d7d038153091c3fcf1067f6aef7cff92" +checksum = "1ebace6889caf889b4d3f76becee12e90353f2b8c7d875534a71e5742f8f6f83" dependencies = [ "thiserror", "toml", @@ -2181,9 +2181,9 @@ checksum = "bc881b2c22681370c6a780e47af9840ef841837bc98118431d4e1868bd0c1086" [[package]] name = "proc-macro2" -version = "1.0.28" +version = "1.0.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c7ed8b8c7b886ea3ed7dde405212185f423ab44682667c8c6dd14aa1d9f6612" +checksum = "b9f5105d4fdaab20335ca9565e106a5d9b82b6219b5ba735731124ac6711d23d" dependencies = [ "unicode-xid", ] @@ -2521,9 +2521,9 @@ checksum = "9dad3f759919b92c3068c696c15c3d17238234498bbdcc80f2c469606f948ac8" [[package]] name = "serde" -version = "1.0.129" +version = "1.0.130" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1f72836d2aa753853178eda473a3b9d8e4eefdaf20523b919677e6de489f8f1" +checksum = "f12d06de37cf59146fbdecab66aa99f9fe4f78722e3607577a5375d66bd0c913" dependencies = [ "serde_derive", ] @@ -2542,9 +2542,9 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.129" +version = "1.0.130" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e57ae87ad533d9a56427558b516d0adac283614e347abf85b0dc0cbbf0a249f3" +checksum = "d7bc1a1ab1961464eae040d96713baa5a724a8152c1222492465b54322ec508b" dependencies = [ "proc-macro2", "quote", @@ -2553,13 +2553,13 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.67" +version = "1.0.68" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7f9e390c27c3c0ce8bc5d725f6e4d30a29d26659494aa4b17535f7522c5c950" +checksum = "0f690853975602e1bfe1ccbf50504d67174e3bcf340f23b5ea9992e0587a52d8" dependencies = [ "itoa", "ryu", - "serde 1.0.129", + "serde 1.0.130", ] [[package]] @@ -2583,9 +2583,9 @@ checksum = "2579985fda508104f7587689507983eadd6a6e84dd35d6d115361f530916fa0d" [[package]] name = "sha2" -version = "0.9.6" +version = "0.9.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9204c41a1597a8c5af23c82d1c921cb01ec0a4c59e07a9c7306062829a3903f3" +checksum = "b69f9a4c9740d74c5baa3fd2e547f9525fa8088a8a958e0ca2409a514e33f5fa" dependencies = [ "block-buffer", "cfg-if", @@ -2655,9 +2655,9 @@ dependencies = [ [[package]] name = "socket2" -version = "0.4.1" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "765f090f0e423d2b55843402a07915add955e7d60657db13707a159727326cad" +checksum = "5dc90fe6c7be1a323296982db1836d1ea9e47b6839496dde9a541bc496df3516" dependencies = [ "libc", "winapi", @@ -2705,9 +2705,9 @@ checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" [[package]] name = "syn" -version = "1.0.75" +version = "1.0.76" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7f58f7e8eaa0009c5fec437aabf511bd9933e4b2d7407bd05273c01a8906ea7" +checksum = "c6f107db402c2c2055242dbf4d2af0e69197202e9faacbef9571bbe47f5a1b84" dependencies = [ "proc-macro2", "quote", @@ -2751,18 +2751,18 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.26" +version = "1.0.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93119e4feac1cbe6c798c34d3a53ea0026b0b1de6a120deef895137c0529bfe2" +checksum = "602eca064b2d83369e2b2f34b09c70b605402801927c65c11071ac911d299b88" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.26" +version = "1.0.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "060d69a0afe7796bf42e9e2ff91f5ee691fb15c53d38b4b62a9a53eb23164745" +checksum = "bad553cc2c78e8de258400763a647e80e6d1b31ee237275d756f6836d204494c" dependencies = [ "proc-macro2", "quote", @@ -2771,9 +2771,9 @@ dependencies = [ [[package]] name = "tinyvec" -version = "1.3.1" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "848a1e1181b9f6753b5e96a092749e29b11d19ede67dfbbd6c7dc7e0f49b5338" +checksum = "5241dd6f21443a3606b432718b166d3cedc962fd4b8bea54a8bc7f514ebda986" dependencies = [ "tinyvec_macros", ] @@ -2786,9 +2786,9 @@ checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" [[package]] name = "tokio" -version = "1.10.1" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92036be488bb6594459f2e03b60e42df6f937fe6ca5c5ffdcb539c6b84dc40f5" +checksum = "b4efe6fc2395938c8155973d7be49fe8d03a843726e285e100a8a383cc0154ce" dependencies = [ "autocfg", "libc", @@ -2816,7 +2816,7 @@ version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a31142970826733df8241ef35dc040ef98c679ab14d7c3e54d827099b3acecaa" dependencies = [ - "serde 1.0.129", + "serde 1.0.130", ] [[package]] @@ -2866,9 +2866,9 @@ dependencies = [ [[package]] name = "typenum" -version = "1.13.0" +version = "1.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "879f6906492a7cd215bfa4cf595b600146ccfac0c79bcbd1f3000162af5e8b06" +checksum = "b63708a265f51345575b27fe43f9500ad611579e764c79edbc2037b1121959ec" [[package]] name = "typestate" @@ -2984,7 +2984,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bc5cf98d8186244414c848017f0e2676b3fcb46807f6668a97dfe67359a3c4b7" dependencies = [ "getrandom 0.2.3", - "serde 1.0.129", + "serde 1.0.130", "sha1", ] @@ -3036,9 +3036,9 @@ checksum = "fd6fbd9a79829dd1ad0cc20627bf1ed606756a7f77edff7b66b7064f9cb327c6" [[package]] name = "wasm-bindgen" -version = "0.2.76" +version = "0.2.78" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ce9b1b516211d33767048e5d47fa2a381ed8b76fc48d2ce4aa39877f9f183e0" +checksum = "632f73e236b219150ea279196e54e610f5dbafa5d61786303d4da54f84e47fce" dependencies = [ "cfg-if", "wasm-bindgen-macro", @@ -3046,9 +3046,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.76" +version = "0.2.78" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfe8dc78e2326ba5f845f4b5bf548401604fa20b1dd1d365fb73b6c1d6364041" +checksum = "a317bf8f9fba2476b4b2c85ef4c4af8ff39c3c7f0cdfeed4f82c34a880aa837b" dependencies = [ "bumpalo", "lazy_static", @@ -3061,9 +3061,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-futures" -version = "0.4.26" +version = "0.4.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95fded345a6559c2cfee778d562300c581f7d4ff3edb9b0d230d69800d213972" +checksum = "8e8d7523cb1f2a4c96c1317ca690031b714a51cc14e05f712446691f413f5d39" dependencies = [ "cfg-if", "js-sys", @@ -3073,9 +3073,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.76" +version = "0.2.78" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44468aa53335841d9d6b6c023eaab07c0cd4bddbcfdee3e2bb1e8d2cb8069fef" +checksum = "d56146e7c495528bf6587663bea13a8eb588d39b36b679d83972e1a2dbbdacf9" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -3083,9 +3083,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.76" +version = "0.2.78" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0195807922713af1e67dc66132c7328206ed9766af3858164fb583eedc25fbad" +checksum = "7803e0eea25835f8abdc585cd3021b3deb11543c6fe226dcd30b228857c5c5ab" dependencies = [ "proc-macro2", "quote", @@ -3096,9 +3096,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.76" +version = "0.2.78" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acdb075a845574a1fa5f09fd77e43f7747599301ea3417a9fbffdeedfc1f4a29" +checksum = "0237232789cf037d5480773fe568aac745bfe2afbc11a863e97901780a6b47cc" [[package]] name = "wasm-timer" @@ -3117,9 +3117,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.53" +version = "0.3.55" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "224b2f6b67919060055ef1a67807367c2066ed520c3862cc013d26cf893a783c" +checksum = "38eb105f1c59d9eaa6b5cdc92b859d85b926e82cb2e0945cd0c9259faa6fe9fb" dependencies = [ "js-sys", "wasm-bindgen", @@ -3212,9 +3212,9 @@ dependencies = [ [[package]] name = "x25519-dalek" -version = "1.1.1" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a0c105152107e3b96f6a00a65e86ce82d9b125230e1c4302940eca58ff71f4f" +checksum = "2392b6b94a576b4e2bf3c5b2757d63f10ada8020a2e4d08ac849ebcf6ea8e077" dependencies = [ "curve25519-dalek", "rand_core 0.5.1", diff --git a/docs/apps.md b/docs/apps.md new file mode 100644 index 000000000..af81d1f64 --- /dev/null +++ b/docs/apps.md @@ -0,0 +1,31 @@ +# Example applications + +Outlines of how specific applications would be implemented on F2. + +## Microblogging + +A contract would verify that values are signed by the private key corresponding to the +public key embedded in the contract. + +## Currency + + + +## Individual and group chat + +## Search engine / Discovery + +## Online store + +## Wikipedia + +# Services + +These are enabling services that can be provdied by freenet.org, in return for a memobership fee. + +* freenet.org email address and mail forwarding to a secure on-freenet inbox + +* web archiving service, will record value of a website at a specified time, and digitally sign it for use in other contracts + +* More generally, a system to execuite arbitrary wasm code with access off-freenet, execution can be paid for, result will + be public. This can be used to create contracts that depend on externally available information. diff --git a/docs/architecture.md b/docs/architecture.md new file mode 100644 index 000000000..c394b7d72 --- /dev/null +++ b/docs/architecture.md @@ -0,0 +1,62 @@ +# Architecture Layers + +## Transport + +Communication between peers is handled by libp2p, this includes: + +* Establishing direct P2P connection between peers, through NATs if necessary +* Encryption of communication +* Reliable transmission of data between peers + +## Small World Ring + +Establishes and maintain connection to other peers in a small-world ring, allowing +messages to be routed to peers based on their location in the ring. Maintains +small world topology as peers are disconnected and join. + +### Joining + +A new peer joins the network via a gateway, an "open" peer that accepts unilateral +connections and isn't behind a NAT. The joining peer's network location is negotiated +between that peer and the gateway such that neither can choose the new peer's location. + +### Load balancing + +Peers track how much CPU and bandwidth they use on behalf of other peers. Peers may +disconnect from other peers if they are consuming too many resources. Karma (see below) +may be used to establish a reputation initially. + +## Contract Store + +### Key/value store + +Store and retrieve keys and associated data, perhaps using SQLite implementing a +least-recently-used eviction policy. + +### Network operations + +#### Get + +Retrieve a contract's value. The contract webassembly is hashed, and the hash is +[converted](https://github.com/sanity/locutus/blob/master/src/main/kotlin/locutus/tools/math/Location.kt#L23) +to a location on the ring. The Get request is then "greedy routed" towards that +location. If/when the data is found it is returned along the same path to +the requestor, potentially being cached by peers along the way. + +##### Caching + +Peers will cache the closest data to their location, or the most requested data +once this can be observed. We will need to determine how to balance these two +overlapping goals. Peers subscribe to updates for the data they cache. + +#### Put + +Set or update the value of a contract. The put request is greedy routed to the +location of the contract on the ring. If a peer receives a put request and +it is the closest peer to that location that it's aware of it will cache it. +If a peer receives a put request for data other peers are subscribed to, it +will broadcast to those peers. + +#### Subscribe + +Listen for changes to a contract's value diff --git a/docs/components.md b/docs/components.md new file mode 100644 index 000000000..9b0b9a07e --- /dev/null +++ b/docs/components.md @@ -0,0 +1,62 @@ +# Components + +## Low-level transport + +Establish direct connections between Freenet nodes, performing NAT hole-punching where +necessary. These connections will be encrypted to prevent snooping, and endpoints will be +verified to prevent main-in-the-middle attacks. + +Support the seconding of short messages over these connections, and also the streaming +of data to allow the transmission of larger data. + +Provide a convenient interface to the low-level transport layer using struct serialization +and a callback mechanism for message responses to ensure the clarity and simplicity of +calling code. + +Libraries: +* LibP2P + +## Key-Value store + +A persistent local store of keys and values in which keys are cryptographic contracts +specified in [WebAssembly](https://en.wikipedia.org/wiki/WebAssembly). These contracts +specify whether some data is valid, for example by checking a digital signature, a +generalization of the concept of [content addressable storage](https://en.wikipedia.org/wiki/Content-addressable_storage), +as [pioneered](https://github.com/freenet/wiki/wiki/Signed-Subspace-Key) by FreenetV1. + +The key/value pairs are stored locally in a lightweight database. + +Relevant libraries: +* [SQLite](https://sqlite.org/) +* RocksDB +* LMDB +* [Sled](https://github.com/spacejam/sled) +* [Percy](https://persy.rs/) +* [Wasmer](https://wasmer.io/) + +## Small-world network + +A [small-world network](https://en.wikipedia.org/wiki/Small-world_routing), + a type of [distributed hashtable](https://en.wikipedia.org/wiki/Distributed_hash_table), +is used to allow key/value pairs to be stored and retrieved globally on the network in a way that is +robust, decentralized, scalable, and secure. The practical use of small world networks for this +purpose was pioneered by FreenetV1. + +A peer is assigned a location, a floating point value between 0.0 and 1.0 organized in a ring such that the +distance between 0.0 and 1.0 is zero. The network topology is arranged such that the probability of a connection +existing between two peers is inversely proportional to the distance between them. + +As peers join and leave the network existing peers will accept or reject new connections in order to +maintain the optimal network topology. + +## Load balancing + +Peers keep track of the bandwidth and CPU resources they consume while fulfilling requests from other peers, +the Wasmer WebAssembly library supports resource metering to facilitate this. Peers consuming excessive +resources may be throttled or disconnected. Peers will generally try to be helpful provided it doesn't +damage their reputations with other peers. + +## Default Apps + +While FreenetV2 is a platform, the core application will be immediately useful even before others begin +building on it. To achieve that we will provide default applications that meet the needs of \ No newline at end of file diff --git a/docs/karma.md b/docs/karma.md new file mode 100644 index 000000000..198d30885 --- /dev/null +++ b/docs/karma.md @@ -0,0 +1,6 @@ +# Karma + +A currency that can be acquired by making a donation to Freenet, or by +providing resources to the network. + +**This needs to be fleshed out** \ No newline at end of file diff --git a/docs/tech_summary.md b/docs/tech_summary.md new file mode 100644 index 000000000..5a937516e --- /dev/null +++ b/docs/tech_summary.md @@ -0,0 +1,92 @@ +# F2 technical summary + +*A decentralized application layer for the Internet* + +## Motivation + +In 2021, a handful of companies control almost the entire Internet infrastructure, with the ability and willingness to arbitrarily +censor or exclude any person or organization without recourse or accountability. + +F2 makes it easy to build entirely decentralized websites, social networking apps, online stores, search +engines, email, instant messaging, and discussion forums - the entire range of Internet usecases, and will be distributed +with versions of each of these apps, likely starting with email. + +## Platform + +F2 is an entirely decentralized key-value store with [observer semantics](https://en.wikipedia.org/wiki/Observer_pattern), +where keys are cryptographic contracts that specify what values are valid for key. This is a generalization of the +concept of "Signed Subspace Keys" from FreenetV1. + +As with FreenetV1, decentralization and scalability is achived through a [small world network](https://en.wikipedia.org/wiki/Small-world_network). + +This can be contrasted with the blockchain approach where every transaction must be broadcast globally, resulting in high [transaction fees](https://ycharts.com/indicators/ethereum_average_transaction_fee) that prohibit many applications (around US$5.50 per transaction in August 2021). + +Unlike many popular cryptocurrencies, F2 also avoids any costly reliance on [proof of work](https://en.wikipedia.org/wiki/Proof_of_work), +which was estimated to consume 148TWh per year in May 2021, or around 22 million metric tons of carbon dioxide emissions per year, higher than many countries. + +In addition to storage and retrieval of values under keys, F2 supports [observer semantics](https://en.wikipedia.org/wiki/Observer_pattern) +so applications can listen for changes to key values and be notified in realtime when they occur. + +For flexibility and efficiency, contracts are specified in [web assembly](https://en.wikipedia.org/wiki/WebAssembly), designed by the +World Wide Web Consortium as a replacement for in-browser JavaScript and rapidly growing in support and adoption. This will allow +new applications to be built on F2 without needing to constantly upgrade the node software. + +F2 is implemented in the [Rust](https://www.rust-lang.org/) programming language, which was selected for its speed, +robust security, and efficiency. + +## Applications + +* Email (Gmail, ProtonMail) +* Microblogging (Twitter, Facebook) +* Instant Messaging (Whatsapp, Telegram) +* Search (Google, Bing, Duck Duck Go) +* Online Store (Amazon, Ebay, Etsy) + +## Past Milestones + +### July 2020 + +* Design and prototyping began + +### August 2021 + +* Rust implementation begins + +### September 2021 + +* Second developer joins the team + +## Upcoming Milestones + +### September 2021 + +* Low-level networking and infrastructure +* Ring topology + +### October 2021 + +* Key-value store +* Web Assembly contracts +* Get/put/subscribe protocols + +### November 2021 + +* Key-value store WebSocket API +* Email app +* freenet.org email gateway + +### December 2021 + +* Microblogging app +* IM app + +### January 2022 + +* Online store app + +## History + +The original Freenet (FreenetV1) was based on the author's 1999 [paper](http://citeseer.ist.psu.edu/viewdoc/summary?doi=10.1.1.32.3665) +"A Distributed Decentralised Information Storage and Retrieval System". Freenet was the first distributed, decentralized, encrypted +peer-to-peer network, and pioneered concepts like [small world networks](https://en.wikipedia.org/wiki/Small-world_network), +and cryptographic contracts (also known as [signed subspace keys](https://freenetproject.org/papers/freenet-ieee.pdf)).