aboutsummaryrefslogtreecommitdiff
path: root/src/test/fuzz/deserialize.cpp
AgeCommit message (Collapse)Author
2021-06-17Merge bitcoin/bitcoin#22271: fuzz: Assert roundtrip equality for `CPubKey`MarcoFalke
9550dffa0c61df6d1591c62d09629b4c5731e1b7 fuzz: Assert roundtrip equality for `CPubKey` (Sebastian Falbesoner) Pull request description: This PR is a (quite late) follow-up to #19237 (https://github.com/bitcoin/bitcoin/pull/19237#issuecomment-642203251). Looking at `CPubKey::Serialize` and `CPubKey::Unserialize` I can't think of a scenario where the roundtrip (serialization/deserialization) equality wouldn't hold. ACKs for top commit: jamesob: crACK https://github.com/bitcoin/bitcoin/pull/22271/commits/9550dffa0c61df6d1591c62d09629b4c5731e1b7 pending CI Tree-SHA512: 640fb9e777d249769b22ee52c0b15a68ff0645b16c986e1c0bce9742155d14f1be601e591833e1dc8dcffebf271966c6b861b90888a44aae1feae2e0248e2c55
2021-06-17fuzz: Assert roundtrip equality for `CPubKey`Sebastian Falbesoner
2021-06-06p2p, rpc, fuzz: various tiny follow-upsJon Atack
2021-05-28fuzz: rename CNetAddr/CService deserialize targetsJon Atack
as the changes that follow are incompatible with the inputs.
2021-05-24Add roundtrip fuzz tests for CAddress serializationPieter Wuille
2021-03-17refactor: post Optional<> removal cleanupsfanquake
2021-03-15scripted-diff: remove Optional & nulloptfanquake
-BEGIN VERIFY SCRIPT- git rm src/optional.h sed -i -e 's/Optional</std::optional</g' $(git grep -l 'Optional<' src) sed -i -e 's/{nullopt}/{std::nullopt}/g' $(git grep -l 'nullopt' src) sed -i -e 's/ nullopt;/ std::nullopt;/g' $(git grep -l 'nullopt' src) sed -i -e 's/ nullopt)/ std::nullopt)/g' $(git grep -l 'nullopt' src) sed -i -e 's/(nullopt)/(std::nullopt)/g' $(git grep -l 'nullopt' src) sed -i -e 's/ nullopt,/ std::nullopt,/g' $(git grep -l 'nullopt' src) sed -i -e 's/? nullopt :/? std::nullopt :/g' $(git grep -l 'nullopt' src) sed -i -e 's/: nullopt}/: std::nullopt}/g' $(git grep -l 'nullopt' src) sed -i -e '/optional.h \\/d' src/Makefile.am sed -i -e '/#include <optional.h>/d' src/test/fuzz/autofile.cpp src/test/fuzz/buffered_file.cpp src/test/fuzz/node_eviction.cpp sed -i -e 's/#include <optional.h>/#include <optional>/g' $(git grep -l '#include <optional.h>' src) -END VERIFY SCRIPT-
2021-02-22scripted-diff: Rename MakeFuzzingContext to MakeNoLogFileContextMarcoFalke
-BEGIN VERIFY SCRIPT- # Rename sed -i -e 's/MakeFuzzingContext/MakeNoLogFileContext/g' $(git grep -l MakeFuzzingContext) # Bump the copyright of touched files in this scripted diff to avoid touching them again later ./contrib/devtools/copyright_header.py update ./src/test/fuzz/ -END VERIFY SCRIPT-
2021-02-03fuzz: Avoid extraneous copy of input data, using Span<>MarcoFalke
2020-12-10fuzz: Link all targets onceMarcoFalke
2020-11-09fuzz: Assert roundtrip equality for both addrv1 and addrv2 versions of CServicepracticalswift
2020-11-09fuzz: Check for addrv1 compatibility before using addrv1 ↵practicalswift
serializer/deserializer on CSubNet
2020-11-02fuzz: Check for addrv1 compatibility before using addrv1 serializer on CServicepracticalswift
2020-10-26fuzz: Check for addrv1 compatibility before using addrv1 serializerpracticalswift
2020-09-22Remove header checks out of net_processingTroy Giorshev
This moves header size and netmagic checking out of net_processing and into net. This check now runs in ReadHeader, so that net can exit early out of receiving bytes from the peer. IsValid is now slimmed down, so it no longer needs a MessageStartChars& parameter. Additionally this removes the rest of the m_valid_* members from CNetMessage.
2020-09-22Change CMessageHeader ConstructorTroy Giorshev
This commit removes the single-parameter contructor of CMessageHeader and replaces it with a default constructor. The single parameter contructor isn't used anywhere except for tests. There is no reason to initialize a CMessageHeader with a particular messagestart. This messagestart should always be replaced when deserializing an actual message header so that we can run checks on it. The default constructor initializes it to zero, just like the command and checksum. This also removes a parameter of a V1TransportDeserializer constructor, as it was only used for this purpose.
2020-04-16scripted-diff: Bump copyright headersMarcoFalke
-BEGIN VERIFY SCRIPT- ./contrib/devtools/copyright_header.py update ./ -END VERIFY SCRIPT-
2020-03-11tests: Simplify code by removing unwarranted use of unique_ptr:spracticalswift
2020-03-11tests: Add deserialization fuzzing of SnapshotMetadata (utxo_snapshot), ↵practicalswift
uint160 and uint256
2020-01-21Convert compression.h to new serialization frameworkPieter Wuille
2019-12-06tests: Test serialisation as part of deserialisation fuzzing. Test ↵practicalswift
round-trip equality where possible. Avoid code repetition.
2019-11-21tests: Add deserialization fuzzing harnessespracticalswift
2019-10-24tests: Skip unnecessary fuzzer initialisation. Hold ECCVerifyHandle only ↵practicalswift
when needed.
2019-10-09tests: Remove TRANSACTION_DESERIALIZE (replaced by transaction fuzzer)practicalswift
2019-10-07tests: Pass fuzzing inputs as constant referencespracticalswift
2019-06-26tests: Reduce compilation time and unneccessary recompiles by removing ↵practicalswift
unused includes in tests
2019-04-11scripted-diff: Bump copyright headers in test, benchMarcoFalke
-BEGIN VERIFY SCRIPT- ./contrib/devtools/copyright_header.py update ./src/bench/ ./contrib/devtools/copyright_header.py update ./src/test/ -END VERIFY SCRIPT-
2019-02-13fuzz: Move deserialize tests to test/fuzz/deserialize.cppMarcoFalke