Coder Social home page Coder Social logo

goblocks's People

Contributors

naterush avatar tjayrush avatar

Watchers

 avatar  avatar

Forkers

tjayrush

goblocks's Issues

Handle the front of the chain

Assume the chain is at block b.

If we run goblocks with --startBlock b-100 --nBlocks 1000 the processing will run off the end of the chain. This is probably okay because the code that processes blocks will simply error out (although we could make that more graceful).

The trouble is that as the processor gets closer and closer to the front of the chain there is more and more of a chance that the block will re-organize. The way I've handled this elsewhere is to write the results files to a different folder if the block is within a certain time to the front of the chain. For example, if blockTimestamp >= five minutes from front of chain, write to ./raw folder. If blockTimeStamp < five minutes from front of chain, write to ./unripe folder.

In my code (TrueBlocks), I can handle this by only calling in with block numbers older than five minutes, but we need to figure this out because my current scrape is getting close to head of chain.

As a temp solution in my code, I'm going to send in the path into which blaze should write its data. If I want the files written to ./raw, I will send that path in. If I want the files written to ./unripe, I will send that in.

File permission do not need to include executable

The files that are created during the scrape are given these permissions:

-rwxr-xr-x  1 jrush  staff   59 Jul 10 07:56 000001073.txt

There's no reason to give the file executable permissions. Write by owner, read by all is enough.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.