Referneces and inline sources

This commit is contained in:
Sarah Jamie Lewis 2019-11-11 16:41:42 -08:00
parent ddb78fe62a
commit fd5cf554b4
20 changed files with 165 additions and 52 deletions

1
citing/cite.go Normal file
View File

@ -0,0 +1 @@
package citing

19
data/aggregation.kdb Normal file
View File

@ -0,0 +1,19 @@
Usually modelled through chemotaxis
There are a few parameters we can control in the slimemold model. The main ones are:
1. Density of Slimes
2. How much pheromone they drop
3. Diffusion/Evaporation Rate of the pheromone
4. Pheromone Detection
These all result in different outcomes.
For example, if you increase the density, you end up with world filled with pheromones very quickly. But the model eventually starts to converge to aggregation.
Aggregation is however very sensitive to the density of pheromone. At half strength, aggregation still happens, but the clusters are much smaller.
Any lower and aggregation stops.
typeof:consensus

View File

@ -0,0 +1,6 @@
consensus
Impossibility Result
No solution for the 3 generals problem (in which messages are oral/unsigned) exists cite;-f:3:-y:650;https://people.eecs.berkeley.edu/~luca/cs174/byzantine.pdf cite;-f:4;https://people.eecs.berkeley.edu/~luca/cs174/byzantine.pdf as it is impossible to for an honest general/commander to determine who the traitor is (the ostensible originator or the message courier).

4
data/chemotaxis.kdb Normal file
View File

@ -0,0 +1,4 @@
movement of a motile cell or organism, or part of one, in a direction corresponding to a gradient of increasing or decreasing concentration of a particular substance.
* slimemold
* aggregation

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,3 +1,3 @@
The LotkaVolterra equations, also known as the predatorprey equations, are a pair of first-order nonlinear differential equations, frequently used to describe the dynamics of biological systems in which two species interact, one as a predator and the other as
The LotkaVolterra equations, also known as the instance:predator-prey equations, are a pair of first-order nonlinear differential equations, frequently used to describe the dynamics of biological systems in which two species interact, one as a predator and the other as prey
See Also: instance:predator-prey

File diff suppressed because one or more lines are too long

21
data/references.kdb Normal file
View File

@ -0,0 +1,21 @@
@inproceedings{douceur2002sybil,
title={The sybil attack},
author={Douceur, John R},
booktitle={International workshop on peer-to-peer systems},
pages={251--260},
year={2002},
organization={Springer},
url={https://www.freehaven.net/anonbib/cache/sybil.pdf}
}
@article{lamport1982byzantine,
title={The Byzantine generals problem},
author={Lamport, Leslie and Shostak, Robert and Pease, Marshall},
journal={ACM Transactions on Programming Languages and Systems (TOPLAS)},
volume={4},
number={3},
pages={382--401},
year={1982},
publisher={ACM},
url={https://people.eecs.berkeley.edu/~luca/cs174/byzantine.pdf}
}

4
data/slimemold.kdb Normal file
View File

@ -0,0 +1,4 @@
instance:aggregation
Movement by chemotaxis

5
data/sybil-attack.kdb Normal file
View File

@ -0,0 +1,5 @@
Relating to malicious actors in peer to peer networks
see also: consensus
Naming: cite;-f:1;https://www.freehaven.net/anonbib/cache/sybil.pdf

View File

@ -1,4 +1,5 @@
Adjustment of a clock or watch to show the same time as another.
Models
* instance:lightning-bugs
* instance:predator-prey

View File

@ -1 +0,0 @@
dfgdf

View File

@ -0,0 +1,37 @@
A trivial intuition that one can derive from the construction of PBFT algorithms is that if number of peers (n) in a system is known/can be fixed, you can solve a lot of problems by defining models to require input from a threshold of n before taking an action.
We assume that such a system is immune to sybil attacks because n is fixed and known - new identities cannot be created, or the validation for new entities is outside the scope of consideration.
If you can combine such a threshold mechanism with a level of cryptographically verifiable pseudonyms ( and perhaps historical peer trust ratings), you can construct protocols that can make determinations about events within a group without necessarily reaching for consensus.
(By consensus I refer to traditional PBFT algorithms where more than two thirds of peers need to agree that more than two thirds of peers agree on a particular event)
I think that there probably exists a set of problems that can be solved in a metadata resistant system without an independent observer and without consensus i.e. problems that require knowing some state, but not every peer needs to know the same state (or agree on which state).
(see metadata resistant consensus for a definition of independent observer and the inspiration for this note)
To construct a trivial example, borrowing from CFDT, we can imagine an alarm flag represented by a single boolean value. The flag is false is the alarm has never been tripped, and true if it has been tripped. Once tripped the flag cannot be untripped. Any single peer within a group can sign a message and trip the alarm. Consensus is not needed. Which peer trips the alarm is also unimportant.
Above would be an example of a protocol requiring a threshold of 1/n. At 23 of peers you reach problems that require PBFT consensus. I think there are some useful solutions sitting in between.
Those problems have certain attributes:
They cannot require strict ordering of events - we are interested in systems without independent observers.
They cannot require consensus between nodes - we are interested in thresholds below 2/3n, see the literature for impossibility results of achieving consensus with less than that threshold of honest nodes.
They should not rely on peer correctness - while we assume sybils are not a problem, we do not assume that any single peer can be trusted, without additional information.
Our tripwire example might be seen as failing on point 3, a malicious peer could trip an alarm when no such alarm should have been tripped. As such the nature of the alarm matters. We can get around this for now by stating that our alarm is to indicate that there is a malicious actor within the group.
By introducing asymmetric trust into our protocols we can start to build more complex operations without relying on group consensus. If a peer trusts another peer, then they can weight their input higher than that of another peer, and thus reduce the threshold necessarily needed to reach a decision.
At the extreme end of the trust spectrum, if a peer trusts every other peer, then they will believe everything they are told, if they trust no peers, then they must weight for group consensus.
In between exists a world of chaotic trust whereby individual peers may make distinct determinations about the world. This is obviously not a desirable property for many kinds of actions within a decentralized group, but might be acceptable for some kinds of protocols.
My instincts tell me that there are ways of driving such protocols towards eventual consistency, but that eventual consistency is not necessarily a goal of such protocols.
As I write this I am drawn to make comparisons to alarm pheromones, indeed I think that there might be a strong analogy here, and that one example of a threshold consistency protocol that might have realistic application would be file storage among a group.
Bad actors within the group might attempt to gain an advantage of file access without contributing storage or bandwidth. Peers that do take on that burden might use a threshold consistency protocol / alarm pheromone to alert other peers to that untrustworthiness or to signify that they need to offload storage burden.
Such a protocol has not been well thought out and is but the seed of an idea, that I might be tempted to explore further in the future.

1
fetch/fetch.go Normal file
View File

@ -0,0 +1 @@
package fetch

View File

@ -66,15 +66,19 @@ func loadPage(title string) (*Page, error) {
concept := template.HTML(construct_graph(title))
linked := make(map[string]bool)
for _, word := range strings.Fields(body) {
if hasPage(word) {
body = strings.ReplaceAll(body, word, fmt.Sprintf("<a href='/view/%v/'>%v</a>", normalize(word), normalize(word)))
}
if strings.HasPrefix(word, "http") {
body = strings.ReplaceAll(body, word, fmt.Sprintf("<a href='%v'>%v</a>", word, word))
}
if strings.HasPrefix(word, "data:image/png;base64,") {
body = strings.ReplaceAll(body, word, fmt.Sprintf("<img width=200px height=200px src='%v'/>", word))
if !linked[normalize(word)] {
if hasPage(word) {
body = strings.ReplaceAll(body, word, fmt.Sprintf("<a href='/view/%v/'>%v</a>", normalize(word), normalize(word)))
}
if strings.HasPrefix(word, "http") {
body = strings.ReplaceAll(body, word, fmt.Sprintf("<a href='%v'>%v</a>", word, word))
}
if strings.HasPrefix(word, "data:image/png;base64,") {
body = strings.ReplaceAll(body, word, fmt.Sprintf("<img width=75%% height=75%% src='%v'/>", word))
}
linked[normalize(word)] = true
}
}
@ -100,23 +104,12 @@ func viewHandler(w http.ResponseWriter, r *http.Request) {
}
p, err := loadPage(title)
if err != nil {
http.Redirect(w, r, "/edit/"+title, http.StatusFound)
return
p = &Page{}
p.Title = title
}
renderTemplate(w, "view", p)
}
func editHandler(w http.ResponseWriter, r *http.Request) {
title, err := getTitle(w, r)
if err != nil {
return
}
p, err := loadPage(title)
if err != nil {
p = &Page{Title: title}
}
renderTemplate(w, "edit", p)
}
func saveHandler(w http.ResponseWriter, r *http.Request) {
title, err := getTitle(w, r)
@ -150,27 +143,32 @@ func get_links(name string) (links []string) {
func construct_graph(word string) string {
seen := make(map[string]bool)
graph := "digraph {\n\""+word+"\";\n"
graph := "digraph {\n ratio=\"compress\";size=\"8,4!\";splines=true;\""+word+"\";\n"
graph = construct_graph_sub(graph, word, seen, 1)
graph += "}"
ioutil.WriteFile("tmp.dot", []byte(graph), 0640)
subProcess := exec.Command("dot", "-Tsvg", "-otmp.svg", "tmp.dot")
subProcess := exec.Command("dot", "-Tsvg", "-otmp.svg","-Nfontname=Chilanka", "tmp.dot")
subProcess.Run()
subProcess.Wait()
data, _ := ioutil.ReadFile("tmp.svg")
return "<div class=\"conceptgraph\">"+strings.ReplaceAll(string(data), `<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">`, "")+"</svg>"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">`, "")
}
func construct_graph_sub(graph string, word string, seen map[string]bool, depth int) string {
if depth >= 0 {
} else {
return graph
//4b3557
}
links := get_links(normalize(word))
if !seen[normalize(word)] {
graph += fmt.Sprintf("\"%v\" [href=\"/view/%v\"];\n", normalize(word), normalize(word))
col := "fillcolor=\"white\""
if depth == 1 {
col = "fillcolor=\"#b09cbc\""
}
graph += fmt.Sprintf("\"%v\" [href=\"/view/%v\",%v,style=filled];\n", normalize(word), normalize(word),col)
}
seen[normalize(word)] = true
@ -187,7 +185,7 @@ func construct_graph_sub(graph string, word string, seen map[string]bool, depth
}
if !seen[normalize(word)+"++"+normalize(link)] || !seen[normalize(link)+"++"+normalize(word)] {
if normalize(word) != normalize(link) && (!seen[normalize(word)+"++"+normalize(link)] || !seen[normalize(link)+"++"+normalize(word)]) {
if strings.HasPrefix(link, "typeof:") {
graph += fmt.Sprintf("\"%v\" -> \"%v\" [style=dotted]\n", link[7:], word)
seen[word+"++"+link[7:]] = true
@ -201,7 +199,7 @@ func construct_graph_sub(graph string, word string, seen map[string]bool, depth
seen[word+"++"+link[9:]] = true
seen[link[9:]+"++"+word] = true
} else {
graph += fmt.Sprintf("\"%v\" -> \"%v\"\n", word, link)
graph += fmt.Sprintf("\"%v\" -> \"%v\" []\n", word, link)
}
seen[normalize(word)+"++"+normalize(link)] = true
@ -241,7 +239,6 @@ func indexHandler(w http.ResponseWriter, r *http.Request) {
func main() {
http.HandleFunc("/", indexHandler)
http.HandleFunc("/view/", viewHandler)
http.HandleFunc("/edit/", editHandler)
http.HandleFunc("/save/", saveHandler)
log.Fatal(http.ListenAndServe(":8080", nil))
}

View File

@ -1,6 +0,0 @@
<h1>Editing {{.Title}}</h1>
<form action="/save/{{.Title}}" method="POST">
<div><textarea name="body" rows="20" cols="80">{{printf "%s" .Body}}</textarea></div>
<div><input type="submit" value="Save"></div>
</form>