naterush / goblocks Goto Github PK
View Code? Open in Web Editor NEWBlarg
License: GNU General Public License v3.0
Blarg
License: GNU General Public License v3.0
Simplifying the calling of blaze to eliminate default options.
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.
If I set startBlock to zero, I get an index out of range error. Change it to '1' and it works.
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.