<feed xmlns='http://www.w3.org/2005/Atom'>
<title>go-tangerine/swarm/network/simulation, branch master</title>
<subtitle>Tangerine full node (https://github.com/tangerine-network/go-tangerine)
</subtitle>
<id>https://lant.com.tw/~lantw44/cgit/cgit.cgi/go-tangerine/atom?h=master</id>
<link rel='self' href='https://lant.com.tw/~lantw44/cgit/cgit.cgi/go-tangerine/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://lant.com.tw/~lantw44/cgit/cgit.cgi/go-tangerine/'/>
<updated>2019-09-17T08:57:29+00:00</updated>
<entry>
<title>Rebrand as tangerine-network/go-tangerine</title>
<updated>2019-09-17T08:57:29+00:00</updated>
<author>
<name>Wei-Ning Huang</name>
<email>w@byzantine-lab.io</email>
</author>
<published>2019-06-12T09:31:08+00:00</published>
<link rel='alternate' type='text/html' href='https://lant.com.tw/~lantw44/cgit/cgit.cgi/go-tangerine/commit/?id=ac088de6322fc16ebe75c2e5554be73754bf1fe2'/>
<id>urn:sha1:ac088de6322fc16ebe75c2e5554be73754bf1fe2</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Change import go github.com/dexon-foundation/dexon</title>
<updated>2019-06-12T09:23:38+00:00</updated>
<author>
<name>Wei-Ning Huang</name>
<email>w@cobinhood.com</email>
</author>
<published>2018-09-26T02:48:31+00:00</published>
<link rel='alternate' type='text/html' href='https://lant.com.tw/~lantw44/cgit/cgit.cgi/go-tangerine/commit/?id=21cbe9d5b1630be351329a5715fd599030a00122'/>
<id>urn:sha1:21cbe9d5b1630be351329a5715fd599030a00122</id>
<content type='text'>
</content>
</entry>
<entry>
<title>p2p, swarm: fix node up races by granular locking (#18976)</title>
<updated>2019-02-19T12:11:52+00:00</updated>
<author>
<name>Ferenc Szabo</name>
<email>frncmx@gmail.com</email>
</author>
<published>2019-02-18T06:38:14+00:00</published>
<link rel='alternate' type='text/html' href='https://lant.com.tw/~lantw44/cgit/cgit.cgi/go-tangerine/commit/?id=88577076069664b026736d8afb9b708fb26da54a'/>
<id>urn:sha1:88577076069664b026736d8afb9b708fb26da54a</id>
<content type='text'>
* swarm/network: DRY out repeated giga comment

I not necessarily agree with the way we wait for event propagation.
But I truly disagree with having duplicated giga comments.

* p2p/simulations: encapsulate Node.Up field so we avoid data races

The Node.Up field was accessed concurrently without "proper" locking.
There was a lock on Network and that was used sometimes to access
the  field. Other times the locking was missed and we had
a data race.

For example: https://github.com/ethereum/go-ethereum/pull/18464
The case above was solved, but there were still intermittent/hard to
reproduce races. So let's solve the issue permanently.

resolves: ethersphere/go-ethereum#1146

* p2p/simulations: fix unmarshal of simulations.Node

Making Node.Up field private in 13292ee897e345045fbfab3bda23a77589a271c1
broke TestHTTPNetwork and TestHTTPSnapshot. Because the default
UnmarshalJSON does not handle unexported fields.

Important: The fix is partial and not proper to my taste. But I cut
scope as I think the fix may require a change to the current
serialization format. New ticket:
https://github.com/ethersphere/go-ethereum/issues/1177

* p2p/simulations: Add a sanity test case for Node.Config UnmarshalJSON

* p2p/simulations: revert back to defer Unlock() pattern for Network

It's a good patten to call `defer Unlock()` right after `Lock()` so
(new) error cases won't miss to unlock. Let's get back to that pattern.

The patten was abandoned in 85a79b3ad3c5863f8612d25c246bcfad339f36b7,
while fixing a data race. That data race does not exist anymore,
since the Node.Up field got hidden behind its own lock.

* p2p/simulations: consistent naming for test providers Node.UnmarshalJSON

* p2p/simulations: remove JSON annotation from private fields of Node

As unexported fields are not serialized.

* p2p/simulations: fix deadlock in Network.GetRandomDownNode()

Problem: GetRandomDownNode() locks -&gt; getDownNodeIDs() -&gt;
GetNodes() tries to lock -&gt; deadlock

On Network type, unexported functions must assume that `net.lock`
is already acquired and should not call exported functions which
might try to lock again.

* p2p/simulations: ensure method conformity for Network

Connect* methods were moved to p2p/simulations.Network from
swarm/network/simulation. However these new methods did not follow
the pattern of Network methods, i.e., all exported method locks
the whole Network either for read or write.

* p2p/simulations: fix deadlock during network shutdown

`TestDiscoveryPersistenceSimulationSimAdapter` often got into deadlock.
The execution was stuck on two locks, i.e, `Kademlia.lock` and
`p2p/simulations.Network.lock`. Usually the test got stuck once in each
20 executions with high confidence.

`Kademlia` was stuck in `Kademlia.EachAddr()` and `Network` in
`Network.Stop()`.

Solution: in `Network.Stop()` `net.lock` must be released before
calling `node.Stop()` as stopping a node (somehow - I did not find
the exact code path) causes `Network.InitConn()` to be called from
`Kademlia.SuggestPeer()` and that blocks on `net.lock`.

Related ticket: https://github.com/ethersphere/go-ethereum/issues/1223

* swarm/state: simplify if statement in DBStore.Put()

* p2p/simulations: remove faulty godoc from private function

The comment started with the wrong method name.

The method is simple and self explanatory. Also, it's private.
=&gt; Let's just remove the comment.

(cherry picked from commit 50b872bf05b8644f14b9bea340092ced6968dd59)
</content>
</entry>
<entry>
<title>swarm/network: Saturation check for healthy networks (#19071)</title>
<updated>2019-02-19T12:11:52+00:00</updated>
<author>
<name>holisticode</name>
<email>holistic.computing@gmail.com</email>
</author>
<published>2019-02-14T18:01:50+00:00</published>
<link rel='alternate' type='text/html' href='https://lant.com.tw/~lantw44/cgit/cgit.cgi/go-tangerine/commit/?id=5de6b6b529ea3fc0ad5cd9791d5f3ac44f497d65'/>
<id>urn:sha1:5de6b6b529ea3fc0ad5cd9791d5f3ac44f497d65</id>
<content type='text'>
* swarm/network: new saturation for  implementation

* swarm/network: re-added saturation func in Kademlia as it is used elsewhere

* swarm/network: saturation with higher MinBinSize

* swarm/network: PeersPerBin with depth check

* swarm/network: edited tests to pass new saturated check

* swarm/network: minor fix saturated check

* swarm/network/simulations/discovery: fixed renamed RPC call

* swarm/network: renamed to isSaturated and returns bool

* swarm/network: early depth check

(cherry picked from commit 2af24724dd5f3ab1994001854eb32c6a19f9f64a)
</content>
</entry>
<entry>
<title>p2p/simulations: eliminate concept of pivot (#18426)</title>
<updated>2019-01-11T09:23:45+00:00</updated>
<author>
<name>Ferenc Szabo</name>
<email>frncmx@gmail.com</email>
</author>
<published>2019-01-11T09:23:45+00:00</published>
<link rel='alternate' type='text/html' href='https://lant.com.tw/~lantw44/cgit/cgit.cgi/go-tangerine/commit/?id=2eb838ed9776c9c3ec922e1116a5d50babda31c5'/>
<id>urn:sha1:2eb838ed9776c9c3ec922e1116a5d50babda31c5</id>
<content type='text'>
</content>
</entry>
<entry>
<title>swarm/network: Rename minproxbinsize, add as member of simulation (#18408)</title>
<updated>2019-01-10T11:33:51+00:00</updated>
<author>
<name>lash</name>
<email>nolash@users.noreply.github.com</email>
</author>
<published>2019-01-10T11:33:51+00:00</published>
<link rel='alternate' type='text/html' href='https://lant.com.tw/~lantw44/cgit/cgit.cgi/go-tangerine/commit/?id=7240f4d800d3ffb97cf23a27d13746428d761cec'/>
<id>urn:sha1:7240f4d800d3ffb97cf23a27d13746428d761cec</id>
<content type='text'>
* swarm/network: Rename minproxbinsize, add as member of simulation

* swarm/network: Deactivate WaitTillHealthy, unreliable pending suggestpeer
</content>
</entry>
<entry>
<title>swarm: Fix T.Fatal inside a goroutine in tests (#18409)</title>
<updated>2019-01-09T06:05:55+00:00</updated>
<author>
<name>Janoš Guljaš</name>
<email>janos@users.noreply.github.com</email>
</author>
<published>2019-01-09T06:05:55+00:00</published>
<link rel='alternate' type='text/html' href='https://lant.com.tw/~lantw44/cgit/cgit.cgi/go-tangerine/commit/?id=d70c4faf20d5533e30eec5cbb9b5180eb837b78c'/>
<id>urn:sha1:d70c4faf20d5533e30eec5cbb9b5180eb837b78c</id>
<content type='text'>
* swarm/storage: fix T.Fatal inside a goroutine

* swarm/network/simulation: fix T.Fatal inside a goroutine

* swarm/network/stream: fix T.Fatal inside a goroutine

* swarm/network/simulation: consistent failures in TestPeerEventsTimeout

* swarm/network/simulation: rename sendRunSignal to triggerSimulationRun
</content>
</entry>
<entry>
<title>A few minor code inspection fixes (#18393)</title>
<updated>2019-01-06T10:58:57+00:00</updated>
<author>
<name>Ferenc Szabo</name>
<email>frncmx@gmail.com</email>
</author>
<published>2019-01-06T10:58:57+00:00</published>
<link rel='alternate' type='text/html' href='https://lant.com.tw/~lantw44/cgit/cgit.cgi/go-tangerine/commit/?id=fe03b76ffe9f9d48b09f4d93f18fae1e5ad4c1f4'/>
<id>urn:sha1:fe03b76ffe9f9d48b09f4d93f18fae1e5ad4c1f4</id>
<content type='text'>
* swarm/network: fix code inspection problems

- typos
- redundant import alias

* p2p/simulations: fix code inspection problems

- typos
- unused function parameters
- redundant import alias
- code style issue: snake case

* swarm/network: fix unused method parameters inspections
</content>
</entry>
<entry>
<title>swarm/network: Revised depth and health for Kademlia (#18354)</title>
<updated>2018-12-22T05:53:30+00:00</updated>
<author>
<name>lash</name>
<email>nolash@users.noreply.github.com</email>
</author>
<published>2018-12-22T05:53:30+00:00</published>
<link rel='alternate' type='text/html' href='https://lant.com.tw/~lantw44/cgit/cgit.cgi/go-tangerine/commit/?id=5e4fd8e7dbfe701b3b544c52c433c5d7c2e302c3'/>
<id>urn:sha1:5e4fd8e7dbfe701b3b544c52c433c5d7c2e302c3</id>
<content type='text'>
* swarm/network: Revised depth calculation with tests

* swarm/network: WIP remove redundant "full" function

* swarm/network: WIP peerpot refactor

* swarm/network: Make test methods submethod of peerpot and embed kad

* swarm/network: Remove commented out code

* swarm/network: Rename health test functions

* swarm/network: Too many n's

* swarm/network: Change hive Healthy func to accept addresses

* swarm/network: Add Healthy proxy method for api in hive

* swarm/network: Skip failing test out of scope for PR

* swarm/network: Skip all tests dependent on SuggestPeers

* swarm/network: Remove commented code and useless kad Pof member

* swarm/network: Remove more unused code, add counter on depth test errors

* swarm/network: WIP Create Healthy assertion tests

* swarm/network: Roll back health related methods receiver change

* swarm/network: Hardwire network minproxbinsize in swarm sim

* swarm/network: Rework Health test to strict

Pending add test for saturation
And add test for as many as possible up to saturation

* swarm/network: Skip discovery tests (dependent on SuggestPeer)

* swarm/network: Remove useless minProxBinSize in stream

* swarm/network: Remove unnecessary testing.T param to assert health

* swarm/network: Implement t.Helper() in checkHealth

* swarm/network: Rename check back to assert now that we have helper magic

* swarm/network: Revert WaitTillHealthy change (deferred to nxt PR)

* swarm/network: Kademlia tests GotNN =&gt; ConnectNN

* swarm/network: Renames and comments

* swarm/network: Add comments
</content>
</entry>
<entry>
<title>p2p/simulation: Test snapshot correctness and minimal benchmark (#18287)</title>
<updated>2018-12-21T05:22:11+00:00</updated>
<author>
<name>lash</name>
<email>nolash@users.noreply.github.com</email>
</author>
<published>2018-12-21T05:22:11+00:00</published>
<link rel='alternate' type='text/html' href='https://lant.com.tw/~lantw44/cgit/cgit.cgi/go-tangerine/commit/?id=e1edfe0689966d5b5fcee530a96c31dd28aea95c'/>
<id>urn:sha1:e1edfe0689966d5b5fcee530a96c31dd28aea95c</id>
<content type='text'>
* p2p/simulation: WIP minimal snapshot test

* p2p/simulation: Add snapshot create, load and verify to snapshot test

* build: add test tag for tests

* p2p/simulations, build: Revert travis change, build test sym always

* p2p/simulations: Add comments, timeout check on additional events

* p2p/simulation: Add benchmark template for minimal peer protocol init

* p2p/simulations: Remove unused code

* p2p/simulation: Correct timer reset

* p2p/simulations: Put snapshot check events in buffer and call blocking

* p2p/simulations: TestSnapshot fail if Load function returns early

* p2p/simulations: TestSnapshot wait for all connections before returning

* p2p/simulation: Revert to before wait for snap load (5e75594)

* p2p/simulations: add "conns after load" subtest to TestSnapshot

and nudge
</content>
</entry>
</feed>
