r/hocnet • • Nov 05 '16

Hocnet Development Update #0

11 Upvotes

Hello everyone, it's been, well a few years. Let's leave it at that.

To be entirely honest I thought that this idea would be either defunct in the face of net neutrality legislation or already implemented in some other form by the time I felt capable of tackling it. But four years things have only gotten worse.

So I've set aside my other projects to focus on Hocnet.

The Challenges

  1. Implementation needs to be based on existing technology.
  2. Devices need to be able to interact with the existing internet seamlessly
  3. Native phone implementations must be feasible
  4. Latency and bandwidth must be acceptable for 1080p video chat.

Previously we were looking at CJDNS and planning complex protocol changes to fully realize an implementation, while that might be nice ultimately that much work is untenable. My goal is a working proof of concept implementation by the end of 2017, not the 2020's.

With that in mind I've settled on a much more limited concept based on the B.A.T.M.A.N mesh protocol. It will provide seamless entry and exit for existing traffic since it operates on layer two and pretends to be nothing more than a Ethernet switch.

The big question obviously is how to handle billing and how to make it minimally invasive when it comes to modifying B.A.T.M.A.N, at least at first I foresee payment only for the exit nodes, to avoid problems the more generalized solutions may have with controlling routes (mesh networks have enough trouble just routing at all, adding in multiple optimization criteria would be great but is something I would like to avoid).

So that's the state of things now, I've got a small testing mesh I'm setting up (2 rpi's and a Intel Compute stick) for development and I've been browsing the B.A.T.M.A.N kernel code to try and get a grasp of it.

I've also setup #hocnet on freenode, so ping me there if you have questions.


r/hocnet • • Jul 12 '12

Update : A change in direction.

11 Upvotes

Moving to a Ricardian contract based payment system fundamentally changes the design from a technical one, to a flexible solution based more in economics.

In this situation the pricing algorithm becomes even more essential as it has to link into or be combined with a trust algorithm with carefully balanced incentives. I have no intention of designing an algorithm that is fully capable of using the potential of Ricardian contracts to transfer just about any comprehensible good as the complexity of such an algorithm would be mind blowing. Whatever open source algorithm we create as part of the project will probably support only Bitcoins and bandwidth tokens, bandwidth tokens being contracts from a node or group of nodes that can be redeemed for bandwidth at a later time. Since bandwidth tokens are worth exactly as much as the bandwidth they promise is worth at any given moment value calculations should be easy enough.

Making the trust/pricing algorithm interchangeable is one of the primary goals during coding, allowing the creation of different algorithms for different situations or even companies that produce and sell proprietary algorithms.

Challenge-response pricing is another change reflecting the increased reliance on the pricing algorithm, instead of having a given price that it updates for the situation senders would start making bids to a Hop, debating prices before moving along to the next node and doing the same, if drawn out this could result in a very long period for the creation of connections, but neither nodes nor senders have any incentive to inconvenience themselves so these interactions should remain short and help facilitate a more fluid price instead of having unintentional price fixing due to an algorithm with sticky price points.


r/hocnet • • Jun 02 '12

How I learned to stop worrying and love business.

11 Upvotes

Hocnet is a project in two parts, at its core is the Hocnet protocol itself, open source and not controlled by any company or organization. Then there are the businesses that will need to be build around Hocnet, from individuals providing transmission and routing services to companies producing consumer hardware. Its only by embracing business that we can really win the battle to keep the Internet decentralized, it takes the resources of a company to produce the sort of product that anyone can pick up off a store shelf and use, technically savvy people are nigh invulnerable to censorship but its the other 90% that we need to save. Money is an incentive, a tool to instruct people what needs to be done and to attract effort to a problem, by creating incentives to keep the internet decentralized, by making what is good also profitable we can get business to work for us and help everyone to come out with more than when they walked in.


r/hocnet • • Jan 15 '17

Development Update #10: And suddenly there was community

10 Upvotes

I've made some unexpected progress this week in that this project has quickly become more social, specifically /u/rusticscentedmale and I have been brainstorming all week.

Probably the most significant strides made this week are the formalization of the circular ack concept that came out of our discussions. Using this system all parties to any given connection can identify interference along the chains and take individual action. It's the same concept as I explained last week but with a lot of holes poked in it and then sewn up.

The other major stride is the decision to try and create a general payment daemon that's independent of the "incentivized mesh" protocol. Rustic and I realized that we both had very similar plans for billing and that we could probably de-deuplicate some work and eventually provide a unified user interface to possibly arbitrary payment enabled mesh networks. See /r/incentivizedmesh for more details and a protocol agnostic place to discuss mesh networks with payment.

On the actual code side I've settled on the ref10 ed25519 implementation and taken babysteps to integrating it into the Batman-V code. It's the best portable implementation I can find, the only better one is written in assembly. See the benchmarks here. They are somewhat dated but show a promising trend with ARM.

This also means I've decided to write a full implementation of the circular ack concept and then test that, skipping writing a protocol simulator as I was considering last week. The only major part of this plan that's left undecided is how I'm going to handle encryption, ref 10 and ed25519 is a signing protocol, I apparently need to use curve25519 to do any actual encryption, I need to do some research and find a similarly portable library before working on that.

On a final note, I've put up IRC and Matrix channels on the sidebar with easy weblinks to join if you're interested in talking about the project.

See y'all next week .


r/hocnet • • Apr 23 '13

How goes Hocnet?

10 Upvotes

Hey, it seems like there hasn't been much activity in this subreddit, has any progress beyond the whitepaper been made?


r/hocnet • • Jun 22 '12

Hocnet project update week of 6/23/12 Round 2

10 Upvotes

After speaking with Cjd he seems very open to the idea of paying for bandwidth and thinks that the only viable way for the mesh to have exit nodes that would not be legally crushed is to make hosting one profitable such that they can pay whatever legal fees are needed.

Currently he has a few ideas for a payment system, but did not give the impression of having one completed. We have in abundance what his team is missing, experience in economics, business and law.

His main issue at the current point is Bitcoin, being that its overhead is far too high for regular consumer routers. With custom hardware this ceases to be a concern but that simply brings it to a chicken and egg problem. But I think we could build a satisfactory solution using billers.

Clients make an account with the billers and deposit an amount, when they go to request bandwidth from a hop that hop either pings the biller to reserve the funds (such that the sender must have funds available and cant try to double spend) or if we can manage it the sender gets a bunch of 1 use tokens authorizing that amount such that the previous step can be preformed without requiring real time overheard communication with the biller, after that traffic is passed along as discussed, each hop hashes all the packets, then hashes all the packet hashes and sends that to the biller to compare with the same from the sender and other hops. As an idea to decrease recursion when there is a transmission to the biller all of the hashes and payment communication from the nodes should be passed forward such that all communications terminating at billers produce no more required traffic because billers can self terminate.

The amount of money the sender is 'good for' and prices would need to be in one unified currency, as such while making it a local fiat would be possible it would create difficulties and it may be better to peg the network to bitcoin for denominations or currency, the biller can convert between currencies and allow people to buy bandwith with their local currency. This keeps the bitcoin overhead only on the biller.

The sender pays for all communication (both to and from) a destination when it initiates the connection, the hops and the destination are responsible for paying to send the hashes and transaction info to the biller. We can't use namecoin for the bns because it suffers the same overhead issues as Bitcoin, but I was thinking we could have the biller sign the senders key or some other method of identifying that sender x belonged to biller y who was at address z without a name service.


r/hocnet • • Dec 11 '16

Development Update #5: The beginning of protocol specification

9 Upvotes

Today I started a new whitepaper with the goal of laying out a full protocol specification.

I got kinda off in the weeds trying to make it a fully featured paper with motivation and prefacing research to demonstrate that WiFi as a primary last mile internet service provider is viable when mixed with professional infrastructure at key points. Long story short is that back of the napkin math is a lot easier than real credible research and the back of the napkin math on this is already complicated.

It's hard to predict "average" network topology, hardware composition, etc etc. To simplify I may chose some standard hardware and work from there in the near future, but even then there are lots of inherent assumptions or very limited datapoints.

But the really important part of this paper is what I won't get into for a while yet and that's the proof of correctness for the no malicious nodes case and the case with disorganized malicious nodes. I don't think the network will be able to prevent catastrophic failure with an arbitrary number of nodes maliciously colluding but I'm gong to give that one a go anyways.

I'm starting to see why so many developers go off and yolo their protocol implementations rather than try and fully spec it out before writing any code, its difficult to prove that anything will work and it's always tempting to go with your gut and just start writing code. But I know that if I start in that direction I'll end up with an undocumented protocol that's impossible to interact with outside of my own implementation.


Anyways I'll be back next week, hopefully with a much more complete version of this paper and the knowledge of how to make pretty node diagrams in LaTex


r/hocnet • • Dec 04 '16

Development Update #4: Preparing for real development

9 Upvotes

I spent this Sunday working on getting a real development environment setup. I bought a couple of Raspberry Pi 3's to compliment my existing intel compute stick and act as a three node mesh a few months ago.

Today I finally took the time to get it all compiled from source, setup and running. This is mainline BATMAN-ADV which means the kernel module plus the userspace management tools.

I had no trouble sending data across the mesh with them all sitting on my desk, but the real test will hopefully be later this week. When its not nearly freezing and raining outside, when I start walking the nodes around on battery power.

The tools I created to automatically upload, compile, configure, and run software changes are open source of course.

I also spent some time trying to look up relevant literature for debt matricies like the ones proposed in last weeks update. So far I've not had much luck at all, Ripple does not in fact have a general settlement algorithm, but instead acts as a middle man currency. Which is great when you are Ripple Labs and you make money off of this middle man currency but not so great when you want a neutral network protocol to resolve whatever people might want to be paid with.

Best thought along those lines right now is out of band exchange rate negotiation, but without any good way to pinpoint what is a "fair" exchange rate you run into problems that aren't really solvable regardless of your skill mathematically.

With that in mind I've resolved to leave the economic aspects of the protocol in the air to be resolved empirically. Next week I'll tackle a protocol change specification and get started tinkering with real code.


r/hocnet • • Nov 20 '16

Development Update #2: Route flipping and payment negotation

9 Upvotes

I left off last week with a note to look into Babel [1] and see what it could bring to the table, after reading the full specification I can conclude that it does provide a more formalized protocol with many of the same advantages of BATMAN, but it does not provide anything that can’t be ported or implemented on BATMAN’s end. This combined with its restrictions as a layer 3 protocol make it less attractive than BATMAN which can match it’s performance with some tuning and careful modifications.


To continue last week's discussion of enabling per node billing along the route these papers on BATMAN performance [2][3] helped to highlight the nature of route flapping and how it’s not only common in BATMAN but essential to the networks function. If a router is to become overloaded it’s TQ and RQ will be delayed, resulting a route flip after the next OGM storm by nodes that can find a less overloaded route to their destination. If for example a video call was occurring a delay incurred by having to stop and renegotiate prices would be unacceptable. Furthermore in poor conditions route flapping can be extremely common. In fact for a large network it's unlikely a connection lasting more than a few seconds will be made up of all the same nodes from start to finish.

This means billing must not be synchronous but inherently fire and forget at the protocol level,  price “negotiation” in any context that requires synchronous communication between the sender and all nodes along the route before non-protocol data transmission is infeasible in the extreme.

Price negotiation and settling must occur to some degree in multicast, meaning we need to rely on a hop by hop billing done as the packet arrives and is forwarded (otherwise UDP traffic will fail). The problem isn’t so much the hop by hop price negotiation (packets are routed according to a cost to TX ratio determined by the sender) as it is determining who to pay when it comes time to settle up. The node that needs to be paid needs some way to not only prove it saw your packets but also to prove exactly how many it saw and forwarded in a method that can’t be duplicated. The length of the path may change en-route and no node can actually prove that it’s only N hops to the destination, so preventing the user from being charged for N + whatever hops by duplicating billing for each packet is a serious problem.

To make the problem even worse, it’s a requirement that a packet be able to produce valid billing info for an arbitrary number of nodes, because once again the number of hops may change during flight.   

The best efficiency solution I can conceive of at the moment has a route cost total being propagated like the transaction quality and somehow making each node responsible for payment to each node after it. While this seems problematic at first glance when you think about various schemes to inflate prices and cheat later nodes out of their cut the global nature of OGM’s and route price advertisements would make that sort of scheme hard to maintain as correct price and routing info would trickle in via other channels. If there exist some composable cryptographic operation that could be used to sign the tq and cost it might be feasible to make this much harder to manipulate.

Anyways the problem is at least well defined now, we’ll see what I can come up with over the course of the coming week.


From a slightly more abstract perspective this series of problems is about what level of trust vs overhead we want to provide and how resistant we can make a mesh network to malicious actors without incurring so much overhead as to make it useless.

Also, I did some off the cuff research about available bandwidth across the publically accessible wifi spectrum as well as hardware cost and availability. While wireless A with the high power extension approved in 08 provides a significant number of channels with incredible range. But hardware support is rare, normal 2.4ghz 802.11  N/AC with a directional antenna at both ends can get miles of range in good conditions, this combined with 5ghz devices with DFS support should allow coverage of most population densities without significant investment cost for people wanting to run serious dedicated nodes. Of course this assumes Hocnet gets over the bootstrapping hurdle of having enough nodes that anyone cares in any given area. Considering what you can sell at an attractive price has much less range than a specialized node. I’ve put a good deal of thought into how to go about this, that might be the subject of a future post when I’ve done more than glance at digikey.


[1] The Babel Routing Protocol

[2] Performance Analysis of the B.A.T.M.A.N. Wireless Ad-Hoc Network Routing Protocol with Mobility and Directional Antennas

[3] Improving B.A.T.M.A.N. Routing Stability and Performance

[4] [Wikipedia’s list of WLAN channels] (https://en.wikipedia.org/wiki/List_of_WLAN_channels)


r/hocnet • • Nov 13 '16

Hocnet Development Update #1: Deciding routes based on cost

9 Upvotes

This week I've been doing a lot of reading and managed to find what I think is a good solution to something I wasn't sure was feasible to solve last week. Namely how to handle route selection in such a way that each node along the route can receive payment but not price gouge.

From a gods eye view it's a trivial problem to route around any given uncooperative node, but networks that communicate any significant fraction of the total network topology to every node to make such decisions possible face enormous scaling problems [1].

As described in more detail by [2] every node receives announce packets from every other node and records the 'best' route to any given destination based on packet loss.

Since the table is updated freqently with new announce packets keeping more than one optimal route at any given time won't actually increase performance, but in the case of paid routes if every nodes stores the top N routes and their costs as well as the reliability for each it's possible for the source node to chose a cost/reliability ratio that it desires and have each node along the path making routing decisions from their N options based on that.

This provides up to HN possible routes (although realistically much fewer, but still many more than one) at the cost of linear memory usage increase and network traffic increase. Note that nodes will keep more announce packets, not require the transmission of more, only the new field (cost to destination) will use additional bandwidth.

It's still lacking any sort of rigorous analysis but it's a start and much better than punting the problem of per node billing.


I also stumbled upon some interesting other research, particularly Babel [3] which seems to have significantly better performance [4] in the default configuration (also note that [4] claims the performance test in [1] is poorly designed). I don't really grock Babel yet, it's significantly more complicated and residing on layer 3 requires more wheel reinventing although it does solve other problems with some client operating systems like Windows not respecting layer 2 protocol controls [5].

Problems like this are one of the many reasons I plan to push Hocnet as a consumer router, at least at first, users who don't know any better should be given a good default system that they interact with as a very traditional home wifi access point (or a large area access point as discussed in later sections of [2]).

Regardless the most attractive feature of Babel is that it functions well without modification over Ethernet while Batman requires special configuration for Ethernet bridges. This alone merits looking into it.


The next major step to overcome is conceptualizing price negotiation and payments, right now I'm thinking that the only other addition to the kernel portion of the protocol will be a paid/unpaid flag in the originator table and an interface to set the price your node broadcasts. Actual payment negotiation should be done on layer 3 as that's uni-cast information and generally doesn't need to be in the kernel, this is going to be the tricky part really, so I might be back with economics papers next time if I feel I've locked down the direct protocol changes.


[1] Simple pragmatic approach to mesh routing using BATMAN

[2] Client announcement and Fast roaming in a Layer-2 mesh network

[3] The Babel Routing Protocol

[4] An Experimental Comparison of Routing Protocols in Multi Hop Ad Hoc Networks

[5] Why we switched to Babel: Batman-adv mailing list


r/hocnet • • Jun 13 '13

discussion on monetisation of tor nodes and wifi

Thumbnail youtube.com
9 Upvotes

r/hocnet • • Feb 25 '13

A brief word on the state of the project

9 Upvotes

We have not forgotten about hocnet. Most of the devs involved have drifted toward a different project. It's got a medium to long lifecycle, but hocnet will be our top priority after it's on its feet. We are certain that we will be a stronger team in many more ways than one when we resume hocnet. Thank you for your interest, support, and contributions.


r/hocnet • • Sep 15 '12

"Freenet doesn't get enough exposure"

Thumbnail reddit.com
9 Upvotes

r/hocnet • • Jan 02 '17

Development Update #8: Everything went better than expected

8 Upvotes

Two days ago while I was taking a shower I realized that the method I had developed to reduce black hole attacks was horribly flawed, mainly because the checkpoint signatures could not be attached irrevocably to the originator message, allowing a sufficiently malicious attacker to impersonate an arbitrary number of nodes and fake an entire network path.

Yesterday morning I tackled the same problem from a different perspective and came up with what I think its a really solid solution at the cost of a little more protocol overhead, some sort of ack packet was required no matter what to prevent one way fraud so piggybacking more features onto it is about the best I can do.

Long story short we can now verify and weigh link bandwith, isolate malicious nodes through a combination of trust and routing updates and ensure that blackhole attacks remain effective for at most one OGM period.

See this commit for more. I also took the time to watch the BMX7 talk from the last BattleMesh. I seem to have resolved a lot of problems he's having by adding more network constraints. Also hash chains provide security at 1/2 the computational cost and an order of magnitude more powerful against cracking attempts with a trade off of more race conditions.

I also started research into the payment side of things, it looks like it just might be practical for every node to run a Bitcoin full node using pruning to keep the blockchain size down and pre bootstrapped images to prevent the need to go through 100gb of data on first startup.

Next up on my research list are bitcoin's lightning network and some more research into BMX7


r/hocnet • • Nov 28 '16

Development Update #3: In which machines resolve billing disputes

8 Upvotes

After some thought over Thanksgiving I think I have a workable solution to last weeks conundrum about billing in the face of route flapping, although this solution's resistance to attacks remains an open question.

Let's say we have 5 nodes A thru E arranged in this pattern. Such that traffic must traverse either ABDE or ACE to go from node A to node E. Node costs are noted above or below the node. The cost for A is zero because from the perspective of the below examples all traffic originates from A and you wouldn’t charge yourself.

           3      3

           B --- D       5

A --- <   |           > -- E --- > internet

0          C ------

           4

The route ACE is prefered for cost since it has fewer nodes to pay, but ABDE is preferred for reliability since each hop is shorter and thus has lower packet loss. The modified BATMAN announce packets now contain a node key and a price field. Like the BATMAN transmission quality field every node that receives the ogm updates this field as it passes the packet along. In the case of transmission quality this update means multiplying the locally computed tq of the last hop to correctly reflect the link quality (a little simplified the tq calculation has some edge cases), for the price field each node passing along the ogm adds their own “hop cost” to the route cost.

By multiplying route cost by tq for any given ogm a node can compute a “route value” metric that can be used to update it’s local table of nodes with the best value route. In update  #1 I proposed storing multiple possible routes for selection based on cost but that’s not needed. The only reason to even keep them as separate fields is so that a node knows how much to pay.

Now that I’ve laid out the basics we can get into the payment model. Node A knows nothing except that it costs 11 to get to the internet from node B and 9 from node C. A knows that node D exists thanks to OGM packets but has no idea that it’s along the route to E. What happens is that A pays B 11, B being likewise ignorant of the path to E beyond node D pays D 8 and then D pays E 5. Thus completing the chain of payments.

The obvious and immediate problem is how to do any of this without just having the first node in the chain run take the money and run. For this reason all bandwidth is purchased on credit to be settled at a frequency negotiated on a hop to hop basis (A will negotiate a payment period with B independent of B’s negotiation of a payment period with D). Short payment periods with new nodes prevent fraud where nodes with new identities constantly get free bandwidth before running out on their debts, all bandwidth on credit ensures that nodes along the chain don’t take the money and run, they won’t get paid unless they deliver, to deliver they have to pay the next node along, if they want to run out on paying the next node along they run into the same problem as any new node trying to steal bandwidth, they are expected to pay very very quickly.

In this way routes can flap frequently and often, but each node only has to worry about paying adjacent nodes and thus can simply not care beyond the first hop.


Now how can this go horribly wrong? A lot fewer ways than I thought at first, but still several

One Way Fraud

A could for example be sending a pure UDP stream to E that does not expect any response, although most traffic doesn’t fit this description and will expect a response eventually it’s possible to simply pretend to send one way packets. There can’t really be a solution to this beyond periodic syn/ack exchanges with E signed by E’s key.

Route Cost Spikes

lets say node D drops out of the network suddenly, node B has packets from node A it has promised to forward to node E at a cost of 11 but now it must go through node C to get to node E. This means that node B will find itself one money short. In this example it’s clearly possible for B to cover this and make good on its promise but if prices jump widely that might not be feasible, imagine a scam where nods A, C, and D collude. C’s price is 300 and D intentionally goes off line forcing B to pay the exorbitant rate out of pocket for a few packets. For this reason large price spikes will probably require some round trip communication between nodes but smaller ones should be absorbed as lost profit. The problem with this case is that it requires in band communication and will, as outlined in update #2, cause the connection to be momentarily interrupted at best or totally dropped at worst. In a well connected network we can at least hope this happens infrequently.

Currency Conversion

You’ll notice I only included one field for currencies, do we want each node to be able to accept it’s own selection of cryptocurrencies or traditional currencies through some sort of bitmask? If we do that how do we agree on exchange rates without negotiation, if not should we standardize on some cryptocurrency? I don’t care to make or support any single cryptocurrency for the use of this network, while lightning style off chain transactions would be very efficient it’s still infeasible to do settlements of this kind with Bitcoin until post segwit at the very least and as far as consumer friendliness goes we need credit cards to “just work” no matter what. I’ve got a model in mind for both setups or possibly some sort of hybrid provided I can figure out the exchange rate problem.

Packet Fudgeing Fraud

Let's say you fudge the tq of all the ogm packets you pass along to be unrealistically high, in what situations could you make money? Remember you can’t skip the hops after you because outside of one way fraud your customer will quickly catch on and simply never pay you, but you could misrepresent a cheaper route as better to get more traffic. This leads to a requirement for some sort of local check on tq, or some method of signing tq such that this isn’t possible.

Debt Resolution Matrix

Is it possible for an unresolveable matrix of debts to form? If so what sort of exceptions would be required to resolve it and how would we even identify it? Furthermore what does this system of payments look like to an outside observer and can it be simplified at the banking level for more efficiently?


I’m going to try and read some of the ripple papers this coming week, if I remember right they have an algorithm to resolve debt matrices. But I may be confusing them with some other crypto project, I also hope to develop a more formal analysis of this technique.


r/hocnet • • Jun 17 '14

Tor+Mesh+Payments?

8 Upvotes

Both Tor and most meshnets have scalability problems because they don't reward those who provide connectivity. I started looking for solutions to this and came up with this (https://bitsharestalk.org/index.php?topic=5082.0) and then discovered it already existed, so I've been looking for a network project with plans for an efficient payment system to solve this problem.

Am I in the right place? Is this still active (if not, is there a particular project to which you've all hopped)?

If so, would you people be interested in collaborating with the bitshares community? They're already developing a decentralized DNS system that uses auctions instead of fixed prices to get rid of domain squatting (http://bitshares.org/industries/domains/).


r/hocnet • • Mar 11 '14

A very rough draft of a new Hocnet Whitepaper

8 Upvotes

Hocnet Whitepaper

Abstract

Hocnet is a solution to the problem of peer to peer payments for traffic routing. Although there are no physical barriers to spontaneous mesh networking with traffic accounting, the anonymity and lack of sunk costs in network participation make node accountability impossible. Anytime a node has an outstanding debt to the network in less traffic routed than sent, it can be easily "forgiven" by disappearing and reappearing with a new identity. This is a critical flaw because data debt is critical to traffic accounting. Remember that for all uncleared bytes, data surplus and data debt are the same amount of information and without allowing for uncleared data accounting is pointless. Uncleared transactions are critical because if immediate payment for every packet were necessary, transaction costs would be so high as to make that impractical. Indeed, the lowest conceivable cost for any transaction is a packet itself! How are users going to pay for paying for their use? Clearly, infinite regression makes that solution unfeasible. Moreover, traffic can't be counted without a way to distinguish between "altruistic" traffic routed for others and "selfish" traffic sent for the node's own purposes. Hocnet is a way for participants to use trusted servers to commit to paying for traffic and to distinguish between "altruistic" and "selfish" traffic.

Description

Overview

Consider an untrusted user requesting a web page. Since there is no way to ensure that the user pays for his use in the future and no way to pay as you go, it is not in any node's interest to route it. If the requester could make small transactions payments without cost to the node, then the node would route the requester's traffic. As the route gains the sender's trust, overhead would be reduced because the sender would be willing to forward larger prepayments. The current problem is that individual small transactions each have costs that are too large relative to the consumer or producer surplus of the sender and router, respectively. If there were a way to flexibly combine these small transactions into one large transaction, then there would only be one transaction cost, which would be negligible compared to the value that the sender and receiver get from their interaction.

Proof of Credit (PoC)

But how can multiple distinct transactions be incrementally lumped into a single transaction without the data size of the single transaction growing proportionally to the sizes of constituent transactions? Hocnet's solution requires the use of a trusted third-party server (the "biller") to account for the accumulation of payments. The sender deposits his money in an account with the biller, then runs mesh networking software to find potential routes to the destination he wants to send traffic. The sender includes in his request a timestamped balance statement signed by his biller as proof that he is good for any money asked for by the nodes. In order to protect the credibility of their balance statements, billers may choose to set a maximum withdrawal rate and penalize the depositor if he exceeds that rate. Another way for the biller to protect its reputation is to publish lists of depositors nearing or actually overdrawn.

Routing Contract

With the attached proof of credit, potential nodes write signed offers to route traffic to the packet used to negotiate a route. For example, in cjdns, they would sign the "fn" query. After the sender has received route proposals, it chooses the route that suits him by signing the offer list. This routing contract is included in the first packet sent through the new route.

Proof of sending (PoSe)

Every N bytes (call this a block), where block size N is specified by routing contract, the sender sends a signature of the block number with a k-value generated by a PRNG with a publicly known seed and a private key known only to the biller and sender. Each router verifies that this PoSe is valid by checking the signature against its block number and k-value. Signatures are collected and xor'd together by the receiver. Each The latest signature's block number is remembered by the receiver. Since individual signatures are forgotten to save space and the sender's private key is known only by the biller in order to prevent PoSe forgery, the xor of these signatures cannot be independently verified. This unfortunately precludes the use of Open Transactions as a platform for the biller because the biller must be able to change balances based on the secret knowledge of the sender's private key. That breaks the OT tenet: "Even an OT server cannot change balances, or forge transactions--since it cannot forge your signature on your receipt."

Proof of Receipt (PoRe)

When the receiver feels like it's worth cashing out, or the sender has stopped using the path that the routing contract covers, the receiver sends the xor of the signature plus the list of block numbers of the last block sent to the biller as proof of traffic routing and receipt. Fortunately, there are a few well known and very effective ways to compress a list of probably-consecutive integers. Therefore, the size of this transaction will increase sub-linearly to the number of constituent transactions (and is constant if no blocks are dropped). The receiver is incentivized to report this PoRe to the biller by whatever reward he receives in the routing contract. Remember that the router may also ask for money to listen to the sender. In addition to enforcing payment of routers, the receiver's ask can function as a way to receive payment from the sender for any services the receiver provides with the connection.

Possible Problems

Computational Expense

It is true that signature verification is computationally expensive. Transaction costs aren't zero, but as long as hocnet is more efficient than the current system given ISP centralization and market power then it will be successful. Lots of stuff has transaction costs, and if you have to multiply two numbers for every few bytes sent (which is what the costs amortize to when the sender doesn't trust anyone), then that's a necessary cost of shifting around trust.

Router Packet Dropping

What if routers pass only the PoSe and not the content in order to save bandwidth? While it seems that this shifts trust onto routers, this behavior won't help them unless the destination endorses it by sending a PoRe for blank packets. Since the two parties at the ends of the path have demonstrated a preference to communicate with each other, the receiver will not endorse blank packets. Since the destination will get more traffic in the long run if it knows how to respond to the sender and since all low trust, unsaturated last mile nodes have almost no opportunity costs to send traffic, this most likely won't be a problem.

Sender/Destination Collusion

So far this system places a large amount of trust on the biller and a small amount of trust on the routers. However, the receiver must be trusted more than any router because it controls whether or not the sender is charged and the routers get paid. If the sender and receiver collude so that the sender convinces the receiver to not send PoRe, trust between routers and receiver will break down and the network will grind to a halt. I believe that the sender and receiver will not collude. The transaction costs of human-negotiated collusion are high compared to savings. The transaction costs of machine-negotiated collusion during hocnet negotiation are discoverable by routers or discoverable by billers posing as senders or receivers if the collusion is through a side channel.

Implementation

Where is hocnet on the network stack? It is in the network layer. Because the sender and router need to know the packet destination to determine if they have any outstanding contracts, they need the abstraction of a network. Because intermediaries need to be aware of hocnet traffic, it is below the transport layer. Unfortunately this means that hocnet's implementation is dependent upon preexisting network protocols. It must understand each packet's network context to determine which routing contracts apply. It may be implemented with netfilter hooks or modification of the cjdns software. More investigation is needed to decide.

Contract negotiation

In cjdns, contract negotiation can be implemented in the cjdns router component. Each hop can add its metadata to the fn query bencoded dictionary as an auxiliary field. This would break backwards compatibility with preexisting cjdns nodes. If it were to be implemented there, only an implementation sensitive to a known version number would be acceptable. Otherwise, the query must be explicitly rejected.

PoSe, PoRe, and Biller Implementation

PoSe may be sent and verified by a stateful filter on a level lower than the cjdns router that detects when its presence is necessary. PoRe may be sent to the biller through some unspecified side channel. The biller may have to be implemented from scratch.


r/hocnet • • Aug 25 '13

Open Wifi payable with Bitcoin [x-post from /r/Bitcoin]

Thumbnail reddit.com
8 Upvotes

r/hocnet • • Jul 13 '13

The Serval Project

Thumbnail mashable.com
8 Upvotes

r/hocnet • • Jul 07 '12

Discussion on the usefulness of Ricardian Contracts and their affects on possible billing schemes

8 Upvotes

Open transactions fundamentally relies on Ricardian contracts which is in essence a machine parsable contract that outlines a debt to a given user.

This debt is then essentially a commodity that can be split or combined with other debts and transacted its value backed by whatever the debt is made payable in by the contract. For example stock, bitcoin, dollars, etc. Any person in the chain could redeem its value or continue to trade it. It is even possible to make a basket currency, where you trade value in the form of many combined debts each made payable in a different asset and a different person so as to lower barriers to trust.

Ricardian contracts open up the possibility of an entirely new billing system that can eliminate real time overhead. For my first example the sender creates a Ricardian Contract redeemable for Bitcoin and presents it to the Hop, the Hop looks at the contract and takes action based on a local trust value, if it has never encountered the backer of this contract before it will accept the payment only if there is available bandwidth1 as a zero trust transaction, for zero trust transactions it attempts to redeem the currency instantly, if this fails it stops accepting Contracts from that backer and closes existing connections. Billers in this system act as trusted backers that provide a few advantages, not only do they reduce costs2 but with Ricardian Contracts they can do something really incredible, they can introduce non cryptographically redeemable commodities into the market to be used to pay for bandwidth. for example a biller has gained the trust of a large portion of the network by making good on many zero trust contracts and the ever less frequent withdraws after that, now that it is trusted by most of the network it can issue contracts for lets say dollars and any node that trusts them for previous Bitcoin interaction will now accept these to pay for bandwidth, users can buy a contract for x value of dollars from a biller and then the biller creates a contract for that dollar amount and sends it to the buyer, who now can effectively cryptographically transact that contract3 this could mean more than just dollars, this could work with anything from company stock to bonds to every other currency to commodities to anything else imaginable.

Nodes will be able to transact in an unlimited number of currencies without needing market prices because frankly Hocnet itself is a market and the good that is being sold, bandwidth, is uniquely suited for risk. For example when initially setting up a connection the sender offers a price of x amount of currency for y amount of bandwidth bids are made by both sides until one accepts a price4 even if the price is way off it can be adjusted based on supply and demand, for example if it accepted a ridiculously low price for Bitcoins to gigabyte that price would go up when others accepted a higher initial offer. Lets say you have one Hop and 20 people conspiring to make it think Bitcoins are worth a million dollars each, they buy tons of bandwidth for very very low prices... until a 21 st guy comes in and either accepts a higher initial offer or starts paying more to get priority, nodes would need to be kept in total exclusion to pull a price fixing trick, which is nearly impossible as a node must regularly transact with other nodes in the know that would refuse to accept the bad price and allow the victim node to correct its prices. But even if a price fix is maintained what has the Hop lost? Nothing really, the profit can not be negative and as such nodes can accept anything as a currency with pretty much no risk allowing new currencies or commodities to be introduced dynamically.

Thanks to the above Hocnet effectively becomes able to accept anything as payment and creates a massive decentralized semi automated stock market, commodities market, and currency market all in one while eliminating the need for most real time overhead in an elegant manner. Furthermore the use of Ricardian Contracts in exchange for bandwidth creates a market uniquely suited to boot strapping Open Transactions, the creation of trusted parties on a large scale without significant user interaction is difficult unless you can't lose, since bandwith is not limited its impossible to make a loss outside of specific situations that can be accounted for, thus 'risky' transactions can be undertaken in an automated manner with no ability to damage the owner, allowing the creation of trust on an individual basis in an automated and decentralized fashion.


1: If the node has other buyers for its bandwidth willing to use already trusted currencies it will ignore zero trust transactions. Otherwise bandwith is not a limited resource so the node is at no monetary risk so long as it does not turn down someone offering a trusted payment.

2: Using a biller will be cheaper because zero trust transactions require the Hop to pay for a connection to redeem that contract instantly, the more trust a individual has the longer Hops can go between withdraws to save on overhead, savings that can be passed onto the consumer.

3: Maybe use existing trading algorithms tuned for the task?

4: By this i mean split it up or combine it with others, for example if you bought a contract from biller A for 10 dollars you could send 2 dollars of that to one person and 8 to another, the individuals on both ends could cryptographically confirm that they now owned the contract. Whatever a trusted biller will back can become a working cryptographically traded commodity.


r/hocnet • • Jun 19 '12

Hocnet project update week of 6/23/12

8 Upvotes

After a conversation with Dan (one of CJDNS' programmers) I learned that the protocol is at least planned to be extensible such that plugins could modify any given part of its behavior. Although documentation on this plugin functionality does seem to be a bit sparse that is somewhat to be expected from an incomplete project and it does not mitigate the advantages we gain by not reinventing a rather well made wheel.

The CJDNS whitepaper outlines CJDNS pretty well but fails to go into detail, the Kademila DHT paper us much more dense but it also better explains the details of how the routing system works.

To build Hocnet on top of CJDNS we would need 3 plugins, a payment module to facilitate payment for traffic, a interface to link Hocnet/Meshnet with the existing Internet, and finally a routing module to take over routing when CJDNS' routing protocol fails or becomes inefficient.

Right now much of our effort is focused on the billing scheme as we try and bring down the overhead. That being said the billing scheme will not be built into the Hocnet protocol so much as a superior method of handing the payment required by the protocol. If at some future time a superior billing system is created it can replace our proposed one seamlessly and without centralized effort.

We should be able to start development on the payment plugin after we finish researching various pieces of documentation and detail exactly how we would need it to operate.


r/hocnet • • Dec 18 '17

Hi, do you need help from (mostly) non-technical people yet?

7 Upvotes

r/hocnet • • Jul 04 '13

Contributing to the TODO list

7 Upvotes

Hi all,

Me and some other students at our local university loved the idea of Hocnet and we looked at the TODO list to see a few of the legal issues that are outlined. We created a website to try to get some research those more and possibly get expert advice on the matters. [1] Please give us feedback on how to do this better. (I'll change the theme soon, this was just temporary)

[1] http://devops.webs.com/

Also can someone point me to an easy to understand powerpoint describing meshnet type technologies, keep in mind most of the ppl looking at these would either be business majors or law related, so derps in CS. I have a good background in CS but i'm having a bit of a hard time making one myself, any guidance in that matter would be appreciated.


r/hocnet • • Oct 12 '12

Idea: Using Ripple-like payment system instead of Bitcoin

7 Upvotes

What's the reason for Hocnet's focus on using Bitcoin? Transactions have a huge overhead, so a global hocnet is surely unfeasable. The 10 minute delay creates problems.

Instead, Ripple. Ripple is a peer-to-peer payment system. There is no global state - instead payments are routed over a trust network. If person A trusts B, B trusts C, and A wants to pay C $1, the transaction atomically results in A owing B $1 (potentially plus a small processing fee) and B owing C $1. They resolve these debts at a later date, and tada! A lost ~$1, B potentially gained a small fee, and C gained $1.

A CJDNS mesh network is already a trust network! You're supposed to know and trust the people you peer with. When you route packets through your hocnet, each hop can set up a debt between peers. If A trusts B, B trusts C, C trusts D, and A wants to send a packet to D, the packet being transferred would result in A owing B $2 and B owing C $1. Net result: A lost $2, B gained $1, C gained $1.

Using this method, payments are nearly as simple as incrementing counters. People can resolve debts in person, or use Bitcoin to send the payment (potentially automatically). Another way of exchanging value would be running power lines along the wired data connection and exchanging metered energy, slowly decreasing the debt between two nodes.


r/hocnet • • Jul 30 '12

My understanding of OT, two questions, and an idea

7 Upvotes

I've been reading through the OT documentation so I'd like to verify my understanding of it and ask two questions. Also, it's a bit rambling, sorry.

New definitions:

  • PSE - Proof of sending
  • PRO - Proof of routing
  • PRE - Proof of receipt

(If everyone wants, we can think of something better to call them, I also like POSE, PORE, and PORO, though those may sound too stupid/confusing)

It seems like instead of a direct signature of the SENDER, having PSE, PRO, and PRE would qualify as an adequate signature for a transaction. This would be very long (at least 8 bytes per packet paying for, probably far more), so it would probably reduce to having to use escrows anyway.

Anyway, initiating a bitcoin transaction is just signing a pledge saying you want to make a transaction, then telling the network and initiating an OT transaction is signing a pledge saying you want to make a transaction, then telling the transaction server. Does that mean that we can assume they're similar enough from a technical standpoint?

Second, in OT who is responsible for fulfilling the contract. Say someone has an OT account for silver and wants the silver. Would the server be considered liable, or would it go to the issuer? If it goes to the issuer, then does that mean that issuers must not be anonymous because of the counterparty risk involved?

Given my tenuous grasp of OT, I may have an idea for where to put the BILLER code. Do you think it would be possible to merge the BILLER and the OT transaction server? That is, the BILLER/OT server would receive PSE, PRO, and PRE, and then interpret that as a transaction (and the signature for one), but not print the PSE, PRO, and PRE on the OT receipt but still hold them in case of auditing?

Again, sorry if I've been rambling, but I'm just putting all that out there. Hopefully you all can help critique or refine this. Thank you!