Skip to content

Conversation

@practicalswift
Copy link
Contributor

@practicalswift practicalswift commented Nov 2, 2020

Check for addrv1 compatibility before using addrv1 serializer/deserializer on CService:

Before this patch:

$ src/test/fuzz/service_deserialize
service_deserialize: test/fuzz/deserialize.cpp:85:
    void (anonymous namespace)::AssertEqualAfterSerializeDeserialize(const T &, const int) [T = CService]:
    Assertion `Deserialize<T>(Serialize(obj, version)) == obj' failed.

After this patch:

$ src/test/fuzz/service_deserialize
…

Related change: #20247

@DrahtBot DrahtBot added the Tests label Nov 2, 2020
@maflcko
Copy link
Member

maflcko commented Nov 3, 2020

review ACK c2cf8a1

@maflcko maflcko merged commit 5174b53 into bitcoin:master Nov 3, 2020
sidhujag pushed a commit to syscoin/syscoin that referenced this pull request Nov 3, 2020
…g addrv1 serializer/deserializer on CService

c2cf8a1 fuzz: Check for addrv1 compatibility before using addrv1 serializer on CService (practicalswift)

Pull request description:

  Check for addrv1 compatibility before using addrv1 serializer/deserializer on `CService`:

  Before this patch:

  ```
  $ src/test/fuzz/service_deserialize
  service_deserialize: test/fuzz/deserialize.cpp:85:
      void (anonymous namespace)::AssertEqualAfterSerializeDeserialize(const T &, const int) [T = CService]:
      Assertion `Deserialize<T>(Serialize(obj, version)) == obj' failed.
  ```

  After this patch:

  ```
  $ src/test/fuzz/service_deserialize
  …
  ```

  Related change: bitcoin#20247

ACKs for top commit:
  MarcoFalke:
    review ACK c2cf8a1

Tree-SHA512: dba6ddc60e8ef621011d844281461f1741de08c4af1a2b7156c810af44306cef7ec582de5974752db02ca085cfd23da0296d70b694e59ee262589d829fa0626e
@maflcko
Copy link
Member

maflcko commented Nov 9, 2020

Why not fix ./src/test/fuzz/sub_net_deserialize as well?

sub_net_deserialize: test/fuzz/deserialize.cpp:85: void (anonymous namespace)::AssertEqualAfterSerializeDeserialize(const T &, const int) [T = CSubNet]: Assertion `Deserialize<T>(Serialize(obj, version)) == obj' failed.

@practicalswift
Copy link
Contributor Author

@MarcoFalke Fixed in #20355.

maflcko pushed a commit to bitcoin-core/gui that referenced this pull request Nov 10, 2020
…1 serializer/deserializer on CSubNet

79b8f8d fuzz: Assert roundtrip equality for both addrv1 and addrv2 versions of CService (practicalswift)
0e3a78a fuzz: Check for addrv1 compatibility before using addrv1 serializer/deserializer on CSubNet (practicalswift)

Pull request description:

  Check for `addrv1` compatibility before using `addrv1` serializer/deserializer on `CSubNet`. As requested by MarcoFalke in bitcoin/bitcoin#20289 (comment).

  Assert roundtrip equality for both `addrv1` and `addrv2` versions of `CService`.

ACKs for top commit:
  MarcoFalke:
    review ACK 79b8f8d

Tree-SHA512: 3f758aa89ab0c253b593fbe8fe9adc5c6db9afec8856facfe635053a32b4feb438c951323ae0c9e27f1d7e89d12a9b62d81f094dc96159233c12f64d4b95c290
sidhujag pushed a commit to syscoin/syscoin that referenced this pull request Nov 10, 2020
…g addrv1 serializer/deserializer on CSubNet

79b8f8d fuzz: Assert roundtrip equality for both addrv1 and addrv2 versions of CService (practicalswift)
0e3a78a fuzz: Check for addrv1 compatibility before using addrv1 serializer/deserializer on CSubNet (practicalswift)

Pull request description:

  Check for `addrv1` compatibility before using `addrv1` serializer/deserializer on `CSubNet`. As requested by MarcoFalke in bitcoin#20289 (comment).

  Assert roundtrip equality for both `addrv1` and `addrv2` versions of `CService`.

ACKs for top commit:
  MarcoFalke:
    review ACK 79b8f8d

Tree-SHA512: 3f758aa89ab0c253b593fbe8fe9adc5c6db9afec8856facfe635053a32b4feb438c951323ae0c9e27f1d7e89d12a9b62d81f094dc96159233c12f64d4b95c290
@practicalswift practicalswift deleted the fuzzers-service_deserialize-addrv2 branch April 10, 2021 19:42
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Sep 24, 2021
…g addrv1 serializer/deserializer on CService

c2cf8a1 fuzz: Check for addrv1 compatibility before using addrv1 serializer on CService (practicalswift)

Pull request description:

  Check for addrv1 compatibility before using addrv1 serializer/deserializer on `CService`:

  Before this patch:

  ```
  $ src/test/fuzz/service_deserialize
  service_deserialize: test/fuzz/deserialize.cpp:85:
      void (anonymous namespace)::AssertEqualAfterSerializeDeserialize(const T &, const int) [T = CService]:
      Assertion `Deserialize<T>(Serialize(obj, version)) == obj' failed.
  ```

  After this patch:

  ```
  $ src/test/fuzz/service_deserialize
  …
  ```

  Related change: bitcoin#20247

ACKs for top commit:
  MarcoFalke:
    review ACK c2cf8a1

Tree-SHA512: dba6ddc60e8ef621011d844281461f1741de08c4af1a2b7156c810af44306cef7ec582de5974752db02ca085cfd23da0296d70b694e59ee262589d829fa0626e
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Aug 18, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants