Open transactions

@pillow

Do they have documentation, how does btcd communicate with rest of OT software?
We don’t need to port btcd or ever use go-lang. It can be whatever, it is only important to have common language with rest of OT software.
Even simple wrapper around ppcoind should be enough for start.

[quote=“peerchemist, post:41, topic:2002”]@pillow

Do they have documentation, how does btcd communicate with rest of OT software?
We don’t need to port btcd or ever use go-lang. It can be whatever, it is only important to have common language with rest of OT software.
Even simple wrapper around ppcoind should be enough for start.[/quote]

I found some documentation here http://opentransactions.org/docs/ but haven’t really studied it yet. From my email correspondence I believe OT communicates with btcd using websockets and JSON-RPC.

It is true that we don’t need Go. btcd is “just” a port of Bitcoin core and we could integrate websockets in ppcoind instead. I like the idea of a wrapper/proxy/interface/relay even more which could provide a websocket JSON-RPC interface against OT and then communicate with ppcoind on the other end. It would be a lightweight and simple thing to implement.

That said, we would still have to patch Peercoin to handle the following requests (since the wallet API have not been finalized, these could change):
http://opentransactions.org/wiki/index.php?title=Voting_Pool_Wallet_API

EDIT: I believe we would benefit tremendously if Peershares could interface with OT as well.

Not being a developer or software architect I’m trying to grasp what is required to make the first steps.
I think I like the wrapper idea, but does that mean that we need to either work with Peerunity developers or Peercoin developers to get those API implemented?

Is there not a lot of value in porting btcd as that enables a lot of other developments? Can anyone provide some ball parks what kind of effort each approach would take. E.g. approach btcd port takes twice te effort as wrapper.

Assuming we could raise funds, we could start with btcd development awaiting OT developments. The chance that we get some of the core Peercoin or Peerunity wallet developers seems to be pretty low in the near future or??

My objective is to get a kind of consensus on a strategy/route to follow to implement OT for Peercoin.

The main problem with porting btcd in my point of view as a software developer, is that by then we will have to keep 3 implementations of the same thing in sync. This can only go wrong long term. The reference implementation will be carefully crafted with security audits and a it’s-done-when-it’s-done philosophy. The clones will always have to catch up quickly before the protocol switch, once they have the information in place that is needed. Apart from that it’s very likely that a btcd port will not have the same level of expertise and man power available but will have to work towards the same goal.

Gesendet von meinem iPhone mit Tapatalk

[quote=“Cybnate, post:43, topic:2002”]I’m trying to grasp what is required to make the first steps.

My objective is to get a kind of consensus on a strategy/route to follow to implement OT for Peercoin.[/quote]

Porting btcd requires way, way more work then a wrapper. There are good reasons to port btcd (I’m afraid to drift off-topic if I go into them here), but they actually don’t have anything to do with OT.

Peershares are downstream from Peercoin right? Then the best thing to do would be to add the calls required for the wallet API to ppcoind and expose this via JSON-RPC (Peercoin already do this, so one just have to add some more calls).

However, introducing websockets to Peercoin I think is kind of “ugly” in the sense that the only reason for doing it would be OT (that I know of) and the more code you have the more things can go wrong, attack vectors etc.

So, creating a small app that interfaces with OT and interfaces with (a patched version that support the wallet API) ppcoind would be a very cost efficient thing to do. If OT turns out to be a huge use-case for Peercoin, then websockets could always be brought into the code-base if there is a good point to do that.

I suggest:

  1. Prepare a wrapper/interface/go-between OT and ppcoind.
  2. Patch ppcoind API with the calls, as defined by the OT guys (they have not finalized what the API looks like).
    (3. Think hard about how the “stake” mechanism could affect the whole thing.)
  3. Test.
  4. See if we can create our own voting pools and create a PPCBTC exchange, plug in NuBits and now we have a trustless, decentralized exchange.
  5. Get massive of volume on the exchange and TA DA !!! the whole issue with exchanges having to much peercoins (and minting power) is gone! :))

@Cybnate, rest of you guys

I’ll try to sum this up, even though I’m not software architect nor do I know internals of peercoind and OT.

Why did someone decided to use btcd or even code it?

I think it is due go-lang being resistant to buffer overflow attacks, and it is trendy programming language now. It’s hipster thing to code in go-lang now.
Added bonus is now they got lighter and more modern implementation of bitcoin protocol, in this case specialized for running node.
By more modern I mean adding features like web-sockets (that what pillow said).

Is it really necessary to implement ppcd (port of btcd)?

Not really. Peercoin indeed does suffer from vulnerability of buffer overflow attacks, but I’ve implemented most of protections for that within Peerbox. That’s not the answer, but that itch is scratched.

Simple wrapper will do, it can be coded in whatever. It is independent piece of code and can be changed/upgraded regardless of OT or peercoind.

Simple presentation on how things work now:

btcd <–API–> OT = WORKS

drop in replacement would be:

ppcd <–API–> OT = WORKS

However this would demand a lot of work, and lots of time/money. It is by no means simple project.

Wrapper approach:

peercoind <–JSON-RPC–> WRAPPER <–API–> OT == WORKS

So, OT sends request to get balance. But it looks like “1)&”)&")=!""!!)=/)&%%!", and you and me nor ppcoind understands it.
However, wrapper knows this! And translates it into “get balance”, peercoind now returns the numbers and stuff just works.

I prefer this approach since I don’t see any use of btcd port other than drop in replacement to work with OT.

I’ve spoke software engineer about btcd and go-lang, he said that language itself does not bring much to the table and there are far better options for security or speed.

P.S.

I would like to see websockets implemented in peercoind.

I agree with what peerchemist said (have to add he did a better job at explaining it then me :P).

Because Bitcoin core was (and still is) a hairball and the only way to get more people into Bitcoin development, is to make it easier for people to understand the code. Accordingly to some people, it’s also good to have many implementations of the Bitcoin protocol, because if one of the implementation has a weakness, the overall network is hardened against this weakness because less of the network is using it. Then there is the developers own arguments which one can read here: http://bitcoinmagazine.com/4501/btcd-a-full-bitcoin-alternative-written-in-go/ . There are (at least) two more implementations, libbitcoin and bitcoinj (this one is said to one day communicate through TOR out-of-the-box).

True, but reimplementation of peercoin to some other language can not happen over nigh. We can not even pay someone to do it, since such project need maintenance over long period of time. Only way I see it happen is someone skilled in Python/Rust/Javascript/Haskell comes along and codes it not for money but for fun. That person need to believe in PPC too, which sums it down to point marketing into developers / make it interesting.

I want to see Peercoin integrated with OT yet it sounds like a difficult undertaking. From my understanding OT would be one of the best things to ever happen to Peercoin. I do not understand why we can’t raise peer4commit funds for it?

peerchemist, your explanation makes so much sense. I was getting lost in this talk. So basically, the wrapper and JSON-RPC are like a translator between ppcoind and OT. And it’s much easier to do. Does doing it this way open up any attack vectors? Would we have to clear it with Sunny first?

Whatever needs to be done, if we raised funding for this on Peer4commit, I would push it on social media. Is this something we can start on now, or do we need to wait until OT’s API is finished? If we can start now, somebody would need to write up all the details on what needs to be done and how much we would need to raise to hire somebody to do this.

yes.

More precisely, wrapper is translator between ppcoind and OT since ppcoind knows how to speak JSON-RPC.

In a fact, translator between JSON-RPC and websockets.

And it's much easier to do.

yes.

Does doing it this way open up any attack vectors?

no.

Would we have to clear it with Sunny first?

No, Sunny is left to his work with peercoin. No extra work for him, unless some bugs are found.
It is not related to peercoin daemon, it is separate program.

Whatever needs to be done, if we raised funding for this on Peer4commit, I would push it on social media.

IMO, that is not the point. Peercoin is just not popular amongst good developers, I doubt someone with enough skill would stumble upon this quest on within our media reach. But this is topic for another day and I would love to talk about it.

Is this something we can start on now, or do we need to wait until OT's API is finished?

We need to wait. How long?
Long enough OT guys finish API, and document it.

I understand OT is something we want (badly). But, OT is still pre-alpha. It is OK if we wait a bit more and focus on another projects.
We can form crew (pillow + someone else) to closely monitor development of OT and log requirements to implement this for PPC.
As soon as we have all that’s needed we can begin with project. We can not brute force everything with money, bounties are not magic.

Alright, sounds good. Thanks for answering. How do these other crypto communities draw good developers to them? I don’t understand why they aren’t interested in Peercoin.

The last time I studied the PeerCoin code base to check if it’s immune to the selfish mining attack, I found that only a few parts of the original Bitcoin codebase have been altered. So basically the transport and the storage code, as well as the user interface is still pretty similar.

I should look into it again before elaborating further. My point is, that ppcd could well be a fork of btcd sharing most of the code but adding the custom logic for minting and verification of blocks. It’s likely that the differences will only grow in future, so maintenance of a btcd fork will require more effort over time.

In general a small core that encapsulates the bare minimum without fancy stuff like the currently hyped web technology is still preferable since it’s way easier to secure. The coins would stay safe even if a wrapper is vulnerable.

Eventually a wrapper could include some more functionality that does not have to included in the core. The NXT node does generate keys from seeds and collecting statistics over time for instance. A wrapper would be the right place for all the features you would like to have, but you don’t really need for actual transaction processing.

But if it’s true that ppcoind currently actually is so flawed already that a clean rewrite would be the way to go, the picture changes somewhat.

It would be good to get sunnys thoughts on that.

Offtopic:
I think part of it is a branding, marketing issue. Peercoin is not the latest, most flashy coin using the most contemporary language. Mostly we are reworking things which have been done before in Bitcoin community or elsewhere. Peercoin specific knowledge is also not very re-usable elsewhere, although there are a few peercoin clones/deriviates floating around. I think we should advertise for facilitators and developers to join us. It is a bit of chicken and egg.

The lack of a foundation and project managers might also be an issue for some. Things might take a bit longer than usual. It has shown not to be impossible though. As Jordan Lee has shown a good idea/vision needs to be executed by a decent project manager attracting a good team of developers and testers and is well-funded in advance. We need a few more Jordan’s, their teams and funding in other areas.

Ontopic:
I think OT might be such an area. There needs to be a clear scope and plan before this will fly. It is also worth considering assisting the current OT team, so we can have any Peercoin specific issues or whishes built-in early on and built some experience with their code so we may have an early adaptor/user advantage.

[quote=“peerchemist, post:51, topic:2002”]I understand OT is something we want (badly). But, OT is still pre-alpha. It is OK if we wait a bit more and focus on another projects.
We can form crew (pillow + someone else) to closely monitor development of OT and log requirements to implement this for PPC.
As soon as we have all that’s needed we can begin with project. We can not brute force everything with money, bounties are not magic.[/quote]

I totally agree with theese three points above from peerchemist.

Some of you already know this, but I sent an email to Sunny about our plans here and he finally responded. First, here is my message…

[quote=“Sentinelrv, post:52, topic:2002”]Hi Sunny, I wanted to make sure you are aware that more people on the forum are starting to take an interest in implementing Open Transactions into Peercoin. I’ve included several extra people in this email that have been interested in it, such as Pillow and Peerchemist. I’m not sure if you’ve done anymore research on it since the last time we spoke, but just in case you haven’t, the links are still available in my previous emails. Here are a couple more great videos that help to explain it that I’ve watched recently…

Interview with co-founders Chris Odom & Johann Gevers: https://www.youtube.com/watch?v=Y1TSNjFlx14

Voting Pools Presentation: https://www.youtube.com/watch?v=cuAGlp3Syro

As mentioned before and thoroughly detailed in the videos I just linked, hooking up Peercoin to Open Transactions could allow Peercoin to retain its ability to be used as a transactional currency, even with the 1% fee still in place, since all the micro-transactions would be happening off-blockchain at high speeds. Thus, OT+Peercoin = The Whole Package! It would also give us an edge over Bitcoin. Off-chain OT transactions wouldn’t give any fees to Bitcoin miners, so in the future when the block reward is lower, it could become problematic for Bitcoin. On the other hand, due to Peercoin’s low-cost minting, we wouldn’t have that same problem, so Peercoin is naturally a better fit for OT than Bitcoin is.

Open Transactions is being developed by a company called Monetas, which was founded by Chris Odom and Johann Gevers, the two people I linked in the interview above. This company is still in its infancy, but I believe they’re going to be huge in the future. I think maybe it would be best if we established a relationship with them early on while they’re still young. Pillow has made some contacts within their company and is being updated on their situation and what would be needed to implement Peercoin into their system. Apparently they still need to finalize their API, but they’ll give us an update when it’s ready. Check Pillow’s post here and the entire discussion that follows…

http://www.peercointalk.org/index.php?topic=2184.msg30110#msg30110

The community is starting to come up with a plan for how they want to implement it, which includes preparing a wrapper/interface/go-between OT and ppcoind and patching ppcoind API with the calls as defined by the OT guys. There is a whole discussion on it in the thread I linked, so please check it out and provide some comment if you can. I believe czarly wanted your opinion on something in there as well. So we’re excited to hear what you think about all of this. Pillow may be responding to this email with more information.[/quote]

And now here is Sunny’s response…

[quote=“Sunny King”]Hi team,

I would need to dive in a bit more to understand the scope of OT requirements. But generally speaking, if the required API support is fairly modular and not involving changes to core protocol, then it should have no problem getting accepted.

Best Regards,[/quote]

Hope SK add OT as an important target.

+1

Yes, this is really important. Peercoin + OT = Peercoin as a backbone currency. It finally makes sense.

How to pay notary fees (collected by notary servers) in open transactions?
What is the defference between notary fees in open transactions and 0.01 PPC destroyed in blockchain transactions?