Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No constants #4

Open
homakov opened this issue Sep 9, 2017 · 5 comments
Open

No constants #4

homakov opened this issue Sep 9, 2017 · 5 comments

Comments

@homakov
Copy link

homakov commented Sep 9, 2017

var opcodes = constants.opcodes;
                       ^

TypeError: Cannot read property 'opcodes' of undefined

bcoin.constants no more?

@chjj
Copy link
Member

chjj commented Sep 10, 2017

Yeah, plasma was written for an alpha version of bcoin that predated the more stable release. The internals have changed a lot since. Unfortunately I haven't had the time to keep this project updated as much as I've wanted to. I'm hoping eventually to take a day to go through and update it to use the modern bcoin APIs (and also at least get the network layer working again).

@homakov
Copy link
Author

homakov commented Sep 10, 2017

I tried to replace some vars and stuck at utils.cmp is not a function. The code otherwise looks great. Even if not for production, would serve as great reference implementation for other programmers. Thanks, I hope this day will come soon :)

@patwhite
Copy link

I'd be willing to chip in on getting it caught up with bcoin - @chjj I know bcoin is designed to support multiple wallets in a multi-tenant sort of way, was that a design goal of plasma as well?

@patwhite
Copy link

Ok, I've gotten quite a bit of the way:
https://github.com/patwhite/plasma/tree/bcoin-upgrade

There are a few sticky places - first, I made a bunch of changes to how you push to transactions because of assertion fails, I tried to follow patterns I saw in bcoin, but feels like a regression to go from enum style to strings (from a push(opcode.OP_IF) to pushSym('OP_IF')). Also didn't know how to push a bn, I serialized to a string...that didn't feel right.

It's still not running any tests, bumping into some crash at a tx.addInput. @chjj or @homakov, would be happy to keep hacking on it with you!

@homakov
Copy link
Author

homakov commented Sep 11, 2017

@patwhite i've done a lot of similar fixes too, so i will keep fixing my version

@chjj why in tests both parties deposit in channel?

   var channelCapacity = 10 * 1e8;
    var channelBalance = channelCapacity / 2;

I haven't seen any use case when both users would need to fund new channel.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants