Lefteris Karapetsas
0f000e36ce
Remove unused function
10 years ago
Lefteris Karapetsas
bd571d3b2c
Styling fixes in io, ethash and internal
10 years ago
Lefteris Karapetsas
568a9a92f7
Merge pull request #38 from LefterisJP/byteswap_h_macosx_fix
byteswap.h may not exist in some MacOSX versions
10 years ago
Lefteris Karapetsas
0275e7ad11
Style fixes in internal.c/ethash.h
10 years ago
Lefteris Karapetsas
0c08bd7f92
Add tests for ethash callback used in full_compute
10 years ago
Lefteris Karapetsas
d2f5c863a0
Properly close HANDLE in mmap for Windows
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
4cb2146fd5
byteswap.h may not exist in some MacOSX versions
10 years ago
Lefteris Karapetsas
cdd749e3c6
More windows fixes
- Designated initializer don't work in C++ code for MSVC
- munmap signature moved to the header
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
1a0e498afc
ethash_io changes for windows
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
Gav Wood
3e025ed423
Merge pull request #30 from LefterisJP/fix_windows_warnings
Fix msvc compile warnings
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
20216d8ad8
Fix endian swapping code
- The endian swapping code was actually doing bit-level swapping. Fixed
that now and added some tests.
- Also removed ugly #ifdefs from the code and abstracted it all into
macros which take care of the #ifdef logic
10 years ago
Lefteris Karapetsas
a66a3c7a27
Remove seed parameter from ethash_full_new()
10 years ago
Lefteris Karapetsas
6554ab655e
Add docstring to compute_full_data()
10 years ago
Lefteris Karapetsas
5394bd6834
new api full/light test and get_cache()
- Adding new api full and light client test
- Moving the test for the old API into a deprecated section. Will get
deleted along with that API.
- Adding 2 new functions for light/full clients. One to get the pointer
to the cache and one to move it out of the client
10 years ago
Lefteris Karapetsas
1694c558df
Keep part of the old API for smoother transition
10 years ago
Lefteris Karapetsas
2a17b25688
ethash_hash() now returns for success or failure
- plus docstrings for the calculation functions
- also fixed indexing of a potentially null pointer
10 years ago
Lefteris Karapetsas
85bf80272f
Implementing the API functions and adding docstrings
10 years ago
Lefteris Karapetsas
afc1b382d7
Start of new C API implementation
- For more details look at:
https://github.com/ethereum/wiki/wiki/Ethash-C-API
- The functions of the API have all been implemented but are not yet
used or tested
10 years ago
Lefteris Karapetsas
3038852084
Renaming ethash_blockhash_t to ethash_h256_t
10 years ago
Lefteris Karapetsas
a738504e67
Fixing the travis build after a rebase
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
Gav Wood
47720ae279
Merge pull request #17 from LefterisJP/windows_fixes
various fixes in the code for the msvc build to work
10 years ago
Lefteris Karapetsas
90fe9cdc62
various fixes in the code for the msvc build to work
10 years ago
Gav Wood
b63d438d7b
Merge branch 'master' of github.com:ethereum/ethash
Documentation and API cleanups.
Conflicts:
src/libethash-cl/cl.hpp
src/libethash-cl/ethash_cl_miner.cpp
src/libethash/ethash.h
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
e4c695f37e
Style fixes
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
219e8e9825
Correct return value in memofile mismatch
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
chriseth
a3a47204a5
Sizes hold values with more than 32 bits and thus should not be size_t.
10 years ago
Tim Hughes
d7452447f6
Fixes for OpenCL 1.1
10 years ago
Matthew Wampler-Doty
46ade2d870
Updating data sizes, version bump
10 years ago
Matthew Wampler-Doty
95b19d20fe
Bump to latest revision
10 years ago
Matthew Wampler-Doty
367527f1ca
Refactoring names to match spec
10 years ago
Matthew Wampler-Doty
fa9e13139f
Introducing get_seedhash
10 years ago
Matthew Wampler-Doty
a238f4244f
Updating data size stuff
10 years ago
Matthew Wampler-Doty
657f789407
Reformating one liners
10 years ago
Matthew Wampler-Doty
32ca9b74d3
changing cpp-ethereum to ethash
10 years ago
Matthew Wampler-Doty
2bb0cebe69
Changing bounds checks
10 years ago