Skip to content

Commit

Permalink
steps to reproduce
Browse files Browse the repository at this point in the history
  • Loading branch information
Connoropolous committed Feb 1, 2019
1 parent 4dc29f9 commit 0197dba
Show file tree
Hide file tree
Showing 10 changed files with 7,825 additions and 319 deletions.
38 changes: 38 additions & 0 deletions README.md
@@ -1,3 +1,41 @@
To see the networking bug...

In a terminal, run

`holochain_container -c ./container-config.toml`

Note the bootstrap node from the debug logs, should look like:
/ip4/192.168.1.182/tcp/36497/ipfs/QmQxMSMCtetqXbSbANHCahQ6iUTYbrURcT7r6ZHnaRNYbH

Add that to the following line of `container-config-2.toml`
bootstrap_nodes = ["/ip4..."]

In another terminal, now run
`holochain_container -c ./container-config-2.toml`

In browsers, open up
/ui/index.html and
/ui2/index.html

In one, create an entry, note the address

In the other, attempt to get the entry at the address. The entry won't be found.

we've identified through debugging that the issue where, with two nodes, one fails to 'hold' an entry that has been gossiped to it, this is what we know (condensed):
it enters the hold_entry_workflow, but doesn't proceed past this line: https://github.com/holochain/holochain-rust/blob/develop/core/src/workflows/hold_entry.rs#L24
It goes through reduce_get_validation_package, and eventually ends up calling this function, that is the deepest that I could get a println!, in net_connection_thread
https://github.com/holochain/holochain-rust/blob/develop/net_connection/src/net_connection_thread.rs#L27

It does not seem that the message actually gets dispatched though. At least, the other node does not show any signs of receiving a request_validation_package message

We did a bunch of debugging to get as far as we did, which I pushed my debugging statements to this branch:
https://github.com/holochain/holochain-rust/commit/639807497e0371e5a77355123aa7ff764f7a6905

Which, if you rebuild your container binary, you will get the debugging logs




# simple-app

[![Project](https://img.shields.io/badge/project-holochain-blue.svg?style=flat-square)](http://holochain.org/)
Expand Down
152 changes: 69 additions & 83 deletions bundle.json

Large diffs are not rendered by default.

57 changes: 57 additions & 0 deletions container-config-2.toml
@@ -0,0 +1,57 @@
[network]
n3h_path = "/Users/connor/code/holochain/n3h"
n3h_persistence_path = "/tmp"
bootstrap_nodes = ["/ip4/192.168.1.162/tcp/55013/ipfs/QmVYyr7eg3NEZpQbigKqUrpG256MZfNU1CioeWLJNaexBe"]

[[agents]]
id = "test_agent1"
name = "HoloTester1"
public_address = "sandwich--------------------------------------------------------------------------AAAEqzh28L"
key_file = "holo_tester.key"

[[agents]]
id = "test_agent2"
name = "HoloTester2"
public_address = "bagel-----------------------------------------------------------------------------AAADAq0mCu"
key_file = "holo_tester.key"

[[agents]]
id = "test_agent3"
name = "HoloTester3"
public_address = "croissant-------------------------------------------------------------------------AAAEuHzxV4"
key_file = "holo_tester.key"

[[dnas]]
id = "simple_app_dna"
file = "bundle.json"
hash = "Qm328wyq38924y"


[[instances]]
id = "test-instance1"
dna = "simple_app_dna"
agent = "test_agent2"
[instances.storage]
type = "file"
path = "./tmp-storage2"


[[interfaces]]
id = "websocket_interface"
[interfaces.driver]
type = "websocket"
port = 8889
[[interfaces.instances]]
id = "test-instance1"


[logger]
type = "debug"
[[logger.rules.rules]]
pattern = "^err/"
color = "red"
[[logger.rules.rules]]
pattern = "^debug/dna"
color = "white"
[[logger.rules.rules]]
pattern = ".*"
10 changes: 4 additions & 6 deletions container-config.toml
@@ -1,7 +1,7 @@
[network]
n3h_path = "/Users/philipbeadle/holochain/Holochain/n3h"
n3h_path = "/Users/connor/code/holochain/n3h"
n3h_persistence_path = "/tmp"
bootstrap_nodes = ["/ip4/192.168.1.182/tcp/39629/ipfs/QmTZHqc4x1h2fCQYrLFQs8o9UF6BBBWrL1CkdWRHvZ2UpU"]
bootstrap_nodes = []

[[agents]]
id = "test_agent1"
Expand All @@ -21,9 +21,6 @@ name = "HoloTester3"
public_address = "croissant-------------------------------------------------------------------------AAAEuHzxV4"
key_file = "holo_tester.key"




[[dnas]]
id = "simple_app_dna"
file = "bundle.json"
Expand All @@ -35,7 +32,8 @@ id = "test-instance1"
dna = "simple_app_dna"
agent = "test_agent1"
[instances.storage]
type = "memory"
type = "file"
path = "./tmp-storage"


[[interfaces]]
Expand Down
116 changes: 0 additions & 116 deletions dna/simple-app.hcpkg

This file was deleted.

109 changes: 0 additions & 109 deletions dna/simple_app.hcpkg

This file was deleted.

10 changes: 5 additions & 5 deletions ui/index.html
Expand Up @@ -11,7 +11,7 @@

<script type="text/javascript">

node("8888","test-instance")
node("8888","test-instance1")

function node(port,instance_id) {
const html = '<h3>Node for ## at @@</h3>\
Expand Down Expand Up @@ -40,7 +40,7 @@
e.preventDefault()

const content = document.querySelector('#message'+instance_id).value
call(instance_id, 'simple', 'main', 'share_item')({
call(instance_id, 'simple', 'share_item')({
item: {content: content}
}).then(result => console.log(result))
})
Expand All @@ -49,7 +49,7 @@
e.preventDefault()

const content = document.querySelector('#address'+instance_id).value
call(instance_id, 'simple', 'main', 'get_item')({
call(instance_id, 'simple', 'get_item')({
address: content
}).then(result => console.log(result))
})
Expand All @@ -59,7 +59,7 @@

const base = document.querySelector('#base'+instance_id).value
const target = document.querySelector('#target'+instance_id).value
call(instance_id, 'simple', 'main', 'add_link')({
call(instance_id, 'simple', 'add_link')({
base: base,
target: target
}).then(result => console.log(result))
Expand All @@ -69,7 +69,7 @@
e.preventDefault()

const base = document.querySelector('#links_base'+instance_id).value
call(instance_id, 'simple', 'main', 'get_links')({
call(instance_id, 'simple', 'get_links')({
base: base
}).then(result => console.log(result))
})
Expand Down

0 comments on commit 0197dba

Please sign in to comment.