Gav Wood
3f72ae8c14
Merge pull request #41 from LefterisJP/finalize_and_use_new_api
Finalize and use new api
10 years ago
Lefteris Karapetsas
bed7c62bca
Fixes for building on Mac
10 years ago
Lefteris Karapetsas
b90dd99d09
Fixing Windows tests
10 years ago
Lefteris Karapetsas
c63c49c9f8
Merge in Felix's changes
10 years ago
Lefteris Karapetsas
bcf9ed6589
Trying to address more MSVC warnings
10 years ago
Lefteris Karapetsas
54dce65fa1
Use FNV hash function in ethash_calculate_dag_item()
10 years ago
Felix Lange
d3396ec513
ethash.go, libethash: pass hashes and return values on the stack
Passing Go pointers into C is not safe. See https://golang.org/issue/8310
for more background. This commit removes uses like the ones below and
passes hashes and return values on the stack instead.
var h common.Hash
C.function(&h[0], ...)
var ret C.struct_ethash_return_value
C.function(&ret)
This requires changes in the internal C API.
10 years ago
Lefteris Karapetsas
e9c11a143e
Switching node indices to uint32_t to get the old behaviour back
10 years ago
Lefteris Karapetsas
df2687e517
Addressing MSVC compile error and warnings
10 years ago
Lefteris Karapetsas
a6a882c57a
Test of ethash_get_default_dirname() and bug fix
10 years ago
Lefteris Karapetsas
377fe9cbd8
Callback will now be called only 100 times pes DAG creation
10 years ago
Lefteris Karapetsas
47bf6d7b52
Add Magic number to DAG file after completion for verification
- There could be a situation where there can be an incomplete file left
on disk. We need to protect ourselves from this. So we add a special
magic number at the beginnign of the DAG after completion.
10 years ago
Lefteris Karapetsas
0d14f005a5
Fix DAG size in GObridge and callback location in C
10 years ago
Lefteris Karapetsas
f786d231fc
Use internal API in GO bridge
- Also proper place of const in some C function signatures
10 years ago
Lefteris Karapetsas
274720c7cf
Clearly specify the platform where utils.c is used
10 years ago
Lefteris Karapetsas
17ec0c7559
ethash_get_seedhash() now returns the seedhash value
- plus removing const from PoD.
10 years ago
Lefteris Karapetsas
6e5598412b
Fixes for $HOME in Windows
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
d7b3e00407
ethash_return_value get a _t for consistency
10 years ago
Lefteris Karapetsas
2f77c792a8
ethash_full should not keep cache_size
- plus block number is a uint64_t not uint32_t
10 years ago
Lefteris Karapetsas
12e408ee8c
Adding ethash_full_data()
10 years ago
Lefteris Karapetsas
95f0419ec8
Some minor changes to the C API towards finalization
10 years ago
Lefteris Karapetsas
bf14ab08d1
Merge pull request #44 from LefterisJP/reintegrating_changes_from_cppethereum
Integrating ethash-cl changes from cppethereum
10 years ago
Lefteris Karapetsas
7cf3fa0398
Attempting to fix no symbols for static lib on MacOSX
10 years ago
Lefteris Karapetsas
df1d8c024f
Adding ETHASH namespace to some defines
10 years ago
Lefteris Karapetsas
c70f3e5692
More const related style fixes
10 years ago
Lefteris Karapetsas
492537b7c4
Miscellaneous style fixes
10 years ago
Lefteris Karapetsas
81fd29ce8c
Style fixes in mmap
10 years ago
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