IPv6 + IPv4 Co-existing together

Development & Technical discussion about Timekoin.
Forum rules
Bug Collecting Database is Click Here
GitHub Account is Click Here
User avatar
KnightMB
Site Admin
Posts: 1019
Joined: Thu Feb 23, 2012 5:03 pm

Re: IPv6 + IPv4 Co-existing together

Post by KnightMB »

The easiest test I can think of would be for the v4 peer to request that the v6 peer send some encrypted data that only its own public key can decrypt. That way if you have a gateway peer in-between not doing its job, it can't fake the response.

The logic being,
I am a peer in v4 land, this peer says it is a gateway peer. So I want the gateway peer to send a request to a peer in v6 land with the number 12345 encrypted into a transaction. Since I already know what the public key is of the peer in v6 land, only that peer's private key can create the encrypted 12345 data that I will be able to decrypt what is sent back. If the gateway peer can past this test, this I will assume it is a gateway peer.

The test could be done on sort-a random variables during the day to make sure the gateway peer is still doing it's job. Maybe similar to how the generation needs at least 1 unit of currency every 2 hours or else it is removed from the list.

If a good network of these gateway peers can be established, then electing peers between the two could function like normal. The gateway peer would just be a relay for the data between the two, so if v4 peer is trying to verify v6 peer for election, the gateway handles data communications between the two.

It also possible that in the future, everyone will just be running dual-stack v4 + v6 networks and this won't be necessary anymore, but in the mean time, it's not that Internet utopia just yet. :lol:
User avatar
KnightMB
Site Admin
Posts: 1019
Joined: Thu Feb 23, 2012 5:03 pm

Re: IPv6 + IPv4 Co-existing together

Post by KnightMB »

Here are also some benchmarks I did.

Best Times:

Intel Mobile 1.6GHz
1GB RAM
Bits: 1536
String: the quick brown fox jumps over the lazy dog
Key Pair Creation [312] ms
Data Encryption [25] ms
Data Decryption [1] ms
Total Time [338] ms for 1536 bit RSA Encryption

Raspberry Pi
700MHz
512MB RAM
Bits: 1536
String: the quick brown fox jumps over the lazy dog
Key Pair Creation [854] ms
Data Encryption [32] ms
Data Decryption [2] ms
Total Time [889] ms for 1536 bit RSA Encryption

Timekoin.com
Quad-core Intel
16GB RAM
Bits: 1536
String: the quick brown fox jumps over the lazy dog
Key Pair Creation [31] ms
Data Encryption [2] ms
Data Decryption [0] ms
Total Time [33] ms for 1536 bit RSA Encryption

Apple Mac Pro
Quad-core Xeon
16GB RAM
Key Pair Creation [67] ms
Data Encryption [5] ms
Data Decryption [0] ms
Total Time [71] ms for 1536 bit RSA Encryption

Linux VPS
5 GHz Single Core
512MB RAM
Key Pair Creation [42] ms
Data Encryption [3] ms
Data Decryption [0] ms
Total Time [44] ms for 1536 bit RSA Encryption

Windows VPS
2 GHz Single Core
512MB RAM
Key Pair Creation [1218] ms
Data Encryption [4] ms
Data Decryption [0] ms
Total Time [1222] ms for 1536 bit RSA Encryption

And just for giggles...... :D
Windows XP
700MHz Single Core
768MB RAM
Key Pair Creation [7308] ms
Data Encryption [33] ms
Data Decryption [2] ms
Total Time [7343] ms for 1536 bit RSA Encryption
User avatar
koinmaster
Posts: 357
Joined: Mon Jun 18, 2012 8:07 pm

Re: IPv6 + IPv4 Co-existing together

Post by koinmaster »

Windows 7 (64bit Pro)
Dual-Core 3.06Ghz
6GB RAM
Key Pair Creation [62] ms
Data Encryption [2] ms
Data Decryption [0] ms
Total Time [64] ms for 1536 bit RSA Encryption


Mac Book Pro
4GB RAM
Dual-Core
Key Pair Creation [51] ms
Data Encryption [1] ms
Data Decryption [0] ms
Total Time [52] ms for 1536 bit RSA Encryption
User avatar
koinmaster
Posts: 357
Joined: Mon Jun 18, 2012 8:07 pm

Re: IPv6 + IPv4 Co-existing together

Post by koinmaster »

warmach wrote:
KnightMB wrote: I believe this type of new peer should be able to create more as well, like you said, it is doing double duty between the two networks.

How would you verify that the new gateway peer is actually doing it's job? Perhaps some type of 2 way test, where v4 peer sends a request to a v6 peer and only that v6 can respond. So if the gateway peer returns nothing or the wrong response, one would assume that gateway peer is only pretending, not really doing anything (perhaps to get the double gen bonus for example)
Makes sense, the v4 already knows that it is routing through the gateway. It would know to check for verification from the v6 that it was received.
How would the network know if the gateway peer goes offline? Stops generating I guess? Does not pass the relay traffic anymore? What if the gateway peer is still online, still generating, but the guy turns off the "gateway" mode of being or something? What then?
User avatar
KnightMB
Site Admin
Posts: 1019
Joined: Thu Feb 23, 2012 5:03 pm

Re: IPv6 + IPv4 Co-existing together

Post by KnightMB »

koinmaster wrote:
warmach wrote:
KnightMB wrote: I believe this type of new peer should be able to create more as well, like you said, it is doing double duty between the two networks.

How would you verify that the new gateway peer is actually doing it's job? Perhaps some type of 2 way test, where v4 peer sends a request to a v6 peer and only that v6 can respond. So if the gateway peer returns nothing or the wrong response, one would assume that gateway peer is only pretending, not really doing anything (perhaps to get the double gen bonus for example)
Makes sense, the v4 already knows that it is routing through the gateway. It would know to check for verification from the v6 that it was received.
How would the network know if the gateway peer goes offline? Stops generating I guess? Does not pass the relay traffic anymore? What if the gateway peer is still online, still generating, but the guy turns off the "gateway" mode of being or something? What then?
Hmm, good point. I'll have to think on that one.... :ugeek:
User avatar
KnightMB
Site Admin
Posts: 1019
Joined: Thu Feb 23, 2012 5:03 pm

Re: IPv6 + IPv4 Co-existing together

Post by KnightMB »

Ok, here is an idea to bounce around.

IPv6 have their own election system. IPv4 have their own election system. The gateway peers (that can support both IPv4 and IPv6) basically live on both networks. The job of the gateway peer is to shuttle information between the two (not only transactions), but the proper generation list for both.

Because they have IPs into both networks, they can get elected on each one (IPv4 + IPv6) and thus can create twice the currency right off the bat. This would give the added bonus for being a gateway peer and at the same time ensure they keep the roles going with the incentive that they can produce twice the currency for taking on this extra burden.

Since there are a billions and billions times more IPv6 address possible than IPv4, some different rules can be created for the IPv6 and how currency generation is handled and the rules for the IPv4 can be left as is. So an IPv6 network might generate at a much slower rate compared to the IPv4 for example. Or instead, everyone in IPv6 might only be able to create 1 unit of currency at a time and it does not increase with the longer amount of time spent in the network.

So if someone who is operating a gateway peer shuts off the IPv6 side for example, that person loses the IPv6 side of generation. Just like if someone shuts off the IPv4 side of their gateway, they lose that side of the generation.

For all of this to work, we would need the equivalent of the first contact servers, but like first contact gateways where some already existing gateway peers get you connected to other gateway peers. The gateway peers would keep track of each other (since they are the only ones with dual-stack networks that could verify that other peers are truly gateway peers). So, just like a server needs to create currency every 2 hours, the gateway peers would need to do something to keep their "gateway" status with the rest of the network. It could be something as simple some routine test where information is sent through one network Ipv4 and expected to arrive on the IPv6 network (kind of a like a round-trip loop test) that could use encrypted data to ensure someone is not faking responses. If someone were to shutdown part of their network side or try some server faking, the round-trip tests would not work and after some predetermined time, the gateway peer loses its gateway status.
jambo58
Posts: 109
Joined: Mon Mar 18, 2013 4:53 am

Re: IPv6 + IPv4 Co-existing together

Post by jambo58 »

http://www.vps.me/free-vps

ok so this mob are offering a free VPS

5gb disk, 348mb ram, 1cpu and an IPv6 address (no ipv4)... might be stretching it but this may work for a timekoin server and help out on the IPv6 side since many ISPs do not use IPv6... specs seem a bit slim though. will 5gb cut it ?
User avatar
KnightMB
Site Admin
Posts: 1019
Joined: Thu Feb 23, 2012 5:03 pm

Re: IPv6 + IPv4 Co-existing together

Post by KnightMB »

jambo58 wrote:http://www.vps.me/free-vps

ok so this mob are offering a free VPS

5gb disk, 348mb ram, 1cpu and an IPv6 address (no ipv4)... might be stretching it but this may work for a timekoin server and help out on the IPv6 side since many ISPs do not use IPv6... specs seem a bit slim though. will 5gb cut it ?
5GB, probably cutting it close. The OS could be strip down as much as possible to save space, need at least 2GB of free space right now just to contain Timekoin and the transaction database. 348MB of RAM is an odd number, but if you keep the peer counts down at the default, should not overload it. I've got a dual-stack VPS (1 IPv4 + 1 IPv6) over at gigatux.com that is only 256MB of RAM (cheapest one they had besides 128MB of RAM) and it can run the bare minimum (8 active, 15 reserve) settings with about 100MB of swap file usage :mrgreen:

IPv6 only, now that is Interesting, do they only give you 1 IP or thousands in a big block?
User avatar
joanofarc
Posts: 131
Joined: Sat Sep 08, 2012 8:09 am

Re: IPv6 + IPv4 Co-existing together

Post by joanofarc »

I would vote to keep the two "networks" generation rules separate for now otherwise someone will just load up 1 million ipv6 clones and flood the queues with it. At least the ipv4 peers could ignore those.

Anyone can run a dual network layer, heck even some routers support it now that you buy. I don't know if a gateway peer would have a long role in the grand life of things if in the near future everyone can access v4 and v6 peers with ease. I do understand that is not a reality right now, so maybe the gateway peers could be a good short term solution until that magic time in the future. :mrgreen:
User avatar
koinmaster
Posts: 357
Joined: Mon Jun 18, 2012 8:07 pm

Re: IPv6 + IPv4 Co-existing together

Post by koinmaster »

I agree to keep the two separate for currency generation, the rules for ipv4 have worked just fine for years, no need to mess with them. Maybe the v6 peers can try out the new method of doing some easy crypto work and checking the response and if a good, valid way to verify peers, maybe migrate that out to ipv4 someday.

I see nothing wrong with gateway peers, they perform an additional service they should get some extra currency for doing the double shift. If future does not need them, they will fade away for something better. I like that things in timekoin keep evolving, so I always support trying new things like this! :D
Post Reply