Lefteris Karapetsas
0c08bd7f92
Add tests for ethash callback used in full_compute
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
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
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
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
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
chriseth
a3a47204a5
Sizes hold values with more than 32 bits and thus should not be size_t.
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
2bb0cebe69
Changing bounds checks
10 years ago
Matthew Wampler-Doty
729ff686cc
bikeshedding
10 years ago
Matthew Wampler-Doty
bbd3c14c00
tidying up
10 years ago
Matthew Wampler-Doty
7e4d86dbb8
Refactoring everything into src/ for a little sanity
10 years ago