Commit Graph

42 Commits

Author SHA1 Message Date
binaryFate
1f2930ce0b Update 2019 copyright 2019-03-05 22:05:34 +01:00
moneromooo-monero
b8787f4302
ArticMine's new block weight algorithm
This curbs runaway growth while still allowing substantial
spikes in block weight

Original specification from ArticMine:

here is the scaling proposal
Define: LongTermBlockWeight
Before fork:
LongTermBlockWeight = BlockWeight
At or after fork:
LongTermBlockWeight = min(BlockWeight, 1.4*LongTermEffectiveMedianBlockWeight)
Note: To avoid possible consensus issues over rounding the LongTermBlockWeight for a given block should be calculated to the nearest byte, and stored as a integer in the block itself. The stored LongTermBlockWeight is then used for future calculations of the LongTermEffectiveMedianBlockWeight and not recalculated each time.
Define:   LongTermEffectiveMedianBlockWeight
LongTermEffectiveMedianBlockWeight = max(300000, MedianOverPrevious100000Blocks(LongTermBlockWeight))
Change Definition of EffectiveMedianBlockWeight
From (current definition)
EffectiveMedianBlockWeight  = max(300000, MedianOverPrevious100Blocks(BlockWeight))
To (proposed definition)
EffectiveMedianBlockWeight  = min(max(300000, MedianOverPrevious100Blocks(BlockWeight)), 50*LongTermEffectiveMedianBlockWeight)
Notes:
1) There are no other changes to the existing penalty formula, median calculation, fees etc.
2) There is the requirement to store the LongTermBlockWeight of a block unencrypted in the block itself. This  is to avoid possible consensus issues over rounding and also to prevent the calculations from becoming unwieldy as we move away from the fork.
3) When the  EffectiveMedianBlockWeight cap is reached it is still possible to mine blocks up to 2x the EffectiveMedianBlockWeight by paying the corresponding penalty.

Note: the long term block weight is stored in the database, but not in the actual block itself,
since it requires recalculating anyway for verification.
2019-03-04 09:33:58 +00:00
xmr-eric
18216f19dd Update 2018 copyright 2018-01-26 10:03:20 -05:00
moneromooo-monero
37c1ce3b68
tests: disable libwallet_api_tests when BUILD_GUI_DEPS is not set 2017-11-26 08:25:42 +00:00
moneromooo-monero
21b9f6f3c7
always use core_tests for consistency, not coretests
Other tests use unit_tests, performance_tests, etc.
This fixes getting it wrong half the time when typing.
2017-10-19 23:11:29 +01:00
redfish
540d6fa3d5 tests: pass data dir as arg
This fixes test failure on builds that happen
to be built in 'build/' instead of 'build/release'.

Use boost filesystem path type.
2017-09-28 01:41:44 -04:00
moneromooo-monero
841231e5bd
Add fuzz testing using american fuzzy lop
Existing tests: block, transaction, signature, cold outputs,
cold transaction.

Data for these is in tests/data/fuzz.

A convenience shell script is in contrib/fuzz_testing/fuzz.sh, eg:

contrib/fuzz_testing/fuzz.sh signature

The fuzzer will run indefinitely, ^C to stop.

Fuzzing is currently supported for GCC only. I can't get CLANG
to build Monero here as it dies on some system headers, so if
someone wants to make it work on both, that'd be great.
In particular, the __AFL_LOOP construct should be made to work
so that a given run can fuzz multiple inputs, as the C++ load
time is substantial.
2017-06-24 16:46:18 +01:00
Riccardo Spagni
c3599fa7b9
update copyright year, fix occasional lack of newline at line end 2017-02-21 19:38:18 +02:00
Timothy D. Prime
dd3485492d make previous change portable
Use cmake's _PREFIX and _SUFFIX to determine the library location.
2017-02-08 13:34:35 -08:00
Timothy D. Prime
32d7d04858 fixes #1688 protect make debug-test from gtest
In simple terms, add_subdirectory() is replaced with ExternalProject_Add().

This change is inspired by https://crascit.com/2015/07/25/cmake-gtest/
with one difference, no download, using the source we already have.

Before this change, make debug-test must be preceded by make clean.
Otherwise, a subsequent build would be polluted by cmake options made
by tests/gtest/.

Also removed the changed compiler flags.  My test build did not have
the affected warnings.
2017-02-08 12:38:41 -08:00
kenshi84
ada7c7da8f portable serializer: tests added 2017-01-03 09:14:48 +09:00
redfish
e1c7af35d4 cmake: transitive deps and remove deprecated LINK_*
Keep the immediate direct deps at the library that depends on them,
declare deps as PUBLIC so that targets that link against that library
get the library's deps as transitive deps.

Break dep cycle between blockchain_db <-> crytonote_core.
No code refactoring, just hide cycle from cmake so that
it doesn't complain (cycles are allowed only between
static libs, not shared libs).

This is in preparation for supproting BUILD_SHARED_LIBS cmake
built-in option for building internal libs as shared.
2016-09-18 02:56:26 -04:00
redfish
3398515dd4 cmake: exclude tests from running
Minimize special cases in cmake script, likely to be forgotten.
2016-09-01 11:17:44 -04:00
redfish
640a934d5f tests: cmake: fix building with system gtest
Issues #980 #983
2016-08-30 23:04:53 -04:00
redfish
4a9e94944c tests: cmake: use a list for enabled tests
Avoid replicating common logic.
2016-08-30 22:56:14 -04:00
redfish
dbd9a2606c cmake: tests: gtest target is not always defined #983 2016-08-30 22:55:53 -04:00
Jacob Torrey
57bc33b4d3 Prevent core_tests from building under Travis 2016-08-29 06:14:27 -06:00
Jacob Torrey
f017fecde9 Build the core_tests under Travis 2016-08-27 06:22:57 -06:00
Jacob Torrey
65041fbbf8 Disabled libwallet_api_test until Issue #895 resolved
Signed-off-by: Jacob Torrey <discipleofranok@gmail.com>
2016-08-26 14:03:27 -06:00
Jacob Torrey
a4501384bf Disable core_tests on Travis-CI
Signed-off-by: Jacob Torrey <discipleofranok@gmail.com>
2016-08-26 14:03:27 -06:00
moneromooo-monero
498ad73729
tests: enable core tests again
They should not have been disabled in the first place
2016-03-17 22:14:08 +00:00
Ilya Kitaev
930bed7074 tests for wallet2_api 2016-03-16 14:27:57 +03:00
Riccardo Spagni
de03926850
updated copyright year 2015-12-31 08:39:56 +02:00
Riccardo Spagni
f4b69d553a
year updated in license 2015-01-02 18:52:46 +02:00
Ben Boeckel
7d708e4223 cmake: support 2.8.7
Older versions of CMake support LINK_{PUBLIC,PRIVATE} while newer
versions prefer PUBLIC and PRIVATE instead, but still support the LINK_
prefix.
2014-10-24 15:29:51 -04:00
Ben Boeckel
464c2805e5 cmake: fix up miniupnpc's define
It's only necessary on Windows builds and new versions renamed the
define without any compatibility bridge.
2014-10-23 16:43:00 -04:00
Ben Boeckel
fa3ff75862 gtest: support an external gtest 2014-10-23 16:42:34 -04:00
Ben Boeckel
7bfcffadb9 cmake: put each test executable in its own directory 2014-10-23 16:42:34 -04:00
Riccardo Spagni
699d932461
Merge pull request #182
1795c38 fixed unit tests (Riccardo Spagni)
bc537ac miniupnpc static define change (Riccardo Spagni)
2014-10-23 16:43:39 +02:00
Riccardo Spagni
98a592bc44
fixed conflict in tests CMakeLists 2014-10-15 11:10:04 +02:00
Riccardo Spagni
bc537ac095
miniupnpc static define change 2014-10-07 00:44:44 +02:00
Riccardo Spagni
2cf94c1321
fix for mingw not playing nicely with libunbound configure, fix for correctly finding static libs on various operating systems 2014-10-06 22:29:07 +02:00
Riccardo Spagni
fd52015a2d use the correct CMake variable for static builds 2014-10-06 18:08:33 +02:00
moneromooo-monero
5585a1c60a
tests: add a test for slow_memmem 2014-10-06 14:58:27 +01:00
Riccardo Spagni
8c37823d45 remove pthreads, successfully tested on gcc 4.9.1 without pthreads 2014-10-02 18:54:55 +02:00
Riccardo Spagni
f93de2f553
fixed unbound libs in test 2014-09-24 20:42:54 +02:00
Thomas Winget
dea98df6b1 Updated CMake files -- added libunbound linker flag
CMake config file written, but was unable to test/get it working
properly because of a bug in CMake with functions related to
find_package.  Simple "-lunbound" flag used in its stead for now.  May
not build on non-Linux systems, not sure yet.
2014-09-23 22:58:02 +02:00
fluffypony
3217ed39ae fixed upnp libs in tests cmake 2014-09-11 08:28:28 +02:00
Zachary Michaels
e84f39ae54 Link to pthreads on non-apple unix 2014-06-11 13:15:23 -04:00
Antonio Juarez
9682a15400 Port mapping with UPnP 2014-04-09 13:14:35 +01:00
Antonio Juarez
8efa1313f3 some fixes 2014-03-20 11:46:11 +00:00
Antonio Juarez
296ae46ed8 moved all stuff to github 2014-03-03 22:07:58 +00:00