ethereumclassic / explorer

EthereumClassic Block Explorer
MIT License
264 stars 251 forks source link

Summary of Immediate needs #1

Closed elaineo closed 6 years ago

elaineo commented 8 years ago

I went through the code and it's pretty bare, just looking up address/blocks/tx with web3 calls. So there's a lot of work to do. I'm starting this as a task list so we can organize what we're working on.

Server

Client

madmanblues commented 8 years ago

Count on me!

matthewjamesr commented 8 years ago

@elaineo Added search field to the task list. As for the db, what are you thinking? Mongo?

elaineo commented 8 years ago

Yeah, I was gonna go with Mongodb unless there are any objections.

elaineo commented 8 years ago

geth uses LevelDB to store the blockchain, which is a key-value store, so SQL wouldn't make sense. I'm open to other NoSQL options though.

elaineo commented 8 years ago

I'm not familiar with any of those, I was just going with what would be quickest to get a db fully populated and running. If you want to do some research and let us know your recommendations that would be great!

realcodywburns commented 8 years ago

Im in, ill start digging around and see what i can work out UX/UI side.

whatisgravity commented 8 years ago

Do you need funding for a server to host an example of the explorer? @arvicco May be willing to forward the DNS of explore.ethereumclassic.org too once the project surpasses the features of the existing open source explorer.

I would be willing to donate the costs of a server for a year.

elaineo commented 8 years ago

I have it hosted on an ec2 instance, the cost is no big deal for now. right now I'm just populating the db so there's some downtime.
@whatisgravity unrelated -- do you still need someone to fork and modify the python client?

whatisgravity commented 8 years ago

It was just started by a new volunteer today, I have not investigated the project so I'm not sure how much has been done. Were you thinking about using that client to interface with the network? From what I understand Parity preforms well in benchmarks, which may keep hosting costs down.

elaineo commented 8 years ago

No, I use geth, I haven't tried Parity. Just asking about the py clients, since I thought they had not been accounted for.

whatisgravity commented 8 years ago

There are two components to the pyclient, pyethereum has been started, more details can be found in the volunteer thread. If you are able to, it would be nice to have others help.

masonicGIT commented 8 years ago

+1 for avoiding mongoDB, its a bit difficult to deal with big ints. I'd recommend postgres.

If it helps, I'm happy to build javascript wrappers while I'm building this up https://github.com/masonicGIT/ethereum-api.

Would be great to plug into the database for better queries.

elaineo commented 8 years ago

@masonicGIT I already have a good chunk of the blockchain in db so i'd rather just get something up and functional, and switch to psql later if this turns out to have limitations.

whatisgravity commented 8 years ago

I'm not suggesting it is the best example for proper design or even secure design, but mongo does appear to be used in Mist.

They may have solved the issues with bigints. It may be worth researching the solution they used for this because it may be good. (https://github.com/ethereumproject/meteor-package-accounts/blob/master/accounts.js)

I just glanced over it but I believe they just converted it to a string. I don't know if I agree that is a good solution but it will work store the precision safely with the cost being increased computation from conversions.

kimisan commented 8 years ago

@elaineo @whatisgravity I am about to design some d3.js chart module for ETC explorer, like hash rate distribution. Ask for your recommendation.

gcmartinelli commented 8 years ago

Guys, is this live? May I suggest it get's pushed even with limited features? We really need a block explorer even with the minimum specs (search, IMO).

whatisgravity commented 8 years ago

@gcmartinelli Are you able to host a version? I believe they are basing it on an open source explorer which already exists but has very limited features.

julian1 commented 8 years ago

why is a separate db needed? the state is maintained by the client - eg leveldb or whatever geth uses?

whatisgravity commented 8 years ago

@julian1 LevelDB being used by multiple processes would run into locking issues due to the nature of the DB. It is designed to be an embedded DB. There are better designed databases for the use case of a lot of reads and few writes which is the use case of a web application. It also makes it easier to split up the processes on different servers.

There are ways to still use it, such as modifying geth but that is not an ideal solution.

elaineo commented 8 years ago

Yes, I'm storing the bigints as strings in MongoDB.

Okay, sounds like there is pressing need for a better explorer. I'll pause the DB-syncing for a bit and get what we have up live today. It's unlikely that people will be searching through months-old transactions anyway.

@matthewjamesr @realcodywburns et al -- what are your thoughts on the front end? I think it could use an entire new face, though maybe I'll just add in some fields to show tx details for now.

@masonicGIT I can expose some APIs for you, do you want just basic tx/addr/block queries?

matthewjamesr commented 8 years ago

@elaineo let's keep it angular and use materiaizecss to stay organized for styles. We can carry this framework through all of our ported web-apps, etc, to denote it is a ETC site.

whatisgravity commented 8 years ago

@whatsdis Check out https://github.com/ethereumproject/pyethereum

elaineo commented 8 years ago

@kimisan so we'll have data like this: https://etherchain.org/statistics/miners It may be helpful to have a chart like this: https://etherscan.io/charts/hashrate

kimisan commented 8 years ago

@elaineo , wow! got it! I will prepare a D3.js chart moduel for this explorer. But where I can commit and push the code, new folder of this repo or new repo ?

elaineo commented 8 years ago

Same repo, do a pull request. You can just have it be a standalone page for now, I'll provide an endpoint for the data.

On Wed, Aug 3, 2016 at 1:15 PM, Kimi Sian-yu Chen notifications@github.com wrote:

@elaineo https://github.com/elaineo , wow! got it! I will prepare a D3.js chart moduel for this explorer. But where I can commit and push the code, new folder of this repo or new repo ?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ethereumproject/explorer/issues/1#issuecomment-237358415, or mute the thread https://github.com/notifications/unsubscribe-auth/ACPZr3V8L5gv8qqLV8sr5RTSey_fxJLaks5qcPb6gaJpZM4JY5XQ .

masonicGIT commented 8 years ago

@elaineo - If you have the ability to do a tx list for an account or to view internal transactions it would be great to have access to those :-)

kimisan commented 8 years ago

@elaineo Ok, got it. For the hashrate chart, api of https://etherchain.org/statistics/miners , it only show currently hashrate, not a time-series dataset/array. I will keep push/record hashrate data to my mongodb server.

elaineo commented 8 years ago

These are the API endpoints that the server currently supports. See app.js for data format.

app.post('/addr', routes.addr); app.post('/tx', routes.tx); app.post('/block', routes.block);

BTW, so far I've been pushing all changes directly to master. I'm about to start changing client-side stuff to display transactions & info, so if anyone is working on the frontend, LMK and I'll do a PR for further updates.

PS. I'm gonna stop annoying everyone in this thread and instead post updates to the Explorer slack channel I just created.

Empty2k12 commented 8 years ago

Mobile layout looks like :poop:, will tackle that if someone tells me how the design should look/what the future plans for it are.

ghost commented 8 years ago

Any need for help here? I am able to help

elaineo commented 8 years ago

Yes! @Empty2k12 @MaffeProg Basically I suck at front end stuff... there's a rough sketch of what probably needs to be made available in the dropdown menus here: http://blocks.elaineou.com/home

Right now I'm building the backend pieces and just dumping data onto the page, and it would be super helpful if someone could create front end templates that can receive data.

elaineo commented 8 years ago

Okay, the block explorer is more or less functional now. The dropdown menus on the page don't actually work, but they represent a sort of TODO list for next tasks.

http://blocks.elaineou.com/home

Empty2k12 commented 8 years ago

@elaineo I'm going to crunch some CSS now, improving the desktop size and hopefully making a accessible mobile site. Stay tuned!

Empty2k12 commented 8 years ago

@elaineo I am in the process of fixing a couple CSS things with the layout. Here I have a screenshot of the overhauled Transactions History Box. Is this style something you like which I should continue?

overhauled_txhistory

matthewjamesr commented 8 years ago

@Empty2k12 Good job on the box styling, thanks for cleaning up the overflow scrollbar.

elaineo commented 8 years ago

@Empty2k12 Yep looks great! If you do a pull request I can merge it, or you can just push the changes.

Empty2k12 commented 8 years ago

I will create a pull request when I'm done refining the front page. Which specific feature needs a template most first? Will create that then.

On Fri, Aug 5, 2016, 17:35 Elaine Ou notifications@github.com wrote:

@Empty2k12 https://github.com/Empty2k12 Yep looks great! If you do a pull request I can merge it, or you can just push the changes.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ethereumproject/explorer/issues/1#issuecomment-237883417, or mute the thread https://github.com/notifications/unsubscribe-auth/AGof2ENKd6hfkidpy3rD3i0cYU5_mfZ4ks5qc1g8gaJpZM4JY5XQ .

elaineo commented 8 years ago

It's up to you. The current address/block/tx pages are a pretty ugly.

Next thing to do is add some fields to the address pages to support contract source/viewing/validation.

In the back, I'm working on making the db queries faster and add some error handling, then I'll build the libraries for the Contract Addresses

matthewjamesr commented 8 years ago

@elaineo now that it is the weekend I can lend a hand either front or backend. What prominent need can I help with?

elaineo commented 8 years ago

@matthewjamesr After I make the DB less crappy, I think the two biggest things are

Though that's just my opinion, there may be more urgent things that other people want.

matthewjamesr commented 8 years ago

I have been comparing against gastracker and indeed our explorer is slacking in terms of quickly showing confirmed transactions. I am sure this is because of the in-development nature but I just wanted to make everyone aware.

elaineo commented 8 years ago

@matthewjamesr It's true. I wasn't sure whether a web3 listener constantly updating with each new block would degrade performance too much. Maybe @splix can shed some light on this for gastracker?

matthewjamesr commented 8 years ago

@elaineo I think a better way would just have a intermediary app synching geth data to mongo

  1. geth rpc
  2. synch app streams data from geth, mutates to what we want to actually retain, inserts into mongo.
  3. Explorer removes web3 and just pings mongo.

Laravel could be a decent option. It has a very robust and easy to use Scheduling service requiring only one CRON entry. We could setup it up to synch geth data every 10 sec, 1 min, etc.

Thoughts?

Empty2k12 commented 8 years ago

@matthewjamesr also offering a WEBSOCKET API for different events would be good.

  1. The Explorer could add new blocks when they are broadcasted to the networks (similar to the way blockchain.info-Explorer/API works)
  2. Developer could tap in and create applications by using this abstraction from the blockchain (similar to (my service) https://txwat.ch/ which offers integration with the blockchain without having to use bitcoind)
matthewjamesr commented 8 years ago

@Empty2k12 would be great but that should be a V2 feature :).

elaineo commented 8 years ago

@matthewjamesr removing web3 makes sense for blocks, possibly also transactions, but for address info I think it's faster to get the balance via web3, rather than try to calculate it from all the txs.

jdc4429 commented 8 years ago

Can you add the difficulty please. In a way you can copy/paste.

elaineo commented 8 years ago

@jdc4429 already there: http://blocks.elaineou.com/block/2028786

comndkn commented 8 years ago

Hi All, do you think GPU mining of ETC will remain feasible till December of 2016? When can I expect hashing difficulty to rise in the near term?

iquidus commented 8 years ago

Hi everyone,

I'm the lead dev of iquidus explorer, used by a very large number of bitcoin based alts. I'm pretty keen to help out on this project, there's a few things i want to take care of not mentioned here, all backend related, will submit some pull requests once i have tested throughly. Then start getting my hands dirty with more feature based changes.