Lefteris Karapetsas
c11326c221
Ethash critical output should be disabled by default
- If the user needs it simply compile with -DETHASH_PRINT_CRITICAL_OUTPUT
10 years ago
Lefteris Karapetsas
d4a4b6e285
Using errno to detect ethash_io failures
- Printf debug output is still printed by ethash itself unless one
compiles with -DETHASH_NO_CRITICAL_OUTPUT.
10 years ago
Lefteris Karapetsas
b9133db9fb
printf logging for ethash_full_new() errors
10 years ago
Lefteris Karapetsas
d635c98dbf
Dag name should follow the spec.
- Fixing DAG name so that it follow the spec as defined here:
https://github.com/ethereum/wiki/wiki/Ethash-DAG
10 years ago
Gustav Simonsson
383c14b178
Add -mno-stack-arg-probe for windows and fix snprintf
10 years ago
Lefteris Karapetsas
df2687e517
Addressing MSVC compile error and warnings
10 years ago
Lefteris Karapetsas
d82b609449
API changes requested by Gavin.
- Following this spec:
https://github.com/ethereum/wiki/wiki/Ethash-C-API
- This breaks all but the cpp tests. OpenCL miner and go ethereum will
be fixed in subsequent commits.
10 years ago
Lefteris Karapetsas
94eee46b2a
Force DAG file creation if file already existed but with wrong size
10 years ago
Lefteris Karapetsas
25c62e1ae4
If given dir does not contain DIRSEP add it
10 years ago
Lefteris Karapetsas
c70f3e5692
More const related style fixes
10 years ago
Lefteris Karapetsas
bd571d3b2c
Styling fixes in io, ethash and internal
10 years ago
Lefteris Karapetsas
eb7b33db2b
Try to appease gcc in travis regarding printf format specifiers
10 years ago
Lefteris Karapetsas
e77d3f8555
Use crossplatform uint64_t hex printf specifier
10 years ago
Lefteris Karapetsas
473bff75fe
Windows fixes
- Moving required memmap stuff to the header
- proper header inclusion for fstat/stat
- #define snprintf
10 years ago
Lefteris Karapetsas
f6d4634c75
Move ethash_io_prepare to io.c
- Platform specific io.c files now contain only the minimum amount of
code they can.
10 years ago
Lefteris Karapetsas
0c4e19be7d
Adding memory mapped I/O to ethash_full_new
10 years ago
Lefteris Karapetsas
fbf7fc5b66
Memoization is done with the DAG filename
10 years ago
Lefteris Karapetsas
7fd1dd36f5
Coding style "adjustment"
- Adjusting the coding style for consistency after the talk we had
10 years ago
Lefteris Karapetsas
b78853b2d8
Fix msvc compile warnings
- Fix some warning due to missing casts
- Add wrappers for some functions that msvc considers unsafe
10 years ago
Lefteris Karapetsas
3038852084
Renaming ethash_blockhash_t to ethash_h256_t
10 years ago
Lefteris Karapetsas
6d244fe69a
Use ethash_blockhash_t over the codebase
- Using a typedef struct instead of passing an array of hard coded
length of 32 bytes everywhere. It's much better C practise and also
gives us typechecking.
- Also corrected style in places I touched. I think a style PR should
follow after that.
10 years ago
Lefteris Karapetsas
8e2f9a3ea4
ethash_io tests and bug fixes
- Adding tests for the functionality offered by ethash_io
- ethash_io_write() now accepts ethash_params and seedhash instead of a
block number. This is for better modularity but first and foremost for
testability via unit tests
10 years ago
Lefteris Karapetsas
90fe9cdc62
various fixes in the code for the msvc build to work
10 years ago
Lefteris Karapetsas
206bfe29cf
Fixing build for msvc
10 years ago
Lefteris Karapetsas
68f20ca817
Recovering lost commit after rebase
- adding back the tests for ethash_io
- adding back the travis configuration changes
- minor changes to make everything work
10 years ago
Lefteris Karapetsas
ab389898bd
ethash_io_prepare takes seedhash as an argument
- Also typedefing a blockhash (uint8_t[32]) as an ethash_blockhash_t
10 years ago
Lefteris Karapetsas
383865e191
ethash_io_write and win32 specific code
- adding ethash_io_write() function
- only ethash_io_prepare() invoke system dependent functions so it's the
only one going in system specific source files.
10 years ago
Lefteris Karapetsas
43b7db8220
Adding io.h and io_posix.c
- DAG and memo file creation will now be taken care of in libethash
itself.
- To that end we crete a very minimal IO module for ethash.
- Depending on the target system io_posix or io_win32 will be used.
- Implemented ethash_io_prepare() for posix
10 years ago