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

Web interface #67

Open
arichnad opened this issue Nov 14, 2013 · 13 comments
Open

Web interface #67

arichnad opened this issue Nov 14, 2013 · 13 comments

Comments

@arichnad
Copy link
Contributor

I started a conversation with @killerstorm about some ways I can contribute. I think it'll be a web interface.

NOTE: this will likely go into a separate git repo (which might start out as a fork of abe) so as to keep from polluting ngcccbase.

I'd like to discuss what the requirements should be, and then some possible solutions.

To start us off:

Requirements: Should work with user-supplied colors. System should be able to be performant even on colors with lots of transactions.

Possible solution: Fork bitcoinx/bitcoin-abe ?

@arichnad
Copy link
Contributor Author

I have a small pull request on bitcoinx/bitcoin-abe.

I've also got a killerstorm/bitcoin-tx-spent-db version to work with bitcoin-abe called arichnad/bitcoin-tx-spent-db-abe.

If you'd like to put that into bitcoinx, that's fine with me.

I will continue to develop both bitcoin-abe and arichnad/bitcoin-tx-spent-db-abe to make them better.

Once they're better, I'll probably put them up on a server. Is there a server you'd like to see it up on? Or should I put it up on my server?

@killerstorm
Copy link
Contributor

Thanks.

Yep, we have a server which runs Abe, I'll update it and add explorer code in a couple of days.

@arichnad
Copy link
Contributor Author

I've added user-defined colors to the javascript side. You can see arichnad/color-explorer-vagrant (which uses arichnad/bitcoin-tx-spent-db-abe and bitcoinx/bitcoin-abe) loaded up here: http://coloredcoinexplorer.org/

I'll continue adding features. Feel free to pull in whatever repos you want to bitcoinx.

Any suggestions on new features?

Let me know if you have any color definitions you're using for testing.

@arichnad
Copy link
Contributor Author

Added the ability to parse URLs. So now we can pass around URLs with actual data in them:

removed old URL

Describes a few colors and goes to a specific transaction.

@killerstorm
Copy link
Contributor

Hmm, it didn't work, but anyway: using this kind of format for colors is a bad idea because it can be confusing, as NGCCC uses somewhat similar color_desc format.

I think the right way to do it is to remember color set on server. Then user gets color_set_hash for colors he entered, server remembers association of color_set_hash with a set of colors. Page can get color_set_hash in parameter, does lookup on server, gets color set, and proceeds from it

The algorithm to get color_set_hash is in ngcccbase: wallet_model.ColorSet.get_hash_string()

Basically, it is sha256 of a deterministic JSON serialization of a list of color_desc's.

color_desc is of form "obc:::"

@arichnad
Copy link
Contributor Author

arichnad commented Dec 1, 2013

Oops, you can try again.

"sha256 of a deterministic JSON serialization of a list of color_desc's"

I understand the concept, I'll give it a try. I've been hoping to get the server to help out on color lookups. I might actually abandon bitcoin-tx-spent-db-abe and move most of the code over to the python/sqlite side.

@killerstorm
Copy link
Contributor

I understand the concept, I'll give it a try. I've been hoping to get the
server to help out on color lookups. I might actually abandon
bitcoin-tx-spent-db-abe and move most of the code over to the python/sqlite
side.

Is it possible to make it configurable? E.g. there is same front-end, but
back-end can be either based on backward scan, or on data from server.
I think that would be ideal.

More code to maintain, but worth it.

BTW NGCCC supports both forward scan and backward scan now. It looks like
about 90% of code is in common, so it's hardly an issue.

arichnad added a commit to arichnad/bitcoin-tx-spent-db-abe that referenced this issue Dec 19, 2013
…iptor to ngcccbase

I'm not sure how to get the height (or why I even need it yet)
Also I'm not sure whether to allow the user to input the coloring scheme or not.
arichnad added a commit to arichnad/bitcoin-tx-spent-db-abe that referenced this issue Dec 20, 2013
…iptor to ngcccbase

I'm not sure how to get the height (or why I even need it yet)
Also I'm not sure whether to allow the user to input the coloring scheme or not.
@arichnad
Copy link
Contributor Author

Should I use color_set.get_hash_string or color_set.get_color_string?

(The latter seems much shorter, but I'm worried it could be too short [re birthday attack])

@killerstorm
Copy link
Contributor

get_hash_string

get_color_string is, indeed, too short. (We use it just for a sanity check now.)

arichnad added a commit to arichnad/bitcoin-abe-color-explorer that referenced this issue Dec 22, 2013
user gets color_set_hash for colors he entered

server remembers association of color_set_hash with a set of colors

Page can get color_set_hash in parameter, does lookup on server, gets color set, and proceeds from it

--upgrade (Abe36)
arichnad added a commit to arichnad/bitcoin-tx-spent-db-abe that referenced this issue Dec 22, 2013
user gets color_set_hash for colors he entered

server remembers association of color_set_hash with a set of colors

Page can get color_set_hash in parameter, does lookup on server, gets color set, and proceeds from it
@arichnad
Copy link
Contributor Author

Things Fixed:

  1. "using this kind of format for colors is a bad idea because it can be confusing"
  2. "remember color set on server"
  3. "user gets color_set_hash for colors he entered"
  4. "server remembers association of color_set_hash with a set of colors"
  5. "Page can get color_set_hash in parameter, does lookup on server, gets color set, and proceeds from it"

Try new URL here:

http://coloredcoinexplorer.com/color-explorer/index.html?colorSetHash=d2c626205c7e6576230beb705536b6b1bd46aa3bdfd61cbcb51b8e9eba525556&goto=b1586cd10b32f78795b86e9a3febe58dcb59189175fad884a7f4a6623b77486e

@arichnad
Copy link
Contributor Author

I've yet to test between color_set_hash values on ngccc vs coloredcoinexplorer. I've noticed the heights didn't seem right on ngccc when I used it on Tuesday. (also I'm not sure why we need heights, but I'm using them anyways)

arichnad added a commit to arichnad/bitcoin-abe-color-explorer that referenced this issue Dec 22, 2013
user gets color_set_hash for colors he entered

server remembers association of color_set_hash with a set of colors

Page can get color_set_hash in parameter, does lookup on server, gets color set, and proceeds from it

--upgrade (Abe36)
arichnad added a commit to arichnad/bitcoin-abe-color-explorer that referenced this issue Dec 27, 2013
arichnad added a commit to arichnad/color-explorer-vagrant that referenced this issue Dec 29, 2013
arichnad added a commit to arichnad/color-explorer-vagrant that referenced this issue Dec 30, 2013
arichnad added a commit to arichnad/color-explorer-vagrant that referenced this issue Jan 9, 2014
arichnad added a commit to arichnad/bitcoin-abe-color-explorer that referenced this issue Jan 9, 2014
arichnad added a commit to arichnad/color-explorer-vagrant that referenced this issue Jan 9, 2014
arichnad added a commit to arichnad/color-explorer-vagrant that referenced this issue Jan 17, 2014
arichnad added a commit to arichnad/bitcoin-abe-color-explorer that referenced this issue Jan 22, 2014
arichnad added a commit to arichnad/bitcoin-abe-color-explorer that referenced this issue Jan 22, 2014
…. split up the color table into the color and the color_link table.
arichnad added a commit to arichnad/color-explorer-vagrant that referenced this issue Mar 7, 2014
@arichnad
Copy link
Contributor Author

About a month ago, I noticed people discussing color kernels on the mailing list ad nauseam.

Is there a color kernel that we've settled on? I need to make sure bitcoin-abe-color-explorer stays consistent and probably need to get the python parts to use the same color kernel classes if we think this will change.

@killerstorm
Copy link
Contributor

It looks like we've settled on epobc.

Yes, it's important to use same code, i.e. coloredcoinlib. Please let me know if there is any problem with it.

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

2 participants