bsdstudios / ethr Goto Github PK
View Code? Open in Web Editor NEWAn Ethereum package for R
License: MIT License
An Ethereum package for R
License: MIT License
Requires an existing ethr_blocks
directory in the data_dir otherwise throws this error.
> BulkDownload <- bulkBlockDownload(start_block=blocks[1], end_block=blocks[2], data_dir="~/Documents/r/ethr/1bulk/", chunk_size=50000, parallel=TRUE, cores=3)
Progress disabled when using parallel plyr
Hide Traceback
Rerun with Debug
Error in gzfile(file, "wb") : cannot open the connection
3 gzfile(file, "wb")
2 save(block_chunk, file = paste0(data_dir, "ethr_blocks/", st,
"-", en, ".rda")) at bulkBlockDownload.R#33
1 bulkBlockDownload(start_block = blocks[1], end_block = blocks[2],
data_dir = "~/Documents/r/ethr/1bulk/", chunk_size = 50000,
parallel = TRUE, cores = 3)
In addition: Warning messages:
1: <anonymous>: ... may be used in an incorrect context: ‘.fun(piece, ...)’
2: <anonymous>: ... may be used in an incorrect context: ‘.fun(piece, ...)’
3: In gzfile(file, "wb") :
cannot open compressed file '/Users/markthomas/Documents/r/ethr/1bulk/ethr_blocks/1246788-1246807.rda', probable reason 'No such file or directory'
Nice. Hope this is the right place for a few suggestions.
README.Rmd and README.md
change end_block=blocks[1]
to end_block=blocks[2]
remove line return and spaces between 50000, and parallel
README.Rmd:Line120: BulkDownload <- bulkBlockDownload(start_block=blocks[1], end_block=blocks[1], data_dir, chunk_size = 50000,
parallel = TRUE, cores = 3)
change reciept
to receipt
README.Rmd:Line 138: reciept <- eth_getTransactionReceipt(SingleTrans)
README.Rmd:Line 139: reciept
README.Rmd:Line 143: hexDec(reciept$gasUsed)
change $blhash
to $blHash
README.Rmd:Line 153: blockHash <- transactions[49,]$blhash
nodesPlot.Rd
change transaction
to transactions
nodesPlot.Rd:line 26: nodesPlot(transaction,degree_thres=50,save_plot=TRUE)
| | 0%
Error in data.frame(blNumber = as.numeric(hexDec(block$number)), blTimestamp = as.POSIXct(as.numeric(hexDec(block$timestamp)), :
arguments imply differing number of rows: 1, 0
When testing things, I got above error message. This is while connected to a local geth node, and other things such as eth_blockNumber
work.
When installing, I got an error but i seemed to install fine. (package(ethr)
worked without problem)
The output from installation was:
> devtools::install_github("BSDStudios/ethr")
Downloading GitHub repo BSDStudios/ethr@master
from URL https://api.github.com/repos/BSDStudios/ethr/zipball/master
Installing ethr
"C:/PROGRA~1/R/R-33~1.2/bin/x64/R" --no-site-file --no-environ --no-save \
--no-restore --quiet CMD INSTALL \
"C:/Users/<User>/AppData/Local/Temp/Rtmp0qFgN7/devtools2bb024ee5c6a/BSDStudios-ethr-875ad25" \
--library="C:/Program Files/R/R-3.3.2/library" --install-tests
The system cannot find the path specified.
* installing *source* package 'ethr' ...
** R
** data
*** moving datasets to lazyload DB
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
*** arch - i386
*** arch - x64
* DONE (ethr)
Error: Command failed (1)
Is this anything to worry about or to be expected?
As I do not currently have a working local node, I tested with my test account of INFURA, which should have the same API as geth. I can set the rpc_adress correctly, but no matter which function I try, I always get 'NULL' as a return. This could be because of some incompatibility, but in case not, is there some way to debug?
F.e. when I tried eth_getBlockByNumber it requires also the argument 'full_list' but this is not in the json_rpc version, so what is it for/what to put there?
In a similar vein, do you plan to add more convenience functions in the future? As an example the JS api has things like getTransactionsByAccount or similar helpful things.
(sorry for mixing these things, I hope it is okay for now, some of it might be due to my R ignorance)
So after some more testing with geth it seems that your new approach to handling the json creation seems to break geth connectivity. When debugging, the json includes the followin error:
{"jsonrpc":"2.0","id":1,"error":{"code":-32602,"message":"invalid argument 1: json: cannot unmarshal string into Go value of type bool"}}
Is that to be expected or did I give it the wrong input? It was my impression that the code converts any True/TRUE to true and thus should work...?
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.