From 020d3681f6b2ba7b22b1f066f95151b4b1dbd4d8 Mon Sep 17 00:00:00 2001 From: "Filip.Gumula" Date: Tue, 14 Nov 2023 11:33:28 +0100 Subject: [PATCH 01/25] Added the oDot method to VerkleTrie for a human-readable string representation in Dot format. Signed-off-by: Neo --- .../trie/verkle/SimpleVerkleTrie.java | 13 ++++++++++ .../trie/verkle/StoredVerkleTrie.java | 1 + .../besu/ethereum/trie/verkle/VerkleTrie.java | 7 ++++++ .../ethereum/trie/verkle/node/BranchNode.java | 25 +++++++++++++++++++ .../trie/verkle/node/InternalNode.java | 25 +++++++++++++++++++ .../ethereum/trie/verkle/node/LeafNode.java | 18 +++++++++++++ .../besu/ethereum/trie/verkle/node/Node.java | 8 ++++++ .../trie/verkle/node/NullLeafNode.java | 12 +++++++++ .../ethereum/trie/verkle/node/NullNode.java | 11 ++++++++ .../ethereum/trie/verkle/node/StemNode.java | 22 ++++++++++++++++ .../ethereum/trie/verkle/node/StoredNode.java | 11 ++++++++ .../trie/verkle/SimpleVerkleTrieTest.java | 25 +++++++++++++++++++ 12 files changed, 178 insertions(+) diff --git a/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/SimpleVerkleTrie.java b/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/SimpleVerkleTrie.java index fa6c83ea..03be1f89 100644 --- a/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/SimpleVerkleTrie.java +++ b/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/SimpleVerkleTrie.java @@ -141,4 +141,17 @@ public void commit(final NodeUpdater nodeUpdater) { root = root.accept(new HashVisitor(), Bytes.EMPTY); root = root.accept(new CommitVisitor(nodeUpdater), Bytes.EMPTY); } + + /** + * Returns the DOT representation of the entire Verkle Trie. + * + * @return The DOT representation of the Verkle Trie. + */ + + public String toDotTree() { + StringBuilder result = new StringBuilder("digraph VerkleTrie {\n"); + Node root = getRoot(); + result.append(root.toDot()); + return result.append("}\n").toString(); + } } diff --git a/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/StoredVerkleTrie.java b/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/StoredVerkleTrie.java index 7fbde051..b6632123 100644 --- a/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/StoredVerkleTrie.java +++ b/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/StoredVerkleTrie.java @@ -38,4 +38,5 @@ public StoredVerkleTrie(final NodeFactory nodeFactory) { super(nodeFactory.retrieve(Bytes.EMPTY, null)); this.nodeFactory = nodeFactory; } + } diff --git a/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/VerkleTrie.java b/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/VerkleTrie.java index 7652994c..5f271afd 100644 --- a/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/VerkleTrie.java +++ b/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/VerkleTrie.java @@ -62,4 +62,11 @@ public interface VerkleTrie { * @param nodeUpdater used to store the node values */ void commit(NodeUpdater nodeUpdater); + + /** + * Returns the DOT representation of the entire Verkle Trie. + * + * @return The DOT representation of the Verkle Trie. + */ + } diff --git a/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/node/BranchNode.java b/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/node/BranchNode.java index 2d77fd23..b2324839 100644 --- a/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/node/BranchNode.java +++ b/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/node/BranchNode.java @@ -241,4 +241,29 @@ public String print() { } return builder.toString(); } + + /** + * Generates DOT representation for the BranchNode. + * + * @return DOT representation of the BranchNode. + */ + @Override + public String toDot() { + StringBuilder result = new StringBuilder() + .append(getClass().getSimpleName()).append(getLocation().orElse(Bytes.EMPTY)) + .append("\", location=\"").append(getLocation().orElse(Bytes.EMPTY)) + .append("\", commitment=\"").append(getHash().orElse(Bytes32.ZERO)).append("\"]\n"); + + for (Node child : getChildren()) { + String edgeString = getClass().getSimpleName() + getLocation().orElse(Bytes.EMPTY) + " -> " + child.getClass().getSimpleName() + + child.getLocation().orElse(Bytes.EMPTY) + "\n"; + + if(!result.toString().contains(edgeString)) { + result.append(edgeString); + } + result.append(child.toDot()); + } + return result.toString(); + } + } diff --git a/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/node/InternalNode.java b/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/node/InternalNode.java index c9a36568..9702b257 100644 --- a/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/node/InternalNode.java +++ b/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/node/InternalNode.java @@ -158,4 +158,29 @@ public String print() { } return builder.toString(); } + + /** + * Generates DOT representation for the InternalNode. + * + * @return DOT representation of the InternalNode. + */ + @Override + public String toDot() { + StringBuilder result = new StringBuilder() + .append(getClass().getSimpleName()).append(getLocation().orElse(Bytes.EMPTY)) + .append("[location=\"").append(getLocation().orElse(Bytes.EMPTY)) + .append("\", commitment=\"").append(getHash().orElse(Bytes32.ZERO)).append("\"]\n"); + + for (Node child : getChildren()) { + String edgeString = getClass().getSimpleName() + getLocation().orElse(Bytes.EMPTY) + " -> " + child.getClass().getSimpleName() + + child.getLocation().orElse(Bytes.EMPTY) + "\n"; + + if(!result.toString().contains(edgeString)) { + result.append(edgeString); + } + result.append(child.toDot()); + } + return result.toString(); + } + } diff --git a/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/node/LeafNode.java b/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/node/LeafNode.java index e6a744d2..d98b8443 100644 --- a/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/node/LeafNode.java +++ b/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/node/LeafNode.java @@ -159,4 +159,22 @@ public boolean isDirty() { public String print() { return "Leaf:" + getValue().map(Object::toString).orElse("empty"); } + + /** + * Generates DOT representation for the LeafNode. + * + * @return DOT representation of the LeafNode. + */ + @Override + public String toDot() { + Bytes locationBytes = getLocation().orElse(Bytes.EMPTY); + + return new StringBuilder() + .append(getClass().getSimpleName()).append(locationBytes) + .append("[location=\"").append(locationBytes) + .append("\", suffix=\"").append(locationBytes.get(locationBytes.size() - 1)) + .append("\", value=\"").append(getValue().orElse(null)).append("\"]\n") + .toString(); + } + } diff --git a/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/node/Node.java b/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/node/Node.java index b6abba6c..bc841ec3 100644 --- a/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/node/Node.java +++ b/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/node/Node.java @@ -125,4 +125,12 @@ default List> getChildren() { * @return A string representation of the node. */ String print(); + + /** + * Generates DOT representation for the node. + * + * @return DOT representation of the node. + */ + String toDot(); + } diff --git a/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/node/NullLeafNode.java b/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/node/NullLeafNode.java index 11ce30d8..36ee56db 100644 --- a/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/node/NullLeafNode.java +++ b/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/node/NullLeafNode.java @@ -104,6 +104,17 @@ public String print() { return "[NULL-LEAF]"; } + /** + * Generates DOT representation for the NullLeafNode. + * + * @return DOT representation of the NullLeafNode. + */ + @Override + public String toDot() { + String result = getClass().getSimpleName() + getLocation().orElse(Bytes.EMPTY) + " [location=\"" + getLocation().orElse(Bytes.EMPTY) + "\"]\n"; + return result; + } + /** * Check if the `NullNode` is marked as dirty (needing to be persisted). * @@ -123,4 +134,5 @@ public boolean isDirty() { public void markDirty() { // do nothing } + } diff --git a/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/node/NullNode.java b/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/node/NullNode.java index 4ca09437..69e3d477 100644 --- a/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/node/NullNode.java +++ b/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/node/NullNode.java @@ -104,6 +104,17 @@ public String print() { return "[NULL]"; } + /** + * Generates DOT representation for the NullNode. + * + * @return DOT representation of the NullNode. + */ + @Override + public String toDot() { + String result = getClass().getSimpleName() + getLocation().orElse(Bytes.EMPTY) + "[location=\"" + getLocation().orElse(Bytes.EMPTY) + "\"]\n"; + return result; + } + /** * Check if the `NullNode` is marked as dirty (needing to be persisted). * diff --git a/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/node/StemNode.java b/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/node/StemNode.java index 2a16fbda..17b71b97 100644 --- a/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/node/StemNode.java +++ b/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/node/StemNode.java @@ -297,4 +297,26 @@ public String print() { private Bytes extractStem(final Bytes stemValue) { return stemValue.slice(0, 31); } + + @Override + public String toDot() { + StringBuilder result = new StringBuilder() + .append(getClass().getSimpleName()).append(getLocation().orElse(Bytes.EMPTY)) + .append("[location=\"").append(getLocation().orElse(Bytes.EMPTY)) + .append("\", stem=\"").append(getStem()) + .append("\", leftCommitment=\"").append(getLeftCommitment().orElse(Bytes32.ZERO)) + .append("\", rightCommitment=\"").append(getRightCommitment().orElse(Bytes32.ZERO)).append("\"]\n"); + + for (Node child : getChildren()) { + String edgeString = getClass().getSimpleName() + getLocation().orElse(Bytes.EMPTY) + " -> " + child.getClass().getSimpleName() + + child.getLocation().orElse(Bytes.EMPTY) + "\n"; + + if(!result.toString().contains(edgeString)) { + result.append(edgeString); + } + result.append(child.toDot()); + } + return result.toString(); + } + } diff --git a/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/node/StoredNode.java b/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/node/StoredNode.java index 53bd6a97..16e0b61e 100644 --- a/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/node/StoredNode.java +++ b/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/node/StoredNode.java @@ -168,6 +168,17 @@ public String print() { return String.format("(stored) %s", node.print()); } + /** + * Generates DOT representation for the StoredNode. + * + * @return DOT representation of the StoredNode. + */ + @Override + public String toDot() { + String result = getClass().getSimpleName() + getLocation().orElse(Bytes.EMPTY) + "[location=\"" + getLocation().orElse(Bytes.EMPTY) + "\"]\n"; + return result; + } + private Node load() { if (loadedNode.isEmpty()) { loadedNode = nodeFactory.retrieve(location, null); diff --git a/src/test/java/org/hyperledger/besu/ethereum/trie/verkle/SimpleVerkleTrieTest.java b/src/test/java/org/hyperledger/besu/ethereum/trie/verkle/SimpleVerkleTrieTest.java index 430b0bd7..68bb1ea5 100644 --- a/src/test/java/org/hyperledger/besu/ethereum/trie/verkle/SimpleVerkleTrieTest.java +++ b/src/test/java/org/hyperledger/besu/ethereum/trie/verkle/SimpleVerkleTrieTest.java @@ -25,6 +25,31 @@ public class SimpleVerkleTrieTest { + + @Test + public void toDotTreeWithOneValue() { + SimpleVerkleTrie trie = new SimpleVerkleTrie<>(); + Bytes32 key = Bytes32.fromHexString("0x00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff"); + Bytes32 value = Bytes32.fromHexString("0x1000000000000000000000000000000000000000000000000000000000000000"); + trie.put(key, value); + + System.out.println(trie.toDotTree()); + } + + + @Test + public void toDotTreeWithTwoValues() { + SimpleVerkleTrie trie = new SimpleVerkleTrie(); + Bytes32 key1 = Bytes32.fromHexString("0x00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff"); + Bytes32 value1 = Bytes32.fromHexString("0x1000000000000000000000000000000000000000000000000000000000000000"); + Bytes32 key2 = Bytes32.fromHexString("0x00112233445566778899aabbccddeeff00112233445566778899aabbccddee00"); + Bytes32 value2 = Bytes32.fromHexString("0x0100000000000000000000000000000000000000000000000000000000000000"); + + trie.put(key1, value1); + trie.put(key2, value2); + + System.out.println(trie.toDotTree()); + } @Test public void testEmptyTrie() { SimpleVerkleTrie trie = new SimpleVerkleTrie(); From c3cf9234bfa3f15cc0ed4921be3aa32f4ff4ac8b Mon Sep 17 00:00:00 2001 From: "Filip.Gumula" Date: Tue, 14 Nov 2023 12:04:15 +0100 Subject: [PATCH 02/25] Remove unnecessary description Signed-off-by: Neo --- .../hyperledger/besu/ethereum/trie/verkle/VerkleTrie.java | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/VerkleTrie.java b/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/VerkleTrie.java index 5f271afd..7c0a6e3b 100644 --- a/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/VerkleTrie.java +++ b/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/VerkleTrie.java @@ -63,10 +63,4 @@ public interface VerkleTrie { */ void commit(NodeUpdater nodeUpdater); - /** - * Returns the DOT representation of the entire Verkle Trie. - * - * @return The DOT representation of the Verkle Trie. - */ - } From 715ef1af367d5eb7dbae8fa88ba0e674077e6e49 Mon Sep 17 00:00:00 2001 From: "Filip.Gumula" Date: Tue, 14 Nov 2023 14:26:51 +0100 Subject: [PATCH 03/25] Modification of toDot method, added showRepeatingEdges flag, to manage possibility of displaying repeating edges, if 'true' show all adges, if 'false' don't display repeating edges Signed-off-by: Neo --- .../trie/verkle/SimpleVerkleTrie.java | 4 +-- .../ethereum/trie/verkle/node/BranchNode.java | 6 ++-- .../trie/verkle/node/InternalNode.java | 6 ++-- .../ethereum/trie/verkle/node/LeafNode.java | 2 +- .../besu/ethereum/trie/verkle/node/Node.java | 8 +++-- .../trie/verkle/node/NullLeafNode.java | 2 +- .../ethereum/trie/verkle/node/NullNode.java | 2 +- .../ethereum/trie/verkle/node/StemNode.java | 7 ++-- .../ethereum/trie/verkle/node/StoredNode.java | 2 +- .../trie/verkle/SimpleVerkleTrieTest.java | 32 ++++++++++++++++--- 10 files changed, 49 insertions(+), 22 deletions(-) diff --git a/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/SimpleVerkleTrie.java b/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/SimpleVerkleTrie.java index 03be1f89..b789c376 100644 --- a/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/SimpleVerkleTrie.java +++ b/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/SimpleVerkleTrie.java @@ -148,10 +148,10 @@ public void commit(final NodeUpdater nodeUpdater) { * @return The DOT representation of the Verkle Trie. */ - public String toDotTree() { + public String toDotTree(Boolean showRepeatingEdges) { StringBuilder result = new StringBuilder("digraph VerkleTrie {\n"); Node root = getRoot(); - result.append(root.toDot()); + result.append(root.toDot(showRepeatingEdges)); return result.append("}\n").toString(); } } diff --git a/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/node/BranchNode.java b/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/node/BranchNode.java index b2324839..64b30655 100644 --- a/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/node/BranchNode.java +++ b/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/node/BranchNode.java @@ -248,7 +248,7 @@ public String print() { * @return DOT representation of the BranchNode. */ @Override - public String toDot() { + public String toDot(Boolean showRepeatingEdges) { StringBuilder result = new StringBuilder() .append(getClass().getSimpleName()).append(getLocation().orElse(Bytes.EMPTY)) .append("\", location=\"").append(getLocation().orElse(Bytes.EMPTY)) @@ -258,10 +258,10 @@ public String toDot() { String edgeString = getClass().getSimpleName() + getLocation().orElse(Bytes.EMPTY) + " -> " + child.getClass().getSimpleName() + child.getLocation().orElse(Bytes.EMPTY) + "\n"; - if(!result.toString().contains(edgeString)) { + if(showRepeatingEdges || !result.toString().contains(edgeString)) { result.append(edgeString); } - result.append(child.toDot()); + result.append(child.toDot(showRepeatingEdges)); } return result.toString(); } diff --git a/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/node/InternalNode.java b/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/node/InternalNode.java index 9702b257..6e80a8e3 100644 --- a/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/node/InternalNode.java +++ b/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/node/InternalNode.java @@ -165,7 +165,7 @@ public String print() { * @return DOT representation of the InternalNode. */ @Override - public String toDot() { + public String toDot(Boolean showRepeatingEdges) { StringBuilder result = new StringBuilder() .append(getClass().getSimpleName()).append(getLocation().orElse(Bytes.EMPTY)) .append("[location=\"").append(getLocation().orElse(Bytes.EMPTY)) @@ -175,10 +175,10 @@ public String toDot() { String edgeString = getClass().getSimpleName() + getLocation().orElse(Bytes.EMPTY) + " -> " + child.getClass().getSimpleName() + child.getLocation().orElse(Bytes.EMPTY) + "\n"; - if(!result.toString().contains(edgeString)) { + if(showRepeatingEdges || !result.toString().contains(edgeString)) { result.append(edgeString); } - result.append(child.toDot()); + result.append(child.toDot(showRepeatingEdges)); } return result.toString(); } diff --git a/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/node/LeafNode.java b/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/node/LeafNode.java index d98b8443..e28ff919 100644 --- a/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/node/LeafNode.java +++ b/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/node/LeafNode.java @@ -166,7 +166,7 @@ public String print() { * @return DOT representation of the LeafNode. */ @Override - public String toDot() { + public String toDot(Boolean showRepeatingEdges) { Bytes locationBytes = getLocation().orElse(Bytes.EMPTY); return new StringBuilder() diff --git a/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/node/Node.java b/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/node/Node.java index bc841ec3..e6ad5d73 100644 --- a/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/node/Node.java +++ b/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/node/Node.java @@ -127,10 +127,12 @@ default List> getChildren() { String print(); /** - * Generates DOT representation for the node. + * Generates DOT representation for the Node. * - * @return DOT representation of the node. + * @param showRepeatingEdges If true, prints all edges; if false, prints only unique edges. + * + * @return DOT representation of the Node. */ - String toDot(); + String toDot(Boolean showRepeatingEdges); } diff --git a/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/node/NullLeafNode.java b/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/node/NullLeafNode.java index 36ee56db..95bd33b8 100644 --- a/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/node/NullLeafNode.java +++ b/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/node/NullLeafNode.java @@ -110,7 +110,7 @@ public String print() { * @return DOT representation of the NullLeafNode. */ @Override - public String toDot() { + public String toDot(Boolean showRepeatingEdges) { String result = getClass().getSimpleName() + getLocation().orElse(Bytes.EMPTY) + " [location=\"" + getLocation().orElse(Bytes.EMPTY) + "\"]\n"; return result; } diff --git a/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/node/NullNode.java b/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/node/NullNode.java index 69e3d477..d50f18b1 100644 --- a/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/node/NullNode.java +++ b/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/node/NullNode.java @@ -110,7 +110,7 @@ public String print() { * @return DOT representation of the NullNode. */ @Override - public String toDot() { + public String toDot(Boolean showRepeatingEdges) { String result = getClass().getSimpleName() + getLocation().orElse(Bytes.EMPTY) + "[location=\"" + getLocation().orElse(Bytes.EMPTY) + "\"]\n"; return result; } diff --git a/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/node/StemNode.java b/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/node/StemNode.java index 17b71b97..6527c522 100644 --- a/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/node/StemNode.java +++ b/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/node/StemNode.java @@ -298,8 +298,9 @@ private Bytes extractStem(final Bytes stemValue) { return stemValue.slice(0, 31); } + @Override - public String toDot() { + public String toDot(Boolean showRepeatingEdges) { StringBuilder result = new StringBuilder() .append(getClass().getSimpleName()).append(getLocation().orElse(Bytes.EMPTY)) .append("[location=\"").append(getLocation().orElse(Bytes.EMPTY)) @@ -311,10 +312,10 @@ public String toDot() { String edgeString = getClass().getSimpleName() + getLocation().orElse(Bytes.EMPTY) + " -> " + child.getClass().getSimpleName() + child.getLocation().orElse(Bytes.EMPTY) + "\n"; - if(!result.toString().contains(edgeString)) { + if(showRepeatingEdges || !result.toString().contains(edgeString)) { result.append(edgeString); } - result.append(child.toDot()); + result.append(child.toDot(showRepeatingEdges)); } return result.toString(); } diff --git a/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/node/StoredNode.java b/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/node/StoredNode.java index 16e0b61e..801f95c8 100644 --- a/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/node/StoredNode.java +++ b/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/node/StoredNode.java @@ -174,7 +174,7 @@ public String print() { * @return DOT representation of the StoredNode. */ @Override - public String toDot() { + public String toDot(Boolean showRepeatingEdges) { String result = getClass().getSimpleName() + getLocation().orElse(Bytes.EMPTY) + "[location=\"" + getLocation().orElse(Bytes.EMPTY) + "\"]\n"; return result; } diff --git a/src/test/java/org/hyperledger/besu/ethereum/trie/verkle/SimpleVerkleTrieTest.java b/src/test/java/org/hyperledger/besu/ethereum/trie/verkle/SimpleVerkleTrieTest.java index 68bb1ea5..dd195ee7 100644 --- a/src/test/java/org/hyperledger/besu/ethereum/trie/verkle/SimpleVerkleTrieTest.java +++ b/src/test/java/org/hyperledger/besu/ethereum/trie/verkle/SimpleVerkleTrieTest.java @@ -27,18 +27,18 @@ public class SimpleVerkleTrieTest { @Test - public void toDotTreeWithOneValue() { + public void testToDotTrieOneValueNoRepeatingEdges() { SimpleVerkleTrie trie = new SimpleVerkleTrie<>(); Bytes32 key = Bytes32.fromHexString("0x00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff"); Bytes32 value = Bytes32.fromHexString("0x1000000000000000000000000000000000000000000000000000000000000000"); trie.put(key, value); - System.out.println(trie.toDotTree()); + System.out.println(trie.toDotTree(false)); } @Test - public void toDotTreeWithTwoValues() { + public void testToDotTrieTwoValuesNoRepeatingEdges() { SimpleVerkleTrie trie = new SimpleVerkleTrie(); Bytes32 key1 = Bytes32.fromHexString("0x00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff"); Bytes32 value1 = Bytes32.fromHexString("0x1000000000000000000000000000000000000000000000000000000000000000"); @@ -48,7 +48,31 @@ public void toDotTreeWithTwoValues() { trie.put(key1, value1); trie.put(key2, value2); - System.out.println(trie.toDotTree()); + System.out.println(trie.toDotTree(false)); + } + @Test + public void testToDotTrieOneValueRepeatingEdges() { + SimpleVerkleTrie trie = new SimpleVerkleTrie<>(); + Bytes32 key = Bytes32.fromHexString("0x00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff"); + Bytes32 value = Bytes32.fromHexString("0x1000000000000000000000000000000000000000000000000000000000000000"); + trie.put(key, value); + + System.out.println(trie.toDotTree(true)); + } + + + @Test + public void testToDotTrieTwoValuesRepeatingEdges() { + SimpleVerkleTrie trie = new SimpleVerkleTrie(); + Bytes32 key1 = Bytes32.fromHexString("0x00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff"); + Bytes32 value1 = Bytes32.fromHexString("0x1000000000000000000000000000000000000000000000000000000000000000"); + Bytes32 key2 = Bytes32.fromHexString("0x00112233445566778899aabbccddeeff00112233445566778899aabbccddee00"); + Bytes32 value2 = Bytes32.fromHexString("0x0100000000000000000000000000000000000000000000000000000000000000"); + + trie.put(key1, value1); + trie.put(key2, value2); + + System.out.println(trie.toDotTree(true)); } @Test public void testEmptyTrie() { From be43be619d0bc0c61169e8dfe20da3efef107f39 Mon Sep 17 00:00:00 2001 From: "Filip.Gumula" Date: Tue, 14 Nov 2023 17:39:22 +0100 Subject: [PATCH 04/25] Add toDot() method overload in Node interface and toDotTree() method overload in SimpleVerkleTrie Signed-off-by: Neo --- .../ethereum/trie/verkle/SimpleVerkleTrie.java | 17 ++++++++++++++++- .../besu/ethereum/trie/verkle/node/Node.java | 11 +++++++++++ .../trie/verkle/SimpleVerkleTrieTest.java | 4 ++-- 3 files changed, 29 insertions(+), 3 deletions(-) diff --git a/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/SimpleVerkleTrie.java b/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/SimpleVerkleTrie.java index b789c376..20d67689 100644 --- a/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/SimpleVerkleTrie.java +++ b/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/SimpleVerkleTrie.java @@ -145,13 +145,28 @@ public void commit(final NodeUpdater nodeUpdater) { /** * Returns the DOT representation of the entire Verkle Trie. * + * @param showRepeatingEdges if true displays repeating edges; if false does not. + * * @return The DOT representation of the Verkle Trie. */ - public String toDotTree(Boolean showRepeatingEdges) { StringBuilder result = new StringBuilder("digraph VerkleTrie {\n"); Node root = getRoot(); result.append(root.toDot(showRepeatingEdges)); return result.append("}\n").toString(); } + + /** + * Returns the DOT representation of the entire Verkle Trie. + * + *

The representation does not contain repeating edges. + * + * @return The DOT representation of the Verkle Trie. + */ + public String toDotTree() { + StringBuilder result = new StringBuilder("digraph VerkleTrie {\n"); + Node root = getRoot(); + result.append(root.toDot()); + return result.append("}\n").toString(); + } } diff --git a/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/node/Node.java b/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/node/Node.java index e6ad5d73..297695c9 100644 --- a/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/node/Node.java +++ b/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/node/Node.java @@ -135,4 +135,15 @@ default List> getChildren() { */ String toDot(Boolean showRepeatingEdges); + /** + * Generates DOT representation for the Node. + * + *

Representation does not contain repeating edges. + * + * @return DOT representation of the Node. + */ + default String toDot() { + return toDot(false); + } + } diff --git a/src/test/java/org/hyperledger/besu/ethereum/trie/verkle/SimpleVerkleTrieTest.java b/src/test/java/org/hyperledger/besu/ethereum/trie/verkle/SimpleVerkleTrieTest.java index dd195ee7..b4d016ed 100644 --- a/src/test/java/org/hyperledger/besu/ethereum/trie/verkle/SimpleVerkleTrieTest.java +++ b/src/test/java/org/hyperledger/besu/ethereum/trie/verkle/SimpleVerkleTrieTest.java @@ -33,7 +33,7 @@ public void testToDotTrieOneValueNoRepeatingEdges() { Bytes32 value = Bytes32.fromHexString("0x1000000000000000000000000000000000000000000000000000000000000000"); trie.put(key, value); - System.out.println(trie.toDotTree(false)); + System.out.println(trie.toDotTree()); } @@ -48,7 +48,7 @@ public void testToDotTrieTwoValuesNoRepeatingEdges() { trie.put(key1, value1); trie.put(key2, value2); - System.out.println(trie.toDotTree(false)); + System.out.println(trie.toDotTree()); } @Test public void testToDotTrieOneValueRepeatingEdges() { From 63cbd82cacfe66bda78c171b1c46e94ef85ca4e4 Mon Sep 17 00:00:00 2001 From: "Filip.Gumula" Date: Tue, 14 Nov 2023 11:33:28 +0100 Subject: [PATCH 05/25] Added the oDot method to VerkleTrie for a human-readable string representation in Dot format. Signed-off-by: Neo --- .../trie/verkle/SimpleVerkleTrie.java | 14 +- .../besu/ethereum/trie/verkle/VerkleTrie.java | 15 +- .../ethereum/trie/verkle/node/BranchNode.java | 36 +- .../trie/verkle/node/InternalNode.java | 36 +- .../ethereum/trie/verkle/node/LeafNode.java | 25 +- .../besu/ethereum/trie/verkle/node/Node.java | 9 +- .../trie/verkle/node/NullLeafNode.java | 22 +- .../ethereum/trie/verkle/node/NullNode.java | 21 +- .../ethereum/trie/verkle/node/StemNode.java | 86 +-- .../ethereum/trie/verkle/node/StoredNode.java | 10 +- .../trie/verkle/SimpleVerkleTrieTest.java | 493 ++++++++---------- 11 files changed, 372 insertions(+), 395 deletions(-) diff --git a/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/SimpleVerkleTrie.java b/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/SimpleVerkleTrie.java index 20d67689..f8cc72d9 100644 --- a/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/SimpleVerkleTrie.java +++ b/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/SimpleVerkleTrie.java @@ -76,7 +76,8 @@ public Node getRoot() { * Gets the value associated with the specified key from the Verkle Trie. * * @param key The key to retrieve the value for. - * @return An optional containing the value if found, or an empty optional if not found. + * @return An optional containing the value if found, or an empty optional if + * not found. */ @Override public Optional get(final K key) { @@ -87,7 +88,7 @@ public Optional get(final K key) { /** * Inserts a key-value pair into the Verkle Trie. * - * @param key The key to insert. + * @param key The key to insert. * @param value The value to associate with the key. */ @Override @@ -134,7 +135,8 @@ public String toString() { /** * Commits the Verkle Trie using the provided node updater. * - * @param nodeUpdater The node updater for storing the changes in the Verkle Trie. + * @param nodeUpdater The node updater for storing the changes in the Verkle + * Trie. */ @Override public void commit(final NodeUpdater nodeUpdater) { @@ -145,7 +147,8 @@ public void commit(final NodeUpdater nodeUpdater) { /** * Returns the DOT representation of the entire Verkle Trie. * - * @param showRepeatingEdges if true displays repeating edges; if false does not. + * @param showRepeatingEdges if true displays repeating edges; if false does + * not. * * @return The DOT representation of the Verkle Trie. */ @@ -159,7 +162,8 @@ public String toDotTree(Boolean showRepeatingEdges) { /** * Returns the DOT representation of the entire Verkle Trie. * - *

The representation does not contain repeating edges. + *

+ * The representation does not contain repeating edges. * * @return The DOT representation of the Verkle Trie. */ diff --git a/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/VerkleTrie.java b/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/VerkleTrie.java index 7c0a6e3b..b307ce87 100644 --- a/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/VerkleTrie.java +++ b/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/VerkleTrie.java @@ -25,25 +25,29 @@ public interface VerkleTrie { /** - * Returns an {@code Optional} of value mapped to the hash if it exists; otherwise empty. + * Returns an {@code Optional} of value mapped to the hash if it exists; + * otherwise empty. * * @param key The key for the value. - * @return an {@code Optional} of value mapped to the hash if it exists; otherwise empty + * @return an {@code Optional} of value mapped to the hash if it exists; + * otherwise empty */ Optional get(K key); /** - * Updates the value mapped to the specified key, creating the mapping if one does not already + * Updates the value mapped to the specified key, creating the mapping if one + * does not already * exist. * - * @param key The key that corresponds to the value to be updated. + * @param key The key that corresponds to the value to be updated. * @param value The value to associate the key with. * @return Optional previous value before replacement if it exists. */ Optional put(K key, V value); /** - * Deletes the value mapped to the specified key, if such a value exists (Optional operation). + * Deletes the value mapped to the specified key, if such a value exists + * (Optional operation). * * @param key The key of the value to be deleted. */ @@ -62,5 +66,4 @@ public interface VerkleTrie { * @param nodeUpdater used to store the node values */ void commit(NodeUpdater nodeUpdater); - } diff --git a/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/node/BranchNode.java b/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/node/BranchNode.java index 64b30655..f933e04b 100644 --- a/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/node/BranchNode.java +++ b/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/node/BranchNode.java @@ -42,10 +42,10 @@ public abstract class BranchNode implements Node { /** * Constructs a new BranchNode with location, hash, path, and children. * - * @param location The location in the tree. - * @param hash Node's vector commitment's hash. + * @param location The location in the tree. + * @param hash Node's vector commitment's hash. * @param commitment Node's vector commitment. - * @param children The list of children nodes. + * @param children The list of children nodes. */ public BranchNode( final Bytes location, @@ -60,13 +60,14 @@ public BranchNode( } /** - * Constructs a new BranchNode with optional location, optional hash, optional commitment and + * Constructs a new BranchNode with optional location, optional hash, optional + * commitment and * children. * - * @param location The optional location in the tree. - * @param hash The optional vector commitment of children's commitments. + * @param location The optional location in the tree. + * @param hash The optional vector commitment of children's commitments. * @param commitment Node's optional vector commitment. - * @param children The list of children nodes. + * @param children The list of children nodes. */ public BranchNode( final Optional location, @@ -95,7 +96,8 @@ public BranchNode(final Optional location, final List> children) } /** - * Constructs a new BranchNode with optional location and path, initializing children to + * Constructs a new BranchNode with optional location and path, initializing + * children to * NullNodes. * * @param location The optional location in the tree. @@ -123,7 +125,7 @@ public static int maxChild() { * Accepts a visitor for path-based operations on the node. * * @param visitor The path node visitor. - * @param path The path associated with a node. + * @param path The path associated with a node. * @return The result of the visitor's operation. */ @Override @@ -151,7 +153,7 @@ public Node child(final byte childIndex) { /** * Replaces the child node at a specified index with a new node. * - * @param index The index of the child node to replace. + * @param index The index of the child node to replace. * @param childNode The new child node. */ public void replaceChild(final byte index, final Node childNode) { @@ -250,20 +252,20 @@ public String print() { @Override public String toDot(Boolean showRepeatingEdges) { StringBuilder result = new StringBuilder() - .append(getClass().getSimpleName()).append(getLocation().orElse(Bytes.EMPTY)) - .append("\", location=\"").append(getLocation().orElse(Bytes.EMPTY)) - .append("\", commitment=\"").append(getHash().orElse(Bytes32.ZERO)).append("\"]\n"); + .append(getClass().getSimpleName()).append(getLocation().orElse(Bytes.EMPTY)) + .append("\", location=\"").append(getLocation().orElse(Bytes.EMPTY)) + .append("\", commitment=\"").append(getHash().orElse(Bytes32.ZERO)).append("\"]\n"); for (Node child : getChildren()) { - String edgeString = getClass().getSimpleName() + getLocation().orElse(Bytes.EMPTY) + " -> " + child.getClass().getSimpleName() - + child.getLocation().orElse(Bytes.EMPTY) + "\n"; + String edgeString = getClass().getSimpleName() + getLocation().orElse(Bytes.EMPTY) + " -> " + + child.getClass().getSimpleName() + + child.getLocation().orElse(Bytes.EMPTY) + "\n"; - if(showRepeatingEdges || !result.toString().contains(edgeString)) { + if (showRepeatingEdges || !result.toString().contains(edgeString)) { result.append(edgeString); } result.append(child.toDot(showRepeatingEdges)); } return result.toString(); } - } diff --git a/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/node/InternalNode.java b/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/node/InternalNode.java index 6e80a8e3..adf44919 100644 --- a/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/node/InternalNode.java +++ b/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/node/InternalNode.java @@ -38,10 +38,10 @@ public class InternalNode extends BranchNode { /** * Constructs a new InternalNode with location, hash, path, and children. * - * @param location The location in the tree. - * @param hash Node's vector commitment's hash. + * @param location The location in the tree. + * @param hash Node's vector commitment's hash. * @param commitment Node's vector commitment. - * @param children The list of children nodes. + * @param children The list of children nodes. */ public InternalNode( final Bytes location, @@ -52,13 +52,14 @@ public InternalNode( } /** - * Constructs a new InternalNode with optional location, optional hash, optional commitment and + * Constructs a new InternalNode with optional location, optional hash, optional + * commitment and * children. * - * @param location The optional location in the tree. - * @param hash The optional vector commitment of children's commitments. + * @param location The optional location in the tree. + * @param hash The optional vector commitment of children's commitments. * @param commitment Node's optional vector commitment. - * @param children The list of children nodes. + * @param children The list of children nodes. */ public InternalNode( final Optional location, @@ -79,7 +80,8 @@ public InternalNode(final Optional location, final List> children } /** - * Constructs a new InternalNode with optional location and path, initializing children to + * Constructs a new InternalNode with optional location and path, initializing + * children to * NullNodes. * * @param location The optional location in the tree. @@ -92,7 +94,7 @@ public InternalNode(final Bytes location) { * Accepts a visitor for path-based operations on the node. * * @param visitor The path node visitor. - * @param path The path associated with a node. + * @param path The path associated with a node. * @return The result of the visitor's operation. */ @Override @@ -114,7 +116,7 @@ public Node accept(final NodeVisitor visitor) { /** * Replace the vector commitment with a new one. * - * @param hash The new vector commitment's hash to set. + * @param hash The new vector commitment's hash to set. * @param commitment The new vector commitment to set. * @return A new InternalNode with the updated vector commitment. */ @@ -167,20 +169,20 @@ public String print() { @Override public String toDot(Boolean showRepeatingEdges) { StringBuilder result = new StringBuilder() - .append(getClass().getSimpleName()).append(getLocation().orElse(Bytes.EMPTY)) - .append("[location=\"").append(getLocation().orElse(Bytes.EMPTY)) - .append("\", commitment=\"").append(getHash().orElse(Bytes32.ZERO)).append("\"]\n"); + .append(getClass().getSimpleName()).append(getLocation().orElse(Bytes.EMPTY)) + .append("[location=\"").append(getLocation().orElse(Bytes.EMPTY)) + .append("\", commitment=\"").append(getHash().orElse(Bytes32.ZERO)).append("\"]\n"); for (Node child : getChildren()) { - String edgeString = getClass().getSimpleName() + getLocation().orElse(Bytes.EMPTY) + " -> " + child.getClass().getSimpleName() - + child.getLocation().orElse(Bytes.EMPTY) + "\n"; + String edgeString = getClass().getSimpleName() + getLocation().orElse(Bytes.EMPTY) + " -> " + + child.getClass().getSimpleName() + + child.getLocation().orElse(Bytes.EMPTY) + "\n"; - if(showRepeatingEdges || !result.toString().contains(edgeString)) { + if (showRepeatingEdges || !result.toString().contains(edgeString)) { result.append(edgeString); } result.append(child.toDot(showRepeatingEdges)); } return result.toString(); } - } diff --git a/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/node/LeafNode.java b/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/node/LeafNode.java index e28ff919..2c9ff2bc 100644 --- a/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/node/LeafNode.java +++ b/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/node/LeafNode.java @@ -43,18 +43,19 @@ public class LeafNode implements Node { * Constructs a new LeafNode with location, value. * * @param location The location of the node in the tree. - * @param value The value associated with the node. + * @param value The value associated with the node. */ public LeafNode(final Bytes location, final V value) { this.location = Optional.of(location); this.value = value; this.valueSerializer = val -> (Bytes) val; } + /** * Constructs a new LeafNode with optional location, value. * * @param location The location of the node in the tree (Optional). - * @param value The value associated with the node. + * @param value The value associated with the node. */ public LeafNode(final Optional location, final V value) { this.location = location; @@ -66,7 +67,7 @@ public LeafNode(final Optional location, final V value) { * Accepts a visitor for path-based operations on the node. * * @param visitor The path node visitor. - * @param path The path associated with a node. + * @param path The path associated with a node. * @return The result of the visitor's operation. */ @Override @@ -104,8 +105,10 @@ public Optional getValue() { public Optional getLocation() { return location; } + /** - * Get the children of the node. A leaf node does not have children, so this method throws an + * Get the children of the node. A leaf node does not have children, so this + * method throws an * UnsupportedOperationException. * * @return The list of children nodes (unsupported operation). @@ -126,8 +129,7 @@ public Bytes getEncodedValue() { if (encodedValue.isPresent()) { return encodedValue.get(); } - Bytes encodedVal = - getValue().isPresent() ? valueSerializer.apply(getValue().get()) : Bytes.EMPTY; + Bytes encodedVal = getValue().isPresent() ? valueSerializer.apply(getValue().get()) : Bytes.EMPTY; List values = Arrays.asList(encodedVal); Bytes result = RLP.encodeList(values, RLPWriter::writeValue); this.encodedValue = Optional.of(result); @@ -170,11 +172,10 @@ public String toDot(Boolean showRepeatingEdges) { Bytes locationBytes = getLocation().orElse(Bytes.EMPTY); return new StringBuilder() - .append(getClass().getSimpleName()).append(locationBytes) - .append("[location=\"").append(locationBytes) - .append("\", suffix=\"").append(locationBytes.get(locationBytes.size() - 1)) - .append("\", value=\"").append(getValue().orElse(null)).append("\"]\n") - .toString(); + .append(getClass().getSimpleName()).append(locationBytes) + .append("[location=\"").append(locationBytes) + .append("\", suffix=\"").append(locationBytes.get(locationBytes.size() - 1)) + .append("\", value=\"").append(getValue().orElse(null)).append("\"]\n") + .toString(); } - } diff --git a/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/node/Node.java b/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/node/Node.java index 297695c9..aabae25a 100644 --- a/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/node/Node.java +++ b/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/node/Node.java @@ -42,7 +42,7 @@ public interface Node { * Accept a visitor to perform operations on the node based on a provided path. * * @param visitor The visitor to accept. - * @param path The path associated with a node. + * @param path The path associated with a node. * @return The result of visitor's operation. */ Node accept(PathNodeVisitor visitor, Bytes path); @@ -129,7 +129,8 @@ default List> getChildren() { /** * Generates DOT representation for the Node. * - * @param showRepeatingEdges If true, prints all edges; if false, prints only unique edges. + * @param showRepeatingEdges If true, prints all edges; if false, prints only + * unique edges. * * @return DOT representation of the Node. */ @@ -138,12 +139,12 @@ default List> getChildren() { /** * Generates DOT representation for the Node. * - *

Representation does not contain repeating edges. + *

+ * Representation does not contain repeating edges. * * @return DOT representation of the Node. */ default String toDot() { return toDot(false); } - } diff --git a/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/node/NullLeafNode.java b/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/node/NullLeafNode.java index 95bd33b8..463f843a 100644 --- a/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/node/NullLeafNode.java +++ b/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/node/NullLeafNode.java @@ -26,8 +26,11 @@ /** * A special node representing a null or empty node in the Verkle Trie. * - *

The `NullNode` class serves as a placeholder for non-existent nodes in the Verkle Trie - * structure. It implements the Node interface and represents a node that contains no information or + *

+ * The `NullNode` class serves as a placeholder for non-existent nodes in the + * Verkle Trie + * structure. It implements the Node interface and represents a node that + * contains no information or * value. */ public class NullLeafNode implements Node { @@ -35,10 +38,12 @@ public class NullLeafNode implements Node { private static final NullLeafNode instance = new NullLeafNode(); /** - * Constructs a new `NullNode`. This constructor is protected to ensure that `NullNode` instances + * Constructs a new `NullNode`. This constructor is protected to ensure that + * `NullNode` instances * are only created as singletons. */ - protected NullLeafNode() {} + protected NullLeafNode() { + } /** * Gets the shared instance of the `NullNode`. @@ -55,7 +60,7 @@ public static NullLeafNode instance() { * Accepts a visitor for path-based operations on the node. * * @param visitor The path node visitor. - * @param path The path associated with a node. + * @param path The path associated with a node. * @return The result of the visitor's operation. */ @Override @@ -111,7 +116,8 @@ public String print() { */ @Override public String toDot(Boolean showRepeatingEdges) { - String result = getClass().getSimpleName() + getLocation().orElse(Bytes.EMPTY) + " [location=\"" + getLocation().orElse(Bytes.EMPTY) + "\"]\n"; + String result = getClass().getSimpleName() + getLocation().orElse(Bytes.EMPTY) + " [location=\"" + + getLocation().orElse(Bytes.EMPTY) + "\"]\n"; return result; } @@ -128,11 +134,11 @@ public boolean isDirty() { /** * Mark the `NullNode` as dirty (not used, no operation). * - *

This method intentionally does nothing. + *

+ * This method intentionally does nothing. */ @Override public void markDirty() { // do nothing } - } diff --git a/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/node/NullNode.java b/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/node/NullNode.java index d50f18b1..844a2a31 100644 --- a/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/node/NullNode.java +++ b/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/node/NullNode.java @@ -26,8 +26,11 @@ /** * A special node representing a null or empty node in the Verkle Trie. * - *

The `NullNode` class serves as a placeholder for non-existent nodes in the Verkle Trie - * structure. It implements the Node interface and represents a node that contains no information or + *

+ * The `NullNode` class serves as a placeholder for non-existent nodes in the + * Verkle Trie + * structure. It implements the Node interface and represents a node that + * contains no information or * value. */ public class NullNode implements Node { @@ -35,10 +38,12 @@ public class NullNode implements Node { private static final NullNode instance = new NullNode(); /** - * Constructs a new `NullNode`. This constructor is protected to ensure that `NullNode` instances + * Constructs a new `NullNode`. This constructor is protected to ensure that + * `NullNode` instances * are only created as singletons. */ - protected NullNode() {} + protected NullNode() { + } /** * Gets the shared instance of the `NullNode`. @@ -55,7 +60,7 @@ public static NullNode instance() { * Accepts a visitor for path-based operations on the node. * * @param visitor The path node visitor. - * @param path The path associated with a node. + * @param path The path associated with a node. * @return The result of the visitor's operation. */ @Override @@ -111,7 +116,8 @@ public String print() { */ @Override public String toDot(Boolean showRepeatingEdges) { - String result = getClass().getSimpleName() + getLocation().orElse(Bytes.EMPTY) + "[location=\"" + getLocation().orElse(Bytes.EMPTY) + "\"]\n"; + String result = getClass().getSimpleName() + getLocation().orElse(Bytes.EMPTY) + "[location=\"" + + getLocation().orElse(Bytes.EMPTY) + "\"]\n"; return result; } @@ -128,7 +134,8 @@ public boolean isDirty() { /** * Mark the `NullNode` as dirty (not used, no operation). * - *

This method intentionally does nothing. + *

+ * This method intentionally does nothing. */ @Override public void markDirty() { diff --git a/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/node/StemNode.java b/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/node/StemNode.java index 6527c522..4373e370 100644 --- a/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/node/StemNode.java +++ b/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/node/StemNode.java @@ -30,7 +30,9 @@ /** * Represents a stem node in the Verkle Trie. * - *

StemNodes are nodes storing the stem of the key, and is the root of the suffix to value trie. + *

+ * StemNodes are nodes storing the stem of the key, and is the root of the + * suffix to value trie. * * @param The type of the node's value. */ @@ -47,15 +49,15 @@ public class StemNode extends BranchNode { /** * Constructs a new StemNode with non-optional parameters. * - * @param location The location in the tree. - * @param stem Node's stem. - * @param hash Node's vector commitment's hash. - * @param commitment Node's vector commitment. - * @param leftHash Hash of vector commitment to left values. - * @param leftCommitment Vector commitment to left values. - * @param rightHash Hash of vector commitment to right values. + * @param location The location in the tree. + * @param stem Node's stem. + * @param hash Node's vector commitment's hash. + * @param commitment Node's vector commitment. + * @param leftHash Hash of vector commitment to left values. + * @param leftCommitment Vector commitment to left values. + * @param rightHash Hash of vector commitment to right values. * @param rightCommitment Vector commitment to right values. - * @param children The list of children nodes. + * @param children The list of children nodes. */ public StemNode( final Bytes location, @@ -78,15 +80,15 @@ public StemNode( /** * Constructs a new StemNode with optional parameters. * - * @param location Optional location in the tree. - * @param stem Node's stem. - * @param hash Optional node's vector commitment's hash. - * @param commitment Optional node's vector commitment. - * @param leftHash Optional hash of vector commitment to left values. - * @param leftCommitment Optional vector commitment to left values. - * @param rightHash Optional hash of vector commitment to right values. + * @param location Optional location in the tree. + * @param stem Node's stem. + * @param hash Optional node's vector commitment's hash. + * @param commitment Optional node's vector commitment. + * @param leftHash Optional hash of vector commitment to left values. + * @param leftCommitment Optional vector commitment to left values. + * @param rightHash Optional hash of vector commitment to right values. * @param rightCommitment Optional vector commitment to right values. - * @param children The list of children nodes. + * @param children The list of children nodes. */ public StemNode( final Optional location, @@ -110,7 +112,7 @@ public StemNode( * Constructs a new BranchNode with non-optional parameters. * * @param location The location in the tree. - * @param stem Node's stem. + * @param stem Node's stem. */ public StemNode(final Bytes location, final Bytes stem) { super(location); @@ -128,7 +130,7 @@ public StemNode(final Bytes location, final Bytes stem) { * Accepts a visitor for path-based operations on the node. * * @param visitor The path node visitor. - * @param path The path associated with a node. + * @param path The path associated with a node. * @return The result of the visitor's operation. */ @Override @@ -223,11 +225,11 @@ public StemNode replaceLocation(final Bytes location) { /** * Creates a new node by replacing all its commitments * - * @param hash Node's vector commitment hash - * @param commitment Node's vector commitment - * @param leftHash Node's left vector commitment hash - * @param leftCommitment Node's left vector commitment - * @param rightHash Node's right vector commitment hash + * @param hash Node's vector commitment hash + * @param commitment Node's vector commitment + * @param leftHash Node's left vector commitment hash + * @param leftCommitment Node's left vector commitment + * @param rightHash Node's right vector commitment hash * @param rightCommitment Node's right vector commitment * @return StemNode with new commitments. */ @@ -260,15 +262,14 @@ public Bytes getEncodedValue() { if (encodedValue.isPresent()) { return encodedValue.get(); } - List values = - Arrays.asList( - getStem(), - (Bytes) getHash().get(), - (Bytes) getCommitment().get(), - (Bytes) getLeftHash().get(), - (Bytes) getLeftCommitment().get(), - (Bytes) getRightHash().get(), - (Bytes) getRightCommitment().get()); + List values = Arrays.asList( + getStem(), + (Bytes) getHash().get(), + (Bytes) getCommitment().get(), + (Bytes) getLeftHash().get(), + (Bytes) getLeftCommitment().get(), + (Bytes) getRightHash().get(), + (Bytes) getRightCommitment().get()); Bytes result = RLP.encodeList(values, RLPWriter::writeValue); this.encodedValue = Optional.of(result); return result; @@ -298,26 +299,25 @@ private Bytes extractStem(final Bytes stemValue) { return stemValue.slice(0, 31); } - @Override public String toDot(Boolean showRepeatingEdges) { StringBuilder result = new StringBuilder() - .append(getClass().getSimpleName()).append(getLocation().orElse(Bytes.EMPTY)) - .append("[location=\"").append(getLocation().orElse(Bytes.EMPTY)) - .append("\", stem=\"").append(getStem()) - .append("\", leftCommitment=\"").append(getLeftCommitment().orElse(Bytes32.ZERO)) - .append("\", rightCommitment=\"").append(getRightCommitment().orElse(Bytes32.ZERO)).append("\"]\n"); + .append(getClass().getSimpleName()).append(getLocation().orElse(Bytes.EMPTY)) + .append("[location=\"").append(getLocation().orElse(Bytes.EMPTY)) + .append("\", stem=\"").append(getStem()) + .append("\", leftCommitment=\"").append(getLeftCommitment().orElse(Bytes32.ZERO)) + .append("\", rightCommitment=\"").append(getRightCommitment().orElse(Bytes32.ZERO)).append("\"]\n"); for (Node child : getChildren()) { - String edgeString = getClass().getSimpleName() + getLocation().orElse(Bytes.EMPTY) + " -> " + child.getClass().getSimpleName() - + child.getLocation().orElse(Bytes.EMPTY) + "\n"; + String edgeString = getClass().getSimpleName() + getLocation().orElse(Bytes.EMPTY) + " -> " + + child.getClass().getSimpleName() + + child.getLocation().orElse(Bytes.EMPTY) + "\n"; - if(showRepeatingEdges || !result.toString().contains(edgeString)) { + if (showRepeatingEdges || !result.toString().contains(edgeString)) { result.append(edgeString); } result.append(child.toDot(showRepeatingEdges)); } return result.toString(); } - } diff --git a/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/node/StoredNode.java b/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/node/StoredNode.java index 801f95c8..deaa547f 100644 --- a/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/node/StoredNode.java +++ b/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/node/StoredNode.java @@ -28,7 +28,8 @@ /** * Represents a regular node that can possibly be stored in storage. * - *

StoredNodes wrap regular nodes and loads them lazily from storage as needed. + *

+ * StoredNodes wrap regular nodes and loads them lazily from storage as needed. * * @param The type of the node's value. */ @@ -43,7 +44,7 @@ public class StoredNode implements Node { * Constructs a new StoredNode at location. * * @param nodeFactory The node factory for creating nodes from storage. - * @param location The location in the tree. + * @param location The location in the tree. */ public StoredNode(final NodeFactory nodeFactory, final Bytes location) { this.location = location; @@ -55,7 +56,7 @@ public StoredNode(final NodeFactory nodeFactory, final Bytes location) { * Accept a visitor to perform operations on the node based on a provided path. * * @param visitor The visitor to accept. - * @param path The path associated with a node. + * @param path The path associated with a node. * @return The result of visitor's operation. */ @Override @@ -175,7 +176,8 @@ public String print() { */ @Override public String toDot(Boolean showRepeatingEdges) { - String result = getClass().getSimpleName() + getLocation().orElse(Bytes.EMPTY) + "[location=\"" + getLocation().orElse(Bytes.EMPTY) + "\"]\n"; + String result = getClass().getSimpleName() + getLocation().orElse(Bytes.EMPTY) + "[location=\"" + + getLocation().orElse(Bytes.EMPTY) + "\"]\n"; return result; } diff --git a/src/test/java/org/hyperledger/besu/ethereum/trie/verkle/SimpleVerkleTrieTest.java b/src/test/java/org/hyperledger/besu/ethereum/trie/verkle/SimpleVerkleTrieTest.java index b4d016ed..784b2c16 100644 --- a/src/test/java/org/hyperledger/besu/ethereum/trie/verkle/SimpleVerkleTrieTest.java +++ b/src/test/java/org/hyperledger/besu/ethereum/trie/verkle/SimpleVerkleTrieTest.java @@ -25,297 +25,246 @@ public class SimpleVerkleTrieTest { + @Test + public void testToDotTrieOneValueNoRepeatingEdges() { + SimpleVerkleTrie trie = new SimpleVerkleTrie<>(); + Bytes32 key = Bytes32.fromHexString("0x00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff"); + Bytes32 value = Bytes32.fromHexString("0x1000000000000000000000000000000000000000000000000000000000000000"); + trie.put(key, value); - @Test - public void testToDotTrieOneValueNoRepeatingEdges() { - SimpleVerkleTrie trie = new SimpleVerkleTrie<>(); - Bytes32 key = Bytes32.fromHexString("0x00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff"); - Bytes32 value = Bytes32.fromHexString("0x1000000000000000000000000000000000000000000000000000000000000000"); - trie.put(key, value); + System.out.println(trie.toDotTree()); + } - System.out.println(trie.toDotTree()); - } + @Test + public void testToDotTrieTwoValuesNoRepeatingEdges() { + SimpleVerkleTrie trie = new SimpleVerkleTrie(); + Bytes32 key1 = Bytes32.fromHexString("0x00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff"); + Bytes32 value1 = Bytes32.fromHexString("0x1000000000000000000000000000000000000000000000000000000000000000"); + Bytes32 key2 = Bytes32.fromHexString("0x00112233445566778899aabbccddeeff00112233445566778899aabbccddee00"); + Bytes32 value2 = Bytes32.fromHexString("0x0100000000000000000000000000000000000000000000000000000000000000"); + trie.put(key1, value1); + trie.put(key2, value2); - @Test - public void testToDotTrieTwoValuesNoRepeatingEdges() { - SimpleVerkleTrie trie = new SimpleVerkleTrie(); - Bytes32 key1 = Bytes32.fromHexString("0x00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff"); - Bytes32 value1 = Bytes32.fromHexString("0x1000000000000000000000000000000000000000000000000000000000000000"); - Bytes32 key2 = Bytes32.fromHexString("0x00112233445566778899aabbccddeeff00112233445566778899aabbccddee00"); - Bytes32 value2 = Bytes32.fromHexString("0x0100000000000000000000000000000000000000000000000000000000000000"); + System.out.println(trie.toDotTree()); + } - trie.put(key1, value1); - trie.put(key2, value2); + @Test + public void testToDotTrieOneValueRepeatingEdges() { + SimpleVerkleTrie trie = new SimpleVerkleTrie<>(); + Bytes32 key = Bytes32.fromHexString("0x00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff"); + Bytes32 value = Bytes32.fromHexString("0x1000000000000000000000000000000000000000000000000000000000000000"); + trie.put(key, value); - System.out.println(trie.toDotTree()); - } - @Test - public void testToDotTrieOneValueRepeatingEdges() { - SimpleVerkleTrie trie = new SimpleVerkleTrie<>(); - Bytes32 key = Bytes32.fromHexString("0x00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff"); - Bytes32 value = Bytes32.fromHexString("0x1000000000000000000000000000000000000000000000000000000000000000"); - trie.put(key, value); + System.out.println(trie.toDotTree(true)); + } - System.out.println(trie.toDotTree(true)); - } + @Test + public void testToDotTrieTwoValuesRepeatingEdges() { + SimpleVerkleTrie trie = new SimpleVerkleTrie(); + Bytes32 key1 = Bytes32.fromHexString("0x00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff"); + Bytes32 value1 = Bytes32.fromHexString("0x1000000000000000000000000000000000000000000000000000000000000000"); + Bytes32 key2 = Bytes32.fromHexString("0x00112233445566778899aabbccddeeff00112233445566778899aabbccddee00"); + Bytes32 value2 = Bytes32.fromHexString("0x0100000000000000000000000000000000000000000000000000000000000000"); + trie.put(key1, value1); + trie.put(key2, value2); - @Test - public void testToDotTrieTwoValuesRepeatingEdges() { - SimpleVerkleTrie trie = new SimpleVerkleTrie(); - Bytes32 key1 = Bytes32.fromHexString("0x00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff"); - Bytes32 value1 = Bytes32.fromHexString("0x1000000000000000000000000000000000000000000000000000000000000000"); - Bytes32 key2 = Bytes32.fromHexString("0x00112233445566778899aabbccddeeff00112233445566778899aabbccddee00"); - Bytes32 value2 = Bytes32.fromHexString("0x0100000000000000000000000000000000000000000000000000000000000000"); + System.out.println(trie.toDotTree(true)); + } - trie.put(key1, value1); - trie.put(key2, value2); + @Test + public void testEmptyTrie() { + SimpleVerkleTrie trie = new SimpleVerkleTrie(); + assertThat(trie.getRootHash()).as("Retrieve root hash").isEqualByComparingTo(Bytes32.ZERO); + } - System.out.println(trie.toDotTree(true)); - } - @Test - public void testEmptyTrie() { - SimpleVerkleTrie trie = new SimpleVerkleTrie(); - assertThat(trie.getRootHash()).as("Retrieve root hash").isEqualByComparingTo(Bytes32.ZERO); - } + @Test + public void testOneValue() { + SimpleVerkleTrie trie = new SimpleVerkleTrie(); + Bytes32 key = Bytes32.fromHexString("0x00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff"); + Bytes32 value = Bytes32.fromHexString("0x1000000000000000000000000000000000000000000000000000000000000000"); + trie.put(key, value); + assertThat(trie.get(key)) + .as("Get one value should be the inserted value") + .isEqualTo(Optional.of(value)); + Bytes32 expectedRootHash = Bytes32 + .fromHexString("afceaacfd8f1d62ceff7d2bbfc733e42fdb40cef6f7c3c870a5bdd9203c30a16"); + assertThat(trie.getRootHash()).as("Retrieve root hash").isEqualByComparingTo(expectedRootHash); + } - @Test - public void testOneValue() { - SimpleVerkleTrie trie = new SimpleVerkleTrie(); - Bytes32 key = - Bytes32.fromHexString("0x00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff"); - Bytes32 value = - Bytes32.fromHexString("0x1000000000000000000000000000000000000000000000000000000000000000"); - trie.put(key, value); - assertThat(trie.get(key)) - .as("Get one value should be the inserted value") - .isEqualTo(Optional.of(value)); - Bytes32 expectedRootHash = - Bytes32.fromHexString("afceaacfd8f1d62ceff7d2bbfc733e42fdb40cef6f7c3c870a5bdd9203c30a16"); - assertThat(trie.getRootHash()).as("Retrieve root hash").isEqualByComparingTo(expectedRootHash); - } + @Test + public void testTwoValuesAtSameStem() throws Exception { + SimpleVerkleTrie trie = new SimpleVerkleTrie(); + Bytes32 key1 = Bytes32.fromHexString("0x00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff"); + Bytes32 value1 = Bytes32.fromHexString("0x1000000000000000000000000000000000000000000000000000000000000000"); + Bytes32 key2 = Bytes32.fromHexString("0x00112233445566778899aabbccddeeff00112233445566778899aabbccddee00"); + Bytes32 value2 = Bytes32.fromHexString("0x0100000000000000000000000000000000000000000000000000000000000000"); + Bytes32 key3 = Bytes32.fromHexString("0xde112233445566778899aabbccddeeff00112233445566778899aabbccddeeff"); + trie.put(key1, value1); + trie.put(key2, value2); + assertThat(trie.get(key1).get()).as("Get first value").isEqualByComparingTo(value1); + assertThat(trie.get(key2).get()).as("Get second value").isEqualByComparingTo(value2); + assertThat(trie.get(key3)).as("Get non-key returns empty").isEmpty(); - @Test - public void testTwoValuesAtSameStem() throws Exception { - SimpleVerkleTrie trie = new SimpleVerkleTrie(); - Bytes32 key1 = - Bytes32.fromHexString("0x00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff"); - Bytes32 value1 = - Bytes32.fromHexString("0x1000000000000000000000000000000000000000000000000000000000000000"); - Bytes32 key2 = - Bytes32.fromHexString("0x00112233445566778899aabbccddeeff00112233445566778899aabbccddee00"); - Bytes32 value2 = - Bytes32.fromHexString("0x0100000000000000000000000000000000000000000000000000000000000000"); - Bytes32 key3 = - Bytes32.fromHexString("0xde112233445566778899aabbccddeeff00112233445566778899aabbccddeeff"); - trie.put(key1, value1); - trie.put(key2, value2); - assertThat(trie.get(key1).get()).as("Get first value").isEqualByComparingTo(value1); - assertThat(trie.get(key2).get()).as("Get second value").isEqualByComparingTo(value2); - assertThat(trie.get(key3)).as("Get non-key returns empty").isEmpty(); + Bytes32 expectedRootHash = Bytes32 + .fromHexString("1defb89c793eb6cf89a90fe7e9bff4b96b5c9774ad21433adb959466a7669602"); + assertThat(trie.getRootHash()).as("Get root hash").isEqualByComparingTo(expectedRootHash); + } - Bytes32 expectedRootHash = - Bytes32.fromHexString("1defb89c793eb6cf89a90fe7e9bff4b96b5c9774ad21433adb959466a7669602"); - assertThat(trie.getRootHash()).as("Get root hash").isEqualByComparingTo(expectedRootHash); - } + @Test + public void testTwoValuesAtDifferentIndex() throws Exception { + SimpleVerkleTrie trie = new SimpleVerkleTrie(); + Bytes32 key1 = Bytes32.fromHexString("0x00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff"); + Bytes32 value1 = Bytes32.fromHexString("0x1000000000000000000000000000000000000000000000000000000000000000"); + Bytes32 key2 = Bytes32.fromHexString("0xff112233445566778899aabbccddeeff00112233445566778899aabbccddee00"); + Bytes32 value2 = Bytes32.fromHexString("0x0100000000000000000000000000000000000000000000000000000000000000"); + trie.put(key1, value1); + trie.put(key2, value2); + assertThat(trie.get(key1).get()).as("Get first value").isEqualByComparingTo(value1); + assertThat(trie.get(key2).get()).as("Get second value").isEqualByComparingTo(value2); + Bytes32 expectedRootHash = Bytes32 + .fromHexString("1758925a729ae085d4a2e32139f47c647f70495a6a38053bc0056996dd34b60e"); + assertThat(trie.getRootHash()).as("Retrieve root hash").isEqualByComparingTo(expectedRootHash); + } - @Test - public void testTwoValuesAtDifferentIndex() throws Exception { - SimpleVerkleTrie trie = new SimpleVerkleTrie(); - Bytes32 key1 = - Bytes32.fromHexString("0x00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff"); - Bytes32 value1 = - Bytes32.fromHexString("0x1000000000000000000000000000000000000000000000000000000000000000"); - Bytes32 key2 = - Bytes32.fromHexString("0xff112233445566778899aabbccddeeff00112233445566778899aabbccddee00"); - Bytes32 value2 = - Bytes32.fromHexString("0x0100000000000000000000000000000000000000000000000000000000000000"); - trie.put(key1, value1); - trie.put(key2, value2); - assertThat(trie.get(key1).get()).as("Get first value").isEqualByComparingTo(value1); - assertThat(trie.get(key2).get()).as("Get second value").isEqualByComparingTo(value2); - Bytes32 expectedRootHash = - Bytes32.fromHexString("1758925a729ae085d4a2e32139f47c647f70495a6a38053bc0056996dd34b60e"); - assertThat(trie.getRootHash()).as("Retrieve root hash").isEqualByComparingTo(expectedRootHash); - } + @Test + public void testTwoValuesWithDivergentStemsAtDepth2() throws Exception { + SimpleVerkleTrie trie = new SimpleVerkleTrie(); + Bytes32 key1 = Bytes32.fromHexString("0x00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff"); + Bytes32 value1 = Bytes32.fromHexString("0x1000000000000000000000000000000000000000000000000000000000000000"); + Bytes32 key2 = Bytes32.fromHexString("0x00ff112233445566778899aabbccddeeff00112233445566778899aabbccddee"); + Bytes32 value2 = Bytes32.fromHexString("0x0100000000000000000000000000000000000000000000000000000000000000"); + trie.put(key1, value1); + trie.put(key2, value2); + assertThat(trie.get(key1)).as("Retrieve first value").isEqualTo(Optional.of(value1)); + assertThat(trie.get(key2)).as("Retrieve second value").isEqualTo(Optional.of(value2)); + Bytes32 expectedRootHash = Bytes32 + .fromHexString("88028cbafb20137dba8b42d243cfcac81f6ac635cf984c7a89e54ef006bf750d"); + assertThat(trie.getRootHash()).as("Retrieve root hash").isEqualByComparingTo(expectedRootHash); + } - @Test - public void testTwoValuesWithDivergentStemsAtDepth2() throws Exception { - SimpleVerkleTrie trie = new SimpleVerkleTrie(); - Bytes32 key1 = - Bytes32.fromHexString("0x00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff"); - Bytes32 value1 = - Bytes32.fromHexString("0x1000000000000000000000000000000000000000000000000000000000000000"); - Bytes32 key2 = - Bytes32.fromHexString("0x00ff112233445566778899aabbccddeeff00112233445566778899aabbccddee"); - Bytes32 value2 = - Bytes32.fromHexString("0x0100000000000000000000000000000000000000000000000000000000000000"); - trie.put(key1, value1); - trie.put(key2, value2); - assertThat(trie.get(key1)).as("Retrieve first value").isEqualTo(Optional.of(value1)); - assertThat(trie.get(key2)).as("Retrieve second value").isEqualTo(Optional.of(value2)); - Bytes32 expectedRootHash = - Bytes32.fromHexString("88028cbafb20137dba8b42d243cfcac81f6ac635cf984c7a89e54ef006bf750d"); - assertThat(trie.getRootHash()).as("Retrieve root hash").isEqualByComparingTo(expectedRootHash); - } + @Test + public void testDeleteTwoValuesAtSameStem() throws Exception { + SimpleVerkleTrie trie = new SimpleVerkleTrie(); + Bytes32 key1 = Bytes32.fromHexString("0x00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff"); + Bytes32 value1 = Bytes32.fromHexString("0x1000000000000000000000000000000000000000000000000000000000000001"); + Bytes32 key2 = Bytes32.fromHexString("0x00112233445566778899aabbccddeeff00112233445566778899aabbccddee00"); + Bytes32 value2 = Bytes32.fromHexString("0x0100000000000000000000000000000000000000000000000000000000000002"); + trie.put(key1, value1); + trie.put(key2, value2); + trie.remove(key1); + assertThat(trie.get(key1)).as("Make sure value is deleted").isEqualTo(Optional.empty()); + trie.remove(key2); + assertThat(trie.get(key2)).as("Make sure value is deleted").isEqualTo(Optional.empty()); + } - @Test - public void testDeleteTwoValuesAtSameStem() throws Exception { - SimpleVerkleTrie trie = new SimpleVerkleTrie(); - Bytes32 key1 = - Bytes32.fromHexString("0x00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff"); - Bytes32 value1 = - Bytes32.fromHexString("0x1000000000000000000000000000000000000000000000000000000000000001"); - Bytes32 key2 = - Bytes32.fromHexString("0x00112233445566778899aabbccddeeff00112233445566778899aabbccddee00"); - Bytes32 value2 = - Bytes32.fromHexString("0x0100000000000000000000000000000000000000000000000000000000000002"); - trie.put(key1, value1); - trie.put(key2, value2); - trie.remove(key1); - assertThat(trie.get(key1)).as("Make sure value is deleted").isEqualTo(Optional.empty()); - trie.remove(key2); - assertThat(trie.get(key2)).as("Make sure value is deleted").isEqualTo(Optional.empty()); - } + @Test + public void testDeleteTwoValuesAtDifferentIndex() throws Exception { + SimpleVerkleTrie trie = new SimpleVerkleTrie(); + Bytes32 key1 = Bytes32.fromHexString("0x00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff"); + Bytes32 value1 = Bytes32.fromHexString("0x1000000000000000000000000000000000000000000000000000000000000000"); + Bytes32 key2 = Bytes32.fromHexString("0xff112233445566778899aabbccddeeff00112233445566778899aabbccddee00"); + Bytes32 value2 = Bytes32.fromHexString("0x0100000000000000000000000000000000000000000000000000000000000000"); + trie.put(key1, value1); + trie.put(key2, value2); + trie.remove(key1); + assertThat(trie.get(key1)).as("Make sure value is deleted").isEqualTo(Optional.empty()); + trie.remove(key2); + assertThat(trie.get(key2)).as("Make sure value is deleted").isEqualTo(Optional.empty()); + } - @Test - public void testDeleteTwoValuesAtDifferentIndex() throws Exception { - SimpleVerkleTrie trie = new SimpleVerkleTrie(); - Bytes32 key1 = - Bytes32.fromHexString("0x00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff"); - Bytes32 value1 = - Bytes32.fromHexString("0x1000000000000000000000000000000000000000000000000000000000000000"); - Bytes32 key2 = - Bytes32.fromHexString("0xff112233445566778899aabbccddeeff00112233445566778899aabbccddee00"); - Bytes32 value2 = - Bytes32.fromHexString("0x0100000000000000000000000000000000000000000000000000000000000000"); - trie.put(key1, value1); - trie.put(key2, value2); - trie.remove(key1); - assertThat(trie.get(key1)).as("Make sure value is deleted").isEqualTo(Optional.empty()); - trie.remove(key2); - assertThat(trie.get(key2)).as("Make sure value is deleted").isEqualTo(Optional.empty()); - } + @Test + public void testDeleteTwoValuesWithDivergentStemsAtDepth2() throws Exception { + SimpleVerkleTrie trie = new SimpleVerkleTrie(); + Bytes32 key1 = Bytes32.fromHexString("0x00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff"); + Bytes32 value1 = Bytes32.fromHexString("0x1000000000000000000000000000000000000000000000000000000000000000"); + Bytes32 key2 = Bytes32.fromHexString("0x00ff112233445566778899aabbccddeeff00112233445566778899aabbccddee"); + Bytes32 value2 = Bytes32.fromHexString("0x0100000000000000000000000000000000000000000000000000000000000000"); + trie.put(key1, value1); + trie.put(key2, value2); + trie.remove(key1); + assertThat(trie.get(key1)).as("Make sure value is deleted").isEqualTo(Optional.empty()); + trie.remove(key2); + assertThat(trie.get(key2)).as("Make sure value is deleted").isEqualTo(Optional.empty()); + } - @Test - public void testDeleteTwoValuesWithDivergentStemsAtDepth2() throws Exception { - SimpleVerkleTrie trie = new SimpleVerkleTrie(); - Bytes32 key1 = - Bytes32.fromHexString("0x00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff"); - Bytes32 value1 = - Bytes32.fromHexString("0x1000000000000000000000000000000000000000000000000000000000000000"); - Bytes32 key2 = - Bytes32.fromHexString("0x00ff112233445566778899aabbccddeeff00112233445566778899aabbccddee"); - Bytes32 value2 = - Bytes32.fromHexString("0x0100000000000000000000000000000000000000000000000000000000000000"); - trie.put(key1, value1); - trie.put(key2, value2); - trie.remove(key1); - assertThat(trie.get(key1)).as("Make sure value is deleted").isEqualTo(Optional.empty()); - trie.remove(key2); - assertThat(trie.get(key2)).as("Make sure value is deleted").isEqualTo(Optional.empty()); - } + @Test + public void testDeleteThreeValues() throws Exception { + SimpleVerkleTrie trie = new SimpleVerkleTrie(); + Bytes32 key1 = Bytes32.fromHexString("0x00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff"); + Bytes32 value1 = Bytes32.fromHexString("0x1000000000000000000000000000000000000000000000000000000000000000"); + Bytes32 key2 = Bytes32.fromHexString("0x00ff112233445566778899aabbccddeeff00112233445566778899aabbccddee"); + Bytes32 value2 = Bytes32.fromHexString("0x0200000000000000000000000000000000000000000000000000000000000000"); + Bytes32 key3 = Bytes32.fromHexString("0x00ff112233445566778899aabbccddeeff00112233445566778899aabbccddff"); + Bytes32 value3 = Bytes32.fromHexString("0x0300000000000000000000000000000000000000000000000000000000000000"); + trie.put(key1, value1); + trie.put(key2, value2); + trie.put(key3, value3); + trie.remove(key3); + assertThat(trie.get(key3)).as("Make sure value is deleted").isEqualTo(Optional.empty()); + assertThat(trie.get(key2)).as("Retrieve second value").isEqualTo(Optional.of(value2)); + trie.remove(key2); + assertThat(trie.get(key2)).as("Make sure value is deleted").isEqualTo(Optional.empty()); + assertThat(trie.get(key1)).as("Retrieve first value").isEqualTo(Optional.of(value1)); + trie.remove(key1); + assertThat(trie.get(key1)).as("Make sure value is deleted").isEqualTo(Optional.empty()); + } - @Test - public void testDeleteThreeValues() throws Exception { - SimpleVerkleTrie trie = new SimpleVerkleTrie(); - Bytes32 key1 = - Bytes32.fromHexString("0x00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff"); - Bytes32 value1 = - Bytes32.fromHexString("0x1000000000000000000000000000000000000000000000000000000000000000"); - Bytes32 key2 = - Bytes32.fromHexString("0x00ff112233445566778899aabbccddeeff00112233445566778899aabbccddee"); - Bytes32 value2 = - Bytes32.fromHexString("0x0200000000000000000000000000000000000000000000000000000000000000"); - Bytes32 key3 = - Bytes32.fromHexString("0x00ff112233445566778899aabbccddeeff00112233445566778899aabbccddff"); - Bytes32 value3 = - Bytes32.fromHexString("0x0300000000000000000000000000000000000000000000000000000000000000"); - trie.put(key1, value1); - trie.put(key2, value2); - trie.put(key3, value3); - trie.remove(key3); - assertThat(trie.get(key3)).as("Make sure value is deleted").isEqualTo(Optional.empty()); - assertThat(trie.get(key2)).as("Retrieve second value").isEqualTo(Optional.of(value2)); - trie.remove(key2); - assertThat(trie.get(key2)).as("Make sure value is deleted").isEqualTo(Optional.empty()); - assertThat(trie.get(key1)).as("Retrieve first value").isEqualTo(Optional.of(value1)); - trie.remove(key1); - assertThat(trie.get(key1)).as("Make sure value is deleted").isEqualTo(Optional.empty()); - } + @Test + public void testDeleteThreeValuesWithFlattening() throws Exception { + SimpleVerkleTrie trie = new SimpleVerkleTrie(); + Bytes32 key1 = Bytes32.fromHexString("0x00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff"); + Bytes32 value1 = Bytes32.fromHexString("0x1000000000000000000000000000000000000000000000000000000000000000"); + Bytes32 key2 = Bytes32.fromHexString("0x00ff112233445566778899aabbccddeeff00112233445566778899aabbccddee"); + Bytes32 value2 = Bytes32.fromHexString("0x0200000000000000000000000000000000000000000000000000000000000000"); + Bytes32 key3 = Bytes32.fromHexString("0x00ff112233445566778899aabbccddeeff00112233445566778899aabbccddff"); + Bytes32 value3 = Bytes32.fromHexString("0x0300000000000000000000000000000000000000000000000000000000000000"); + trie.put(key1, value1); + trie.put(key2, value2); + trie.put(key3, value3); + trie.remove(key1); + assertThat(trie.get(key1)).as("First value has been deleted").isEqualTo(Optional.empty()); + assertThat(trie.get(key2)).as("Second value").isEqualTo(Optional.of(value2)); + trie.remove(key2); + assertThat(trie.get(key2)).as("Second value has been deleted").isEqualTo(Optional.empty()); + assertThat(trie.get(key3)).as("Third value").isEqualTo(Optional.of(value3)); + trie.remove(key3); + assertThat(trie.get(key3)).as("Third value has been deleted").isEqualTo(Optional.empty()); + } - @Test - public void testDeleteThreeValuesWithFlattening() throws Exception { - SimpleVerkleTrie trie = new SimpleVerkleTrie(); - Bytes32 key1 = - Bytes32.fromHexString("0x00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff"); - Bytes32 value1 = - Bytes32.fromHexString("0x1000000000000000000000000000000000000000000000000000000000000000"); - Bytes32 key2 = - Bytes32.fromHexString("0x00ff112233445566778899aabbccddeeff00112233445566778899aabbccddee"); - Bytes32 value2 = - Bytes32.fromHexString("0x0200000000000000000000000000000000000000000000000000000000000000"); - Bytes32 key3 = - Bytes32.fromHexString("0x00ff112233445566778899aabbccddeeff00112233445566778899aabbccddff"); - Bytes32 value3 = - Bytes32.fromHexString("0x0300000000000000000000000000000000000000000000000000000000000000"); - trie.put(key1, value1); - trie.put(key2, value2); - trie.put(key3, value3); - trie.remove(key1); - assertThat(trie.get(key1)).as("First value has been deleted").isEqualTo(Optional.empty()); - assertThat(trie.get(key2)).as("Second value").isEqualTo(Optional.of(value2)); - trie.remove(key2); - assertThat(trie.get(key2)).as("Second value has been deleted").isEqualTo(Optional.empty()); - assertThat(trie.get(key3)).as("Third value").isEqualTo(Optional.of(value3)); - trie.remove(key3); - assertThat(trie.get(key3)).as("Third value has been deleted").isEqualTo(Optional.empty()); - } - - @Test - public void testDeleteManyValuesWithDivergentStemsAtDepth2() throws Exception { - SimpleVerkleTrie trie = new SimpleVerkleTrie<>(); - assertThat(trie.getRootHash()).isEqualTo(Bytes32.ZERO); - Bytes32 key0 = - Bytes32.fromHexString("0x1e4abaeaa58259f4784e086ddbaa74a9d3975efb2e4380595f0eed5692c45641"); - Bytes32 value0 = - Bytes32.fromHexString("0x0000000000000000000000000000000000000000000000000000000000000001"); - Bytes32 key1 = - Bytes32.fromHexString("0x1e4abaeaa58259f4784e086ddbaa74a9d3975efb2e4380595f0eed5692c45601"); - Bytes32 value1 = - Bytes32.fromHexString("0x0000000000000000000000000000000000000000000000000000000000000001"); - Bytes32 key2 = - Bytes32.fromHexString("0x1e4abaeaa58259f4784e086ddbaa74a9d3975efb2e4380595f0eed5692c45602"); - Bytes32 value2 = Bytes32.fromHexString("0x01"); - Bytes32 key3 = - Bytes32.fromHexString("0x1e4abaeaa58259f4784e086ddbaa74a9d3975efb2e4380595f0eed5692c45600"); - Bytes32 value3 = Bytes32.fromHexString("0x00"); - Bytes32 key4 = - Bytes32.fromHexString("0x1e4abaeaa58259f4784e086ddbaa74a9d3975efb2e4380595f0eed5692c45603"); - Bytes32 value4 = - Bytes32.fromHexString("0xf84a97f1f0a956e738abd85c2e0a5026f8874e3ec09c8f012159dfeeaab2b156"); - Bytes32 key5 = - Bytes32.fromHexString("0x1e4abaeaa58259f4784e086ddbaa74a9d3975efb2e4380595f0eed5692c45604"); - Bytes32 value5 = Bytes32.fromHexString("0x03"); - Bytes32 key6 = - Bytes32.fromHexString("0x1e4abaeaa58259f4784e086ddbaa74a9d3975efb2e4380595f0eed5692c45680"); - Bytes32 value6 = - Bytes32.fromHexString("0x0000010200000000000000000000000000000000000000000000000000000000"); - trie.put(key0, value0); - trie.put(key1, value1); - trie.put(key2, value2); - trie.put(key3, value3); - trie.put(key4, value4); - trie.put(key5, value5); - trie.put(key6, value6); - trie.remove(key0); - trie.remove(key4); - trie.remove(key5); - trie.remove(key6); - trie.remove(key3); - trie.remove(key1); - trie.remove(key2); - assertThat(trie.getRootHash()).isEqualTo(Bytes32.ZERO); - } + @Test + public void testDeleteManyValuesWithDivergentStemsAtDepth2() throws Exception { + SimpleVerkleTrie trie = new SimpleVerkleTrie<>(); + assertThat(trie.getRootHash()).isEqualTo(Bytes32.ZERO); + Bytes32 key0 = Bytes32.fromHexString("0x1e4abaeaa58259f4784e086ddbaa74a9d3975efb2e4380595f0eed5692c45641"); + Bytes32 value0 = Bytes32.fromHexString("0x0000000000000000000000000000000000000000000000000000000000000001"); + Bytes32 key1 = Bytes32.fromHexString("0x1e4abaeaa58259f4784e086ddbaa74a9d3975efb2e4380595f0eed5692c45601"); + Bytes32 value1 = Bytes32.fromHexString("0x0000000000000000000000000000000000000000000000000000000000000001"); + Bytes32 key2 = Bytes32.fromHexString("0x1e4abaeaa58259f4784e086ddbaa74a9d3975efb2e4380595f0eed5692c45602"); + Bytes32 value2 = Bytes32.fromHexString("0x01"); + Bytes32 key3 = Bytes32.fromHexString("0x1e4abaeaa58259f4784e086ddbaa74a9d3975efb2e4380595f0eed5692c45600"); + Bytes32 value3 = Bytes32.fromHexString("0x00"); + Bytes32 key4 = Bytes32.fromHexString("0x1e4abaeaa58259f4784e086ddbaa74a9d3975efb2e4380595f0eed5692c45603"); + Bytes32 value4 = Bytes32.fromHexString("0xf84a97f1f0a956e738abd85c2e0a5026f8874e3ec09c8f012159dfeeaab2b156"); + Bytes32 key5 = Bytes32.fromHexString("0x1e4abaeaa58259f4784e086ddbaa74a9d3975efb2e4380595f0eed5692c45604"); + Bytes32 value5 = Bytes32.fromHexString("0x03"); + Bytes32 key6 = Bytes32.fromHexString("0x1e4abaeaa58259f4784e086ddbaa74a9d3975efb2e4380595f0eed5692c45680"); + Bytes32 value6 = Bytes32.fromHexString("0x0000010200000000000000000000000000000000000000000000000000000000"); + trie.put(key0, value0); + trie.put(key1, value1); + trie.put(key2, value2); + trie.put(key3, value3); + trie.put(key4, value4); + trie.put(key5, value5); + trie.put(key6, value6); + trie.remove(key0); + trie.remove(key4); + trie.remove(key5); + trie.remove(key6); + trie.remove(key3); + trie.remove(key1); + trie.remove(key2); + assertThat(trie.getRootHash()).isEqualTo(Bytes32.ZERO); + } } From cdcb410bce7008e660599784e1341db53d49bbfd Mon Sep 17 00:00:00 2001 From: "Filip.Gumula" Date: Tue, 14 Nov 2023 14:26:51 +0100 Subject: [PATCH 06/25] Modification of toDot method, added showRepeatingEdges flag, to manage possibility of displaying repeating edges, if 'true' show all adges, if 'false' don't display repeating edges Signed-off-by: Neo --- .../hyperledger/besu/ethereum/trie/verkle/SimpleVerkleTrie.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/SimpleVerkleTrie.java b/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/SimpleVerkleTrie.java index f8cc72d9..5a751dc3 100644 --- a/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/SimpleVerkleTrie.java +++ b/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/SimpleVerkleTrie.java @@ -170,7 +170,7 @@ public String toDotTree(Boolean showRepeatingEdges) { public String toDotTree() { StringBuilder result = new StringBuilder("digraph VerkleTrie {\n"); Node root = getRoot(); - result.append(root.toDot()); + result.append(root.toDot(showRepeatingEdges)); return result.append("}\n").toString(); } } From 75a637734a720015c0d87d663dae26de3dc22299 Mon Sep 17 00:00:00 2001 From: "Filip.Gumula" Date: Wed, 15 Nov 2023 12:19:39 +0100 Subject: [PATCH 07/25] Refactor toDot() method in nodes for improved readabiility by replacing StringBuilder usage with String.format() Signed-off-by: Neo --- .../besu/ethereum/trie/verkle/node/BranchNode.java | 4 ++-- .../besu/ethereum/trie/verkle/node/InternalNode.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/node/BranchNode.java b/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/node/BranchNode.java index f933e04b..5e136717 100644 --- a/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/node/BranchNode.java +++ b/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/node/BranchNode.java @@ -264,8 +264,8 @@ public String toDot(Boolean showRepeatingEdges) { if (showRepeatingEdges || !result.toString().contains(edgeString)) { result.append(edgeString); } - result.append(child.toDot(showRepeatingEdges)); + result += child.toDot(showRepeatingEdges); } - return result.toString(); + return result; } } diff --git a/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/node/InternalNode.java b/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/node/InternalNode.java index adf44919..8a8e3de5 100644 --- a/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/node/InternalNode.java +++ b/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/node/InternalNode.java @@ -181,8 +181,8 @@ public String toDot(Boolean showRepeatingEdges) { if (showRepeatingEdges || !result.toString().contains(edgeString)) { result.append(edgeString); } - result.append(child.toDot(showRepeatingEdges)); + result += child.toDot(showRepeatingEdges); } - return result.toString(); + return result; } } From 975a050bbbb7f9feddf65254b5665f69211fe6e8 Mon Sep 17 00:00:00 2001 From: "Filip.Gumula" Date: Wed, 15 Nov 2023 12:26:45 +0100 Subject: [PATCH 08/25] Move tests related to toDot() method to a separate class 'DotDisplayTest'. Signed-off-by: Neo --- .../ethereum/trie/verkle/DotDisplayTest.java | 54 +++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 src/test/java/org/hyperledger/besu/ethereum/trie/verkle/DotDisplayTest.java diff --git a/src/test/java/org/hyperledger/besu/ethereum/trie/verkle/DotDisplayTest.java b/src/test/java/org/hyperledger/besu/ethereum/trie/verkle/DotDisplayTest.java new file mode 100644 index 00000000..e5395893 --- /dev/null +++ b/src/test/java/org/hyperledger/besu/ethereum/trie/verkle/DotDisplayTest.java @@ -0,0 +1,54 @@ +package org.hyperledger.besu.ethereum.trie.verkle; + +import org.apache.tuweni.bytes.Bytes32; +import org.junit.jupiter.api.Test; + +public class DotDisplayTest { + + @Test + public void testToDotTrieOneValueNoRepeatingEdges() { + SimpleVerkleTrie trie = new SimpleVerkleTrie<>(); + Bytes32 key = Bytes32.fromHexString("0x00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff"); + Bytes32 value = Bytes32.fromHexString("0x1000000000000000000000000000000000000000000000000000000000000000"); + trie.put(key, value); + + System.out.println(trie.toDotTree()); + } + + @Test + public void testToDotTrieTwoValuesNoRepeatingEdges() { + SimpleVerkleTrie trie = new SimpleVerkleTrie(); + Bytes32 key1 = Bytes32.fromHexString("0x00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff"); + Bytes32 value1 = Bytes32.fromHexString("0x1000000000000000000000000000000000000000000000000000000000000000"); + Bytes32 key2 = Bytes32.fromHexString("0x00112233445566778899aabbccddeeff00112233445566778899aabbccddee00"); + Bytes32 value2 = Bytes32.fromHexString("0x0100000000000000000000000000000000000000000000000000000000000000"); + + trie.put(key1, value1); + trie.put(key2, value2); + + System.out.println(trie.toDotTree()); + } + @Test + public void testToDotTrieOneValueRepeatingEdges() { + SimpleVerkleTrie trie = new SimpleVerkleTrie<>(); + Bytes32 key = Bytes32.fromHexString("0x00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff"); + Bytes32 value = Bytes32.fromHexString("0x1000000000000000000000000000000000000000000000000000000000000000"); + trie.put(key, value); + + System.out.println(trie.toDotTree(true)); + } + + @Test + public void testToDotTrieTwoValuesRepeatingEdges() { + SimpleVerkleTrie trie = new SimpleVerkleTrie(); + Bytes32 key1 = Bytes32.fromHexString("0x00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff"); + Bytes32 value1 = Bytes32.fromHexString("0x1000000000000000000000000000000000000000000000000000000000000000"); + Bytes32 key2 = Bytes32.fromHexString("0x00112233445566778899aabbccddeeff00112233445566778899aabbccddee00"); + Bytes32 value2 = Bytes32.fromHexString("0x0100000000000000000000000000000000000000000000000000000000000000"); + + trie.put(key1, value1); + trie.put(key2, value2); + + System.out.println(trie.toDotTree(true)); + } +} From b8b19723b578b9f29814765024e6d0dc0eb511af Mon Sep 17 00:00:00 2001 From: "Filip.Gumula" Date: Wed, 15 Nov 2023 12:31:31 +0100 Subject: [PATCH 09/25] Modify toDotTrie() methods to use String.format() Signed-off-by: Neo --- .../besu/ethereum/trie/verkle/SimpleVerkleTrie.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/SimpleVerkleTrie.java b/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/SimpleVerkleTrie.java index 5a751dc3..ea97d405 100644 --- a/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/SimpleVerkleTrie.java +++ b/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/SimpleVerkleTrie.java @@ -153,10 +153,7 @@ public void commit(final NodeUpdater nodeUpdater) { * @return The DOT representation of the Verkle Trie. */ public String toDotTree(Boolean showRepeatingEdges) { - StringBuilder result = new StringBuilder("digraph VerkleTrie {\n"); - Node root = getRoot(); - result.append(root.toDot(showRepeatingEdges)); - return result.append("}\n").toString(); + return String.format("digraph VerkleTrie {%s}\n", getRoot().toDot(showRepeatingEdges)); } /** @@ -168,9 +165,13 @@ public String toDotTree(Boolean showRepeatingEdges) { * @return The DOT representation of the Verkle Trie. */ public String toDotTree() { +<<<<<<< HEAD StringBuilder result = new StringBuilder("digraph VerkleTrie {\n"); Node root = getRoot(); result.append(root.toDot(showRepeatingEdges)); return result.append("}\n").toString(); +======= + return String.format("digraph VerkleTrie {%s}\n", getRoot().toDot()); +>>>>>>> e46a961 (Modify toDotTrie() methods to use String.format()) } } From e63d3900f7bdbe0f8cba64969a8bbaea487e4658 Mon Sep 17 00:00:00 2001 From: "Filip.Gumula" Date: Wed, 15 Nov 2023 12:33:01 +0100 Subject: [PATCH 10/25] Small fix for toDotTree() methods Signed-off-by: Neo --- .../besu/ethereum/trie/verkle/SimpleVerkleTrie.java | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/SimpleVerkleTrie.java b/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/SimpleVerkleTrie.java index ea97d405..f0153080 100644 --- a/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/SimpleVerkleTrie.java +++ b/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/SimpleVerkleTrie.java @@ -153,7 +153,7 @@ public void commit(final NodeUpdater nodeUpdater) { * @return The DOT representation of the Verkle Trie. */ public String toDotTree(Boolean showRepeatingEdges) { - return String.format("digraph VerkleTrie {%s}\n", getRoot().toDot(showRepeatingEdges)); + return String.format("digraph VerkleTrie {\n%s}\n", getRoot().toDot(showRepeatingEdges)); } /** @@ -165,13 +165,9 @@ public String toDotTree(Boolean showRepeatingEdges) { * @return The DOT representation of the Verkle Trie. */ public String toDotTree() { -<<<<<<< HEAD StringBuilder result = new StringBuilder("digraph VerkleTrie {\n"); Node root = getRoot(); - result.append(root.toDot(showRepeatingEdges)); + result.append(root.toDot()); return result.append("}\n").toString(); -======= - return String.format("digraph VerkleTrie {%s}\n", getRoot().toDot()); ->>>>>>> e46a961 (Modify toDotTrie() methods to use String.format()) } } From 526beab998b6c9139656d828b396a7491109e446 Mon Sep 17 00:00:00 2001 From: "Filip.Gumula" Date: Wed, 15 Nov 2023 13:12:24 +0100 Subject: [PATCH 11/25] Add missing assert for the tests. Signed-off-by: Neo --- .../ethereum/trie/verkle/DotDisplayTest.java | 20 +++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/src/test/java/org/hyperledger/besu/ethereum/trie/verkle/DotDisplayTest.java b/src/test/java/org/hyperledger/besu/ethereum/trie/verkle/DotDisplayTest.java index e5395893..c5c14498 100644 --- a/src/test/java/org/hyperledger/besu/ethereum/trie/verkle/DotDisplayTest.java +++ b/src/test/java/org/hyperledger/besu/ethereum/trie/verkle/DotDisplayTest.java @@ -3,6 +3,8 @@ import org.apache.tuweni.bytes.Bytes32; import org.junit.jupiter.api.Test; +import static org.junit.jupiter.api.Assertions.assertEquals; + public class DotDisplayTest { @Test @@ -12,7 +14,9 @@ public void testToDotTrieOneValueNoRepeatingEdges() { Bytes32 value = Bytes32.fromHexString("0x1000000000000000000000000000000000000000000000000000000000000000"); trie.put(key, value); - System.out.println(trie.toDotTree()); + String expectedTree = "digraph VerkleTrie {\n" + "InternalNode0x[location=\"0x\", commitment=\"0x0000000000000000000000000000000000000000000000000000000000000000\"]\n" + "InternalNode0x -> StemNode0x00\n" + "StemNode0x00[location=\"0x00\", stem=\"0x00112233445566778899aabbccddeeff00112233445566778899aabbccddee\", leftCommitment=\"0x0000000000000000000000000000000000000000000000000000000000000000\", rightCommitment=\"0x0000000000000000000000000000000000000000000000000000000000000000\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> LeafNode0x00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff\n" + "LeafNode0x00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff[location=\"0x00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff\", suffix=\"-1\", value=\"0x1000000000000000000000000000000000000000000000000000000000000000\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "}\n"; + String actualTree = trie.toDotTree(); + assertEquals(expectedTree, actualTree); } @Test @@ -26,8 +30,11 @@ public void testToDotTrieTwoValuesNoRepeatingEdges() { trie.put(key1, value1); trie.put(key2, value2); - System.out.println(trie.toDotTree()); + String expectedTree = "digraph VerkleTrie {\n" + "InternalNode0x[location=\"0x\", commitment=\"0x0000000000000000000000000000000000000000000000000000000000000000\"]\n" + "InternalNode0x -> StemNode0x00\n" + "StemNode0x00[location=\"0x00\", stem=\"0x00112233445566778899aabbccddeeff00112233445566778899aabbccddee\", leftCommitment=\"0x0000000000000000000000000000000000000000000000000000000000000000\", rightCommitment=\"0x0000000000000000000000000000000000000000000000000000000000000000\"]\n" + "StemNode0x00 -> LeafNode0x00112233445566778899aabbccddeeff00112233445566778899aabbccddee00\n" + "LeafNode0x00112233445566778899aabbccddeeff00112233445566778899aabbccddee00[location=\"0x00112233445566778899aabbccddeeff00112233445566778899aabbccddee00\", suffix=\"0\", value=\"0x0100000000000000000000000000000000000000000000000000000000000000\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> LeafNode0x00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff\n" + "LeafNode0x00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff[location=\"0x00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff\", suffix=\"-1\", value=\"0x1000000000000000000000000000000000000000000000000000000000000000\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "}\n"; + String actualTree = trie.toDotTree(); + assertEquals(expectedTree, actualTree); } + @Test public void testToDotTrieOneValueRepeatingEdges() { SimpleVerkleTrie trie = new SimpleVerkleTrie<>(); @@ -35,7 +42,10 @@ public void testToDotTrieOneValueRepeatingEdges() { Bytes32 value = Bytes32.fromHexString("0x1000000000000000000000000000000000000000000000000000000000000000"); trie.put(key, value); - System.out.println(trie.toDotTree(true)); + String expectedTree = "digraph VerkleTrie {\n" + "InternalNode0x[location=\"0x\", commitment=\"0x0000000000000000000000000000000000000000000000000000000000000000\"]\n" + "InternalNode0x -> StemNode0x00\n" + "StemNode0x00[location=\"0x00\", stem=\"0x00112233445566778899aabbccddeeff00112233445566778899aabbccddee\", leftCommitment=\"0x0000000000000000000000000000000000000000000000000000000000000000\", rightCommitment=\"0x0000000000000000000000000000000000000000000000000000000000000000\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> LeafNode0x00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff\n" + "LeafNode0x00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff[location=\"0x00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff\", suffix=\"-1\", value=\"0x1000000000000000000000000000000000000000000000000000000000000000\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "}\n"; + + String actualTree = trie.toDotTree(true); + assertEquals(expectedTree, actualTree); } @Test @@ -49,6 +59,8 @@ public void testToDotTrieTwoValuesRepeatingEdges() { trie.put(key1, value1); trie.put(key2, value2); - System.out.println(trie.toDotTree(true)); + String expectedTree = "digraph VerkleTrie {\n" + "InternalNode0x[location=\"0x\", commitment=\"0x0000000000000000000000000000000000000000000000000000000000000000\"]\n" + "InternalNode0x -> StemNode0x00\n" + "StemNode0x00[location=\"0x00\", stem=\"0x00112233445566778899aabbccddeeff00112233445566778899aabbccddee\", leftCommitment=\"0x0000000000000000000000000000000000000000000000000000000000000000\", rightCommitment=\"0x0000000000000000000000000000000000000000000000000000000000000000\"]\n" + "StemNode0x00 -> LeafNode0x00112233445566778899aabbccddeeff00112233445566778899aabbccddee00\n" + "LeafNode0x00112233445566778899aabbccddeeff00112233445566778899aabbccddee00[location=\"0x00112233445566778899aabbccddeeff00112233445566778899aabbccddee00\", suffix=\"0\", value=\"0x0100000000000000000000000000000000000000000000000000000000000000\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> LeafNode0x00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff\n" + "LeafNode0x00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff[location=\"0x00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff\", suffix=\"-1\", value=\"0x1000000000000000000000000000000000000000000000000000000000000000\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "}\n"; + String actualTree = trie.toDotTree(true); + assertEquals(expectedTree, actualTree); } } From 458c6b5c2bdaccb32096f6fc59d206b62c0d5664 Mon Sep 17 00:00:00 2001 From: "Filip.Gumula" Date: Wed, 15 Nov 2023 15:46:13 +0100 Subject: [PATCH 12/25] Move expected dot representations to separate files in resources. Modify tests accordingly to read from files. Signed-off-by: Neo --- .../ethereum/trie/verkle/DotDisplayTest.java | 50 +- .../expectedTreeOneValueNoRepeatingEdges.txt | 520 +++++++++ .../expectedTreeOneValueRepeatingEdges.txt | 1028 +++++++++++++++++ .../expectedTreeTwoValuesNoRepeatingEdges.txt | 521 +++++++++ .../expectedTreeTwoValuesRepeatingEdges.txt | 1028 +++++++++++++++++ 5 files changed, 3134 insertions(+), 13 deletions(-) create mode 100644 src/test/resources/expectedTreeOneValueNoRepeatingEdges.txt create mode 100644 src/test/resources/expectedTreeOneValueRepeatingEdges.txt create mode 100644 src/test/resources/expectedTreeTwoValuesNoRepeatingEdges.txt create mode 100644 src/test/resources/expectedTreeTwoValuesRepeatingEdges.txt diff --git a/src/test/java/org/hyperledger/besu/ethereum/trie/verkle/DotDisplayTest.java b/src/test/java/org/hyperledger/besu/ethereum/trie/verkle/DotDisplayTest.java index c5c14498..98fd1ad2 100644 --- a/src/test/java/org/hyperledger/besu/ethereum/trie/verkle/DotDisplayTest.java +++ b/src/test/java/org/hyperledger/besu/ethereum/trie/verkle/DotDisplayTest.java @@ -3,24 +3,46 @@ import org.apache.tuweni.bytes.Bytes32; import org.junit.jupiter.api.Test; +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStreamReader; +import java.nio.charset.StandardCharsets; +import java.util.stream.Collectors; + import static org.junit.jupiter.api.Assertions.assertEquals; public class DotDisplayTest { + /** + * Reads the content of a file from the resources folder. + * + * @param fileName The name of the file in the resources folder. + * @return The content of the file as a String. + * @throws IOException If an I/O error occurs. + */ + private String getResources(final String fileName) throws IOException { + var classLoader = DotDisplayTest.class.getClassLoader(); + try (BufferedReader reader = new BufferedReader(new InputStreamReader( + classLoader.getResourceAsStream(fileName), StandardCharsets.UTF_8))) { + + return reader.lines().collect(Collectors.joining("\n")); + } + } @Test - public void testToDotTrieOneValueNoRepeatingEdges() { + public void testToDotTrieOneValueNoRepeatingEdges() throws IOException { SimpleVerkleTrie trie = new SimpleVerkleTrie<>(); Bytes32 key = Bytes32.fromHexString("0x00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff"); Bytes32 value = Bytes32.fromHexString("0x1000000000000000000000000000000000000000000000000000000000000000"); trie.put(key, value); - String expectedTree = "digraph VerkleTrie {\n" + "InternalNode0x[location=\"0x\", commitment=\"0x0000000000000000000000000000000000000000000000000000000000000000\"]\n" + "InternalNode0x -> StemNode0x00\n" + "StemNode0x00[location=\"0x00\", stem=\"0x00112233445566778899aabbccddeeff00112233445566778899aabbccddee\", leftCommitment=\"0x0000000000000000000000000000000000000000000000000000000000000000\", rightCommitment=\"0x0000000000000000000000000000000000000000000000000000000000000000\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> LeafNode0x00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff\n" + "LeafNode0x00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff[location=\"0x00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff\", suffix=\"-1\", value=\"0x1000000000000000000000000000000000000000000000000000000000000000\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "}\n"; - String actualTree = trie.toDotTree(); + final String fileName = "expectedTreeOneValueNoRepeatingEdges.txt"; + final String expectedTree = getResources(fileName); + final String actualTree = trie.toDotTree(); assertEquals(expectedTree, actualTree); } @Test - public void testToDotTrieTwoValuesNoRepeatingEdges() { + public void testToDotTrieTwoValuesNoRepeatingEdges() throws IOException { SimpleVerkleTrie trie = new SimpleVerkleTrie(); Bytes32 key1 = Bytes32.fromHexString("0x00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff"); Bytes32 value1 = Bytes32.fromHexString("0x1000000000000000000000000000000000000000000000000000000000000000"); @@ -30,26 +52,27 @@ public void testToDotTrieTwoValuesNoRepeatingEdges() { trie.put(key1, value1); trie.put(key2, value2); - String expectedTree = "digraph VerkleTrie {\n" + "InternalNode0x[location=\"0x\", commitment=\"0x0000000000000000000000000000000000000000000000000000000000000000\"]\n" + "InternalNode0x -> StemNode0x00\n" + "StemNode0x00[location=\"0x00\", stem=\"0x00112233445566778899aabbccddeeff00112233445566778899aabbccddee\", leftCommitment=\"0x0000000000000000000000000000000000000000000000000000000000000000\", rightCommitment=\"0x0000000000000000000000000000000000000000000000000000000000000000\"]\n" + "StemNode0x00 -> LeafNode0x00112233445566778899aabbccddeeff00112233445566778899aabbccddee00\n" + "LeafNode0x00112233445566778899aabbccddeeff00112233445566778899aabbccddee00[location=\"0x00112233445566778899aabbccddeeff00112233445566778899aabbccddee00\", suffix=\"0\", value=\"0x0100000000000000000000000000000000000000000000000000000000000000\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> LeafNode0x00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff\n" + "LeafNode0x00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff[location=\"0x00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff\", suffix=\"-1\", value=\"0x1000000000000000000000000000000000000000000000000000000000000000\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "NullNode0x[location=\"0x\"]\n" + "}\n"; - String actualTree = trie.toDotTree(); + final String fileName = "expectedTreeTwoValuesNoRepeatingEdges.txt"; + final String expectedTree = getResources(fileName);; + final String actualTree = trie.toDotTree(); assertEquals(expectedTree, actualTree); } @Test - public void testToDotTrieOneValueRepeatingEdges() { + public void testToDotTrieOneValueRepeatingEdges() throws IOException { SimpleVerkleTrie trie = new SimpleVerkleTrie<>(); Bytes32 key = Bytes32.fromHexString("0x00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff"); Bytes32 value = Bytes32.fromHexString("0x1000000000000000000000000000000000000000000000000000000000000000"); trie.put(key, value); - String expectedTree = "digraph VerkleTrie {\n" + "InternalNode0x[location=\"0x\", commitment=\"0x0000000000000000000000000000000000000000000000000000000000000000\"]\n" + "InternalNode0x -> StemNode0x00\n" + "StemNode0x00[location=\"0x00\", stem=\"0x00112233445566778899aabbccddeeff00112233445566778899aabbccddee\", leftCommitment=\"0x0000000000000000000000000000000000000000000000000000000000000000\", rightCommitment=\"0x0000000000000000000000000000000000000000000000000000000000000000\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> LeafNode0x00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff\n" + "LeafNode0x00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff[location=\"0x00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff\", suffix=\"-1\", value=\"0x1000000000000000000000000000000000000000000000000000000000000000\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "}\n"; - - String actualTree = trie.toDotTree(true); + final String fileName = "expectedTreeOneValueRepeatingEdges.txt"; + final String expectedTree = getResources(fileName); + final String actualTree = trie.toDotTree(true); assertEquals(expectedTree, actualTree); } @Test - public void testToDotTrieTwoValuesRepeatingEdges() { + public void testToDotTrieTwoValuesRepeatingEdges() throws IOException { SimpleVerkleTrie trie = new SimpleVerkleTrie(); Bytes32 key1 = Bytes32.fromHexString("0x00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff"); Bytes32 value1 = Bytes32.fromHexString("0x1000000000000000000000000000000000000000000000000000000000000000"); @@ -59,8 +82,9 @@ public void testToDotTrieTwoValuesRepeatingEdges() { trie.put(key1, value1); trie.put(key2, value2); - String expectedTree = "digraph VerkleTrie {\n" + "InternalNode0x[location=\"0x\", commitment=\"0x0000000000000000000000000000000000000000000000000000000000000000\"]\n" + "InternalNode0x -> StemNode0x00\n" + "StemNode0x00[location=\"0x00\", stem=\"0x00112233445566778899aabbccddeeff00112233445566778899aabbccddee\", leftCommitment=\"0x0000000000000000000000000000000000000000000000000000000000000000\", rightCommitment=\"0x0000000000000000000000000000000000000000000000000000000000000000\"]\n" + "StemNode0x00 -> LeafNode0x00112233445566778899aabbccddeeff00112233445566778899aabbccddee00\n" + "LeafNode0x00112233445566778899aabbccddeeff00112233445566778899aabbccddee00[location=\"0x00112233445566778899aabbccddeeff00112233445566778899aabbccddee00\", suffix=\"0\", value=\"0x0100000000000000000000000000000000000000000000000000000000000000\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> NullLeafNode0x\n" + "NullLeafNode0x [location=\"0x\"]\n" + "StemNode0x00 -> LeafNode0x00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff\n" + "LeafNode0x00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff[location=\"0x00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff\", suffix=\"-1\", value=\"0x1000000000000000000000000000000000000000000000000000000000000000\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "InternalNode0x -> NullNode0x\n" + "NullNode0x[location=\"0x\"]\n" + "}\n"; - String actualTree = trie.toDotTree(true); + final String fileName = "expectedTreeTwoValuesRepeatingEdges.txt"; + final String expectedTree = getResources(fileName); + final String actualTree = trie.toDotTree(true); assertEquals(expectedTree, actualTree); } } diff --git a/src/test/resources/expectedTreeOneValueNoRepeatingEdges.txt b/src/test/resources/expectedTreeOneValueNoRepeatingEdges.txt new file mode 100644 index 00000000..9e1ee361 --- /dev/null +++ b/src/test/resources/expectedTreeOneValueNoRepeatingEdges.txt @@ -0,0 +1,520 @@ +digraph VerkleTrie { +InternalNode0x[location="0x", commitment="0x0000000000000000000000000000000000000000000000000000000000000000"] +InternalNode0x -> StemNode0x00 +StemNode0x00[location="0x00", stem="0x00112233445566778899aabbccddeeff00112233445566778899aabbccddee", leftCommitment="0x0000000000000000000000000000000000000000000000000000000000000000", rightCommitment="0x0000000000000000000000000000000000000000000000000000000000000000"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +StemNode0x00 -> LeafNode0x00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff +LeafNode0x00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff[location="0x00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff", suffix="-1", value="0x1000000000000000000000000000000000000000000000000000000000000000"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +} + diff --git a/src/test/resources/expectedTreeOneValueRepeatingEdges.txt b/src/test/resources/expectedTreeOneValueRepeatingEdges.txt new file mode 100644 index 00000000..674ef96e --- /dev/null +++ b/src/test/resources/expectedTreeOneValueRepeatingEdges.txt @@ -0,0 +1,1028 @@ +digraph VerkleTrie { +InternalNode0x[location="0x", commitment="0x0000000000000000000000000000000000000000000000000000000000000000"] +InternalNode0x -> StemNode0x00 +StemNode0x00[location="0x00", stem="0x00112233445566778899aabbccddeeff00112233445566778899aabbccddee", leftCommitment="0x0000000000000000000000000000000000000000000000000000000000000000", rightCommitment="0x0000000000000000000000000000000000000000000000000000000000000000"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> LeafNode0x00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff +LeafNode0x00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff[location="0x00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff", suffix="-1", value="0x1000000000000000000000000000000000000000000000000000000000000000"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +} + diff --git a/src/test/resources/expectedTreeTwoValuesNoRepeatingEdges.txt b/src/test/resources/expectedTreeTwoValuesNoRepeatingEdges.txt new file mode 100644 index 00000000..3fa52433 --- /dev/null +++ b/src/test/resources/expectedTreeTwoValuesNoRepeatingEdges.txt @@ -0,0 +1,521 @@ +digraph VerkleTrie { +InternalNode0x[location="0x", commitment="0x0000000000000000000000000000000000000000000000000000000000000000"] +InternalNode0x -> StemNode0x00 +StemNode0x00[location="0x00", stem="0x00112233445566778899aabbccddeeff00112233445566778899aabbccddee", leftCommitment="0x0000000000000000000000000000000000000000000000000000000000000000", rightCommitment="0x0000000000000000000000000000000000000000000000000000000000000000"] +StemNode0x00 -> LeafNode0x00112233445566778899aabbccddeeff00112233445566778899aabbccddee00 +LeafNode0x00112233445566778899aabbccddeeff00112233445566778899aabbccddee00[location="0x00112233445566778899aabbccddeeff00112233445566778899aabbccddee00", suffix="0", value="0x0100000000000000000000000000000000000000000000000000000000000000"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +StemNode0x00 -> LeafNode0x00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff +LeafNode0x00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff[location="0x00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff", suffix="-1", value="0x1000000000000000000000000000000000000000000000000000000000000000"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +} + diff --git a/src/test/resources/expectedTreeTwoValuesRepeatingEdges.txt b/src/test/resources/expectedTreeTwoValuesRepeatingEdges.txt new file mode 100644 index 00000000..f2e567ac --- /dev/null +++ b/src/test/resources/expectedTreeTwoValuesRepeatingEdges.txt @@ -0,0 +1,1028 @@ +digraph VerkleTrie { +InternalNode0x[location="0x", commitment="0x0000000000000000000000000000000000000000000000000000000000000000"] +InternalNode0x -> StemNode0x00 +StemNode0x00[location="0x00", stem="0x00112233445566778899aabbccddeeff00112233445566778899aabbccddee", leftCommitment="0x0000000000000000000000000000000000000000000000000000000000000000", rightCommitment="0x0000000000000000000000000000000000000000000000000000000000000000"] +StemNode0x00 -> LeafNode0x00112233445566778899aabbccddeeff00112233445566778899aabbccddee00 +LeafNode0x00112233445566778899aabbccddeeff00112233445566778899aabbccddee00[location="0x00112233445566778899aabbccddeeff00112233445566778899aabbccddee00", suffix="0", value="0x0100000000000000000000000000000000000000000000000000000000000000"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +StemNode0x00 -> LeafNode0x00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff +LeafNode0x00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff[location="0x00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff", suffix="-1", value="0x1000000000000000000000000000000000000000000000000000000000000000"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +} + From ad4eecfd32ae0ed980d2fdd7b3036a9dea13f40e Mon Sep 17 00:00:00 2001 From: "Filip.Gumula" Date: Tue, 14 Nov 2023 22:42:35 +0100 Subject: [PATCH 13/25] Initial solution setup - to be done Signed-off-by: Neo --- .../trie/verkle/exporter/DotExporter.java | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 src/main/java/org/hyperledger/besu/ethereum/trie/verkle/exporter/DotExporter.java diff --git a/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/exporter/DotExporter.java b/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/exporter/DotExporter.java new file mode 100644 index 00000000..c9bbb7bf --- /dev/null +++ b/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/exporter/DotExporter.java @@ -0,0 +1,26 @@ +package org.hyperledger.besu.ethereum.trie.verkle.exporter; + +import java.io.BufferedWriter; +import java.io.FileWriter; +import java.io.IOException; + +/** + * Utility class to save DOT format VerkleTrie to a file. + */ +public class DotExporter { + + /** + * Exports the VerkleTrie to DOT format and saves it to a file. + * + * @param verkleTrieDotString DOT representation of the VerkleTrie. + * @param filePath The path where the DOT file will be saved. + */ + public static void exportToDotFile(String verkleTrieDotString, String filePath) { + try (BufferedWriter writer = new BufferedWriter(new FileWriter(filePath))) { + writer.write(verkleTrieDotString); + } catch (IOException e) { + e.printStackTrace(); + System.err.println("Error writing DOT file: " + e.getMessage()); + } + } +} From a8b721f8222d7a74ab1133ad7d22e056640efd3b Mon Sep 17 00:00:00 2001 From: "Filip.Gumula" Date: Wed, 15 Nov 2023 11:09:14 +0100 Subject: [PATCH 14/25] Enhancment of exportToDotFile() method in DotExporter Signed-off-by: Neo --- .../trie/verkle/exporter/DotExporter.java | 46 ++++++++++++++++--- 1 file changed, 40 insertions(+), 6 deletions(-) diff --git a/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/exporter/DotExporter.java b/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/exporter/DotExporter.java index c9bbb7bf..e50dc9e3 100644 --- a/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/exporter/DotExporter.java +++ b/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/exporter/DotExporter.java @@ -3,12 +3,17 @@ import java.io.BufferedWriter; import java.io.FileWriter; import java.io.IOException; +import java.nio.file.AccessDeniedException; +import java.nio.file.FileSystemException; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.util.regex.Matcher; +import java.util.regex.Pattern; -/** - * Utility class to save DOT format VerkleTrie to a file. - */ public class DotExporter { + private static final Pattern FILE_EXTENSION_PATTERN = Pattern.compile("\\.(dot|gv)$"); + /** * Exports the VerkleTrie to DOT format and saves it to a file. * @@ -16,11 +21,40 @@ public class DotExporter { * @param filePath The path where the DOT file will be saved. */ public static void exportToDotFile(String verkleTrieDotString, String filePath) { - try (BufferedWriter writer = new BufferedWriter(new FileWriter(filePath))) { - writer.write(verkleTrieDotString); - } catch (IOException e) { + try { + if (filePath == null || filePath.isEmpty()) { + // If filePath is not provided, create a default one with the .dot extension. + filePath = "defaultVerkleTrie.dot"; + } else { + // Check if the provided filePath has a valid extension (.dot or .gv). + Matcher matcher = FILE_EXTENSION_PATTERN.matcher(filePath); + if (!matcher.find()) { + System.err.println("Error: Invalid file extension. Use .dot or .gv extension."); + return; + } + } + + Path path = Paths.get(filePath); + + // Create directories if they don't exist. + if (!path.getParent().toFile().exists()) { + path.getParent().toFile().mkdirs(); + } + + try (BufferedWriter writer = new BufferedWriter(new FileWriter(path.toString()))) { + writer.write(verkleTrieDotString); + } + + } catch (AccessDeniedException e) { + System.err.println("Error writing DOT file: Access denied. Check write permissions for the file."); + e.printStackTrace(); + } catch (FileSystemException e) { + System.err.println("Error writing DOT file: File system issue. Check disk space and file system restrictions."); e.printStackTrace(); + } catch (IOException e) { System.err.println("Error writing DOT file: " + e.getMessage()); + e.printStackTrace(); } } + } From 53413f384ab22fb092e297e6a36e55e922ed1fbc Mon Sep 17 00:00:00 2001 From: "Filip.Gumula" Date: Wed, 15 Nov 2023 18:55:55 +0100 Subject: [PATCH 15/25] Working solution, refactoring to be done Signed-off-by: Neo --- .../trie/verkle/exporter/DotExporter.java | 43 +- .../ethereum/trie/verkle/DotDisplayTest.java | 18 + .../ethereum/trie/verkle/DotExporterTest.java | 50 ++ src/test/resources/VerkleTrie.gv | 519 ++++++++++++++++++ .../expectedTreeOneValueNoRepeatingEdges.txt | 1 - 5 files changed, 624 insertions(+), 7 deletions(-) create mode 100644 src/test/java/org/hyperledger/besu/ethereum/trie/verkle/DotExporterTest.java create mode 100644 src/test/resources/VerkleTrie.gv diff --git a/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/exporter/DotExporter.java b/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/exporter/DotExporter.java index e50dc9e3..c0d8fa27 100644 --- a/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/exporter/DotExporter.java +++ b/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/exporter/DotExporter.java @@ -3,6 +3,7 @@ import java.io.BufferedWriter; import java.io.FileWriter; import java.io.IOException; +import java.nio.charset.StandardCharsets; import java.nio.file.AccessDeniedException; import java.nio.file.FileSystemException; import java.nio.file.Path; @@ -14,6 +15,37 @@ public class DotExporter { private static final Pattern FILE_EXTENSION_PATTERN = Pattern.compile("\\.(dot|gv)$"); + private static final String DEFAULT_FILE_PATH = "src/test/resources/VerkleTrie.gv"; + + /** + * Exports the VerkleTrie to DOT format and saves it to a file with a default path. + * + * @param verkleTrieDotString DOT representation of the VerkleTrie. + */ + public static void exportToDotFile(String verkleTrieDotString) { + try { + Path path = Paths.get(DEFAULT_FILE_PATH); + + if (!path.getParent().toFile().exists()) { + path.getParent().toFile().mkdirs(); + } + + try (BufferedWriter writer = new BufferedWriter(new FileWriter(path.toString(), StandardCharsets.UTF_8))) { + writer.write(verkleTrieDotString); + } + + } catch (AccessDeniedException e) { + System.err.println("Error writing DOT file: Access denied. Check write permissions for the file."); + e.printStackTrace(); + } catch (FileSystemException e) { + System.err.println("Error writing DOT file: File system issue. Check disk space and file system restrictions."); + e.printStackTrace(); + } catch (IOException e) { + System.err.println("Error writing DOT file: " + e.getMessage()); + e.printStackTrace(); + } + } + /** * Exports the VerkleTrie to DOT format and saves it to a file. * @@ -23,8 +55,7 @@ public class DotExporter { public static void exportToDotFile(String verkleTrieDotString, String filePath) { try { if (filePath == null || filePath.isEmpty()) { - // If filePath is not provided, create a default one with the .dot extension. - filePath = "defaultVerkleTrie.dot"; + filePath = DEFAULT_FILE_PATH; } else { // Check if the provided filePath has a valid extension (.dot or .gv). Matcher matcher = FILE_EXTENSION_PATTERN.matcher(filePath); @@ -36,20 +67,19 @@ public static void exportToDotFile(String verkleTrieDotString, String filePath) Path path = Paths.get(filePath); - // Create directories if they don't exist. if (!path.getParent().toFile().exists()) { path.getParent().toFile().mkdirs(); } - try (BufferedWriter writer = new BufferedWriter(new FileWriter(path.toString()))) { + try (BufferedWriter writer = new BufferedWriter(new FileWriter(path.toString(), StandardCharsets.UTF_8))) { writer.write(verkleTrieDotString); } } catch (AccessDeniedException e) { - System.err.println("Error writing DOT file: Access denied. Check write permissions for the file."); + System.err.println("Error writing DOT file: Access denied. Check write permissions for the file. Details: " + e.getMessage()); e.printStackTrace(); } catch (FileSystemException e) { - System.err.println("Error writing DOT file: File system issue. Check disk space and file system restrictions."); + System.err.println("Error writing DOT file: File system issue. Check disk space and file system restrictions. Details: " + e.getMessage()); e.printStackTrace(); } catch (IOException e) { System.err.println("Error writing DOT file: " + e.getMessage()); @@ -57,4 +87,5 @@ public static void exportToDotFile(String verkleTrieDotString, String filePath) } } + } diff --git a/src/test/java/org/hyperledger/besu/ethereum/trie/verkle/DotDisplayTest.java b/src/test/java/org/hyperledger/besu/ethereum/trie/verkle/DotDisplayTest.java index 98fd1ad2..4ee61d53 100644 --- a/src/test/java/org/hyperledger/besu/ethereum/trie/verkle/DotDisplayTest.java +++ b/src/test/java/org/hyperledger/besu/ethereum/trie/verkle/DotDisplayTest.java @@ -1,6 +1,7 @@ package org.hyperledger.besu.ethereum.trie.verkle; import org.apache.tuweni.bytes.Bytes32; +import org.hyperledger.besu.ethereum.trie.verkle.exporter.DotExporter; import org.junit.jupiter.api.Test; import java.io.BufferedReader; @@ -28,6 +29,21 @@ private String getResources(final String fileName) throws IOException { return reader.lines().collect(Collectors.joining("\n")); } } + + @Test + public void testToDotTrieOneValueNoRepeatingEdgesExport() throws IOException { + SimpleVerkleTrie trie = new SimpleVerkleTrie<>(); + Bytes32 key = Bytes32.fromHexString("0x00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff"); + Bytes32 value = Bytes32.fromHexString("0x1000000000000000000000000000000000000000000000000000000000000000"); + trie.put(key, value); + + final String fileName = "expectedTreeOneValueNoRepeatingEdges.txt"; + final String expectedTree = getResources(fileName); + final String actualTree = trie.toDotTree(); + + assertEquals(expectedTree, actualTree); + } + @Test public void testToDotTrieOneValueNoRepeatingEdges() throws IOException { SimpleVerkleTrie trie = new SimpleVerkleTrie<>(); @@ -41,6 +57,8 @@ public void testToDotTrieOneValueNoRepeatingEdges() throws IOException { assertEquals(expectedTree, actualTree); } + + @Test public void testToDotTrieTwoValuesNoRepeatingEdges() throws IOException { SimpleVerkleTrie trie = new SimpleVerkleTrie(); diff --git a/src/test/java/org/hyperledger/besu/ethereum/trie/verkle/DotExporterTest.java b/src/test/java/org/hyperledger/besu/ethereum/trie/verkle/DotExporterTest.java new file mode 100644 index 00000000..f732d2ed --- /dev/null +++ b/src/test/java/org/hyperledger/besu/ethereum/trie/verkle/DotExporterTest.java @@ -0,0 +1,50 @@ +package org.hyperledger.besu.ethereum.trie.verkle; + +import org.apache.tuweni.bytes.Bytes32; +import org.hyperledger.besu.ethereum.trie.verkle.exporter.DotExporter; +import org.junit.jupiter.api.Test; + +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStreamReader; +import java.nio.charset.StandardCharsets; +import java.util.stream.Collectors; + +import static org.junit.jupiter.api.Assertions.assertEquals; + +public class DotExporterTest { + + /** + * Reads the content of a file from the resources folder. + * + * @param fileName The name of the file in the resources folder. + * @return The content of the file as a String. + * @throws IOException If an I/O error occurs. + */ + private String getResources(final String fileName) throws IOException { + var classLoader = DotDisplayTest.class.getClassLoader(); + try (BufferedReader reader = new BufferedReader(new InputStreamReader( + classLoader.getResourceAsStream(fileName), StandardCharsets.UTF_8))) { + + return reader.lines().collect(Collectors.joining("\n")); + } + } + + @Test + public void testToDotTrieOneValueNoRepeatingEdgesExport() throws IOException { + SimpleVerkleTrie trie = new SimpleVerkleTrie<>(); + Bytes32 key = Bytes32.fromHexString("0x00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff"); + Bytes32 value = Bytes32.fromHexString("0x1000000000000000000000000000000000000000000000000000000000000000"); + trie.put(key, value); + + final String fileName = "expectedTreeOneValueNoRepeatingEdges.txt"; + final String expectedTree = getResources(fileName); + final String actualTree = trie.toDotTree(); + DotExporter.exportToDotFile(actualTree); + + String actualFrommFile = getResources("VerkleTrie.gv"); + + assertEquals(expectedTree, actualFrommFile); + } + +} diff --git a/src/test/resources/VerkleTrie.gv b/src/test/resources/VerkleTrie.gv new file mode 100644 index 00000000..baae3691 --- /dev/null +++ b/src/test/resources/VerkleTrie.gv @@ -0,0 +1,519 @@ +digraph VerkleTrie { +InternalNode0x[location="0x", commitment="0x0000000000000000000000000000000000000000000000000000000000000000"] +InternalNode0x -> StemNode0x00 +StemNode0x00[location="0x00", stem="0x00112233445566778899aabbccddeeff00112233445566778899aabbccddee", leftCommitment="0x0000000000000000000000000000000000000000000000000000000000000000", rightCommitment="0x0000000000000000000000000000000000000000000000000000000000000000"] +StemNode0x00 -> NullLeafNode0x +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +NullLeafNode0x [location="0x"] +StemNode0x00 -> LeafNode0x00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff +LeafNode0x00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff[location="0x00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff", suffix="-1", value="0x1000000000000000000000000000000000000000000000000000000000000000"] +InternalNode0x -> NullNode0x +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +NullNode0x[location="0x"] +} diff --git a/src/test/resources/expectedTreeOneValueNoRepeatingEdges.txt b/src/test/resources/expectedTreeOneValueNoRepeatingEdges.txt index 9e1ee361..baae3691 100644 --- a/src/test/resources/expectedTreeOneValueNoRepeatingEdges.txt +++ b/src/test/resources/expectedTreeOneValueNoRepeatingEdges.txt @@ -517,4 +517,3 @@ NullNode0x[location="0x"] NullNode0x[location="0x"] NullNode0x[location="0x"] } - From ac3c2b6e47dc8b86ac43ea8d5c89839a596dbf27 Mon Sep 17 00:00:00 2001 From: "Filip.Gumula" Date: Thu, 16 Nov 2023 09:55:15 +0100 Subject: [PATCH 16/25] Refactor DotExporter, add dotTreeToFile() methods for SimpleVerkleTrie, modify DotExporterTest Signed-off-by: Neo --- .../trie/verkle/SimpleVerkleTrie.java | 18 ++++++++ .../trie/verkle/exporter/DotExporter.java | 43 +++++-------------- .../ethereum/trie/verkle/DotExporterTest.java | 8 ++-- 3 files changed, 33 insertions(+), 36 deletions(-) diff --git a/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/SimpleVerkleTrie.java b/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/SimpleVerkleTrie.java index f0153080..acab2ae4 100644 --- a/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/SimpleVerkleTrie.java +++ b/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/SimpleVerkleTrie.java @@ -18,6 +18,7 @@ import static com.google.common.base.Preconditions.checkNotNull; import org.hyperledger.besu.ethereum.trie.NodeUpdater; +import org.hyperledger.besu.ethereum.trie.verkle.exporter.DotExporter; import org.hyperledger.besu.ethereum.trie.verkle.node.InternalNode; import org.hyperledger.besu.ethereum.trie.verkle.node.Node; import org.hyperledger.besu.ethereum.trie.verkle.visitor.CommitVisitor; @@ -170,4 +171,21 @@ public String toDotTree() { result.append(root.toDot()); return result.append("}\n").toString(); } + + /** + * Exports the Verkle Trie DOT representation to a '.gv' file located in the current directory. + * The default file name is "VerkleTree.gv". + */ + public void dotTreeToFile() { + DotExporter.exportToDotFile(toDotTree()); + } + + /** + * Exports the Verkle Trie DOT representation to a '.gv' file located at the specified path. + * + * @param path The location where the DOT file will be saved. + */ + public void dotTreeToFile(String path) { + DotExporter.exportToDotFile(toDotTree(), path); + } } diff --git a/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/exporter/DotExporter.java b/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/exporter/DotExporter.java index c0d8fa27..03d4b608 100644 --- a/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/exporter/DotExporter.java +++ b/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/exporter/DotExporter.java @@ -14,8 +14,7 @@ public class DotExporter { private static final Pattern FILE_EXTENSION_PATTERN = Pattern.compile("\\.(dot|gv)$"); - - private static final String DEFAULT_FILE_PATH = "src/test/resources/VerkleTrie.gv"; + private static final String DEFAULT_FILE_NAME = "./VerkleTrie.gv"; /** * Exports the VerkleTrie to DOT format and saves it to a file with a default path. @@ -23,39 +22,19 @@ public class DotExporter { * @param verkleTrieDotString DOT representation of the VerkleTrie. */ public static void exportToDotFile(String verkleTrieDotString) { - try { - Path path = Paths.get(DEFAULT_FILE_PATH); - - if (!path.getParent().toFile().exists()) { - path.getParent().toFile().mkdirs(); - } - - try (BufferedWriter writer = new BufferedWriter(new FileWriter(path.toString(), StandardCharsets.UTF_8))) { - writer.write(verkleTrieDotString); - } - - } catch (AccessDeniedException e) { - System.err.println("Error writing DOT file: Access denied. Check write permissions for the file."); - e.printStackTrace(); - } catch (FileSystemException e) { - System.err.println("Error writing DOT file: File system issue. Check disk space and file system restrictions."); - e.printStackTrace(); - } catch (IOException e) { - System.err.println("Error writing DOT file: " + e.getMessage()); - e.printStackTrace(); - } + exportToDotFile(verkleTrieDotString, null); } /** * Exports the VerkleTrie to DOT format and saves it to a file. * * @param verkleTrieDotString DOT representation of the VerkleTrie. - * @param filePath The path where the DOT file will be saved. + * @param filePath The path where the DOT file will be saved. If null or empty, the default path will be used. */ public static void exportToDotFile(String verkleTrieDotString, String filePath) { try { if (filePath == null || filePath.isEmpty()) { - filePath = DEFAULT_FILE_PATH; + filePath = DEFAULT_FILE_NAME; } else { // Check if the provided filePath has a valid extension (.dot or .gv). Matcher matcher = FILE_EXTENSION_PATTERN.matcher(filePath); @@ -76,16 +55,16 @@ public static void exportToDotFile(String verkleTrieDotString, String filePath) } } catch (AccessDeniedException e) { - System.err.println("Error writing DOT file: Access denied. Check write permissions for the file. Details: " + e.getMessage()); - e.printStackTrace(); + handleFileWritingError("Access denied. Check write permissions for the file.", e); } catch (FileSystemException e) { - System.err.println("Error writing DOT file: File system issue. Check disk space and file system restrictions. Details: " + e.getMessage()); - e.printStackTrace(); + handleFileWritingError("File system issue. Check disk space and file system restrictions.", e); } catch (IOException e) { - System.err.println("Error writing DOT file: " + e.getMessage()); - e.printStackTrace(); + handleFileWritingError(e.getMessage(), e); } } - + private static void handleFileWritingError(String errorMessage, Exception exception) { + System.err.println("Error writing DOT file: " + errorMessage + " Details: " + exception.getMessage()); + exception.printStackTrace(); + } } diff --git a/src/test/java/org/hyperledger/besu/ethereum/trie/verkle/DotExporterTest.java b/src/test/java/org/hyperledger/besu/ethereum/trie/verkle/DotExporterTest.java index f732d2ed..015c3ee7 100644 --- a/src/test/java/org/hyperledger/besu/ethereum/trie/verkle/DotExporterTest.java +++ b/src/test/java/org/hyperledger/besu/ethereum/trie/verkle/DotExporterTest.java @@ -37,14 +37,14 @@ public void testToDotTrieOneValueNoRepeatingEdgesExport() throws IOException { Bytes32 value = Bytes32.fromHexString("0x1000000000000000000000000000000000000000000000000000000000000000"); trie.put(key, value); + trie.dotTreeToFile("src/test/resources/VerkleTrie.gv"); + final String fileName = "expectedTreeOneValueNoRepeatingEdges.txt"; final String expectedTree = getResources(fileName); - final String actualTree = trie.toDotTree(); - DotExporter.exportToDotFile(actualTree); - String actualFrommFile = getResources("VerkleTrie.gv"); + final String actualFromFile = getResources("VerkleTrie.gv"); - assertEquals(expectedTree, actualFrommFile); + assertEquals(expectedTree, actualFromFile); } } From f01288225cb92bdfb5ca4821afc0e15aecef60ef Mon Sep 17 00:00:00 2001 From: "Filip.Gumula" Date: Thu, 16 Nov 2023 15:57:33 +0100 Subject: [PATCH 17/25] Added SLF4J Logger to DotExporter class and dependencies Signed-off-by: Neo --- build.gradle | 3 +++ .../besu/ethereum/trie/verkle/exporter/DotExporter.java | 8 ++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index 8fa900e9..bf333932 100644 --- a/build.gradle +++ b/build.gradle @@ -60,12 +60,15 @@ dependencies { implementation 'io.tmio:tuweni-rlp' implementation 'org.hyperledger.besu:ipa-multipoint' implementation 'org.hyperledger.besu.internal:trie:23.1.3-SNAPSHOT' + implementation 'org.slf4j:slf4j-api:1.7.32' + implementation 'ch.qos.logback:logback-classic:1.2.6' testImplementation 'org.junit.jupiter:junit-jupiter-api' testImplementation 'org.junit.jupiter:junit-jupiter-params' testImplementation 'com.fasterxml.jackson.core:jackson-databind' testImplementation 'org.assertj:assertj-core' testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine' + } diff --git a/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/exporter/DotExporter.java b/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/exporter/DotExporter.java index 03d4b608..e9c9fcfd 100644 --- a/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/exporter/DotExporter.java +++ b/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/exporter/DotExporter.java @@ -11,8 +11,12 @@ import java.util.regex.Matcher; import java.util.regex.Pattern; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + public class DotExporter { + private static final Logger LOG = LoggerFactory.getLogger(DotExporter.class); private static final Pattern FILE_EXTENSION_PATTERN = Pattern.compile("\\.(dot|gv)$"); private static final String DEFAULT_FILE_NAME = "./VerkleTrie.gv"; @@ -39,7 +43,7 @@ public static void exportToDotFile(String verkleTrieDotString, String filePath) // Check if the provided filePath has a valid extension (.dot or .gv). Matcher matcher = FILE_EXTENSION_PATTERN.matcher(filePath); if (!matcher.find()) { - System.err.println("Error: Invalid file extension. Use .dot or .gv extension."); + LOG.error("Invalid file extension. Use .dot or .gv extension."); return; } } @@ -64,7 +68,7 @@ public static void exportToDotFile(String verkleTrieDotString, String filePath) } private static void handleFileWritingError(String errorMessage, Exception exception) { - System.err.println("Error writing DOT file: " + errorMessage + " Details: " + exception.getMessage()); + LOG.error("Error writing DOT file: {}. Details: {}", errorMessage, exception.getMessage(), exception); exception.printStackTrace(); } } From 7d57383a398c7058d8d4355ed2e4ec4122dd252c Mon Sep 17 00:00:00 2001 From: "Filip.Gumula" Date: Thu, 16 Nov 2023 19:10:52 +0100 Subject: [PATCH 18/25] Exception handling in DotExporter and use StringBuilder for efficiency in Node classes Signed-off-by: Neo --- .../trie/verkle/SimpleVerkleTrie.java | 9 +++- .../trie/verkle/exporter/DotExporter.java | 50 +++++++++---------- .../ethereum/trie/verkle/node/BranchNode.java | 5 +- .../trie/verkle/node/InternalNode.java | 5 +- 4 files changed, 37 insertions(+), 32 deletions(-) diff --git a/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/SimpleVerkleTrie.java b/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/SimpleVerkleTrie.java index acab2ae4..f2f01f29 100644 --- a/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/SimpleVerkleTrie.java +++ b/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/SimpleVerkleTrie.java @@ -27,6 +27,7 @@ import org.hyperledger.besu.ethereum.trie.verkle.visitor.PutVisitor; import org.hyperledger.besu.ethereum.trie.verkle.visitor.RemoveVisitor; +import java.io.IOException; import java.util.Optional; import org.apache.tuweni.bytes.Bytes; @@ -175,17 +176,21 @@ public String toDotTree() { /** * Exports the Verkle Trie DOT representation to a '.gv' file located in the current directory. * The default file name is "VerkleTree.gv". + * + * @throws IOException */ - public void dotTreeToFile() { + public void dotTreeToFile() throws IOException { DotExporter.exportToDotFile(toDotTree()); } /** + /** * Exports the Verkle Trie DOT representation to a '.gv' file located at the specified path. * * @param path The location where the DOT file will be saved. + * @throws IOException */ - public void dotTreeToFile(String path) { + public void dotTreeToFile(String path) throws IOException { DotExporter.exportToDotFile(toDotTree(), path); } } diff --git a/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/exporter/DotExporter.java b/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/exporter/DotExporter.java index e9c9fcfd..0a52ea20 100644 --- a/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/exporter/DotExporter.java +++ b/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/exporter/DotExporter.java @@ -4,16 +4,16 @@ import java.io.FileWriter; import java.io.IOException; import java.nio.charset.StandardCharsets; -import java.nio.file.AccessDeniedException; -import java.nio.file.FileSystemException; -import java.nio.file.Path; -import java.nio.file.Paths; +import java.nio.file.*; import java.util.regex.Matcher; import java.util.regex.Pattern; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +/** + * Utility class for exporting Verkle Trie representations to DOT files. + */ public class DotExporter { private static final Logger LOG = LoggerFactory.getLogger(DotExporter.class); @@ -21,54 +21,52 @@ public class DotExporter { private static final String DEFAULT_FILE_NAME = "./VerkleTrie.gv"; /** - * Exports the VerkleTrie to DOT format and saves it to a file with a default path. + * Exports the Verkle Trie DOT representation to a '.gv' file located in the current directory. + * The default file name is "VerkleTrie.gv". * - * @param verkleTrieDotString DOT representation of the VerkleTrie. + * @param verkleTrieDotString The DOT representation of the Verkle Trie. + * @throws IOException If an I/O error occurs during the export process. */ - public static void exportToDotFile(String verkleTrieDotString) { - exportToDotFile(verkleTrieDotString, null); + public static void exportToDotFile(String verkleTrieDotString) throws IOException { + exportToDotFile(verkleTrieDotString, DEFAULT_FILE_NAME); } + /** - * Exports the VerkleTrie to DOT format and saves it to a file. + * Exports the Verkle Trie DOT representation to a '.gv' file located at the specified path. * - * @param verkleTrieDotString DOT representation of the VerkleTrie. - * @param filePath The path where the DOT file will be saved. If null or empty, the default path will be used. + * @param verkleTrieDotString The DOT representation of the Verkle Trie. + * @param filePath The location where the DOT file will be saved. + * @throws IOException If an I/O error occurs during the export process. */ - public static void exportToDotFile(String verkleTrieDotString, String filePath) { + public static void exportToDotFile(String verkleTrieDotString, String filePath) throws IOException { try { if (filePath == null || filePath.isEmpty()) { filePath = DEFAULT_FILE_NAME; } else { - // Check if the provided filePath has a valid extension (.dot or .gv). Matcher matcher = FILE_EXTENSION_PATTERN.matcher(filePath); if (!matcher.find()) { - LOG.error("Invalid file extension. Use .dot or .gv extension."); - return; + throw new IllegalArgumentException("Invalid file extension. Use .dot or .gv extension."); } } Path path = Paths.get(filePath); - if (!path.getParent().toFile().exists()) { - path.getParent().toFile().mkdirs(); - } + Files.createDirectories(path.getParent()); try (BufferedWriter writer = new BufferedWriter(new FileWriter(path.toString(), StandardCharsets.UTF_8))) { writer.write(verkleTrieDotString); } } catch (AccessDeniedException e) { - handleFileWritingError("Access denied. Check write permissions for the file.", e); + LOG.error("Access denied. Check write permissions for the file. Details: {}", e.getMessage(), e); + throw e; } catch (FileSystemException e) { - handleFileWritingError("File system issue. Check disk space and file system restrictions.", e); + LOG.error("File system issue. Check disk space and file system restrictions. Details: {}", e.getMessage(), e); + throw e; } catch (IOException e) { - handleFileWritingError(e.getMessage(), e); + LOG.error("Error writing DOT file: {}. Details: {}", e.getMessage(), e); + throw e; } } - - private static void handleFileWritingError(String errorMessage, Exception exception) { - LOG.error("Error writing DOT file: {}. Details: {}", errorMessage, exception.getMessage(), exception); - exception.printStackTrace(); - } } diff --git a/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/node/BranchNode.java b/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/node/BranchNode.java index 5e136717..9f8ffb82 100644 --- a/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/node/BranchNode.java +++ b/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/node/BranchNode.java @@ -264,8 +264,9 @@ public String toDot(Boolean showRepeatingEdges) { if (showRepeatingEdges || !result.toString().contains(edgeString)) { result.append(edgeString); } - result += child.toDot(showRepeatingEdges); + result.append(child.toDot(showRepeatingEdges)); } - return result; + + return result.toString(); } } diff --git a/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/node/InternalNode.java b/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/node/InternalNode.java index 8a8e3de5..0bf50fa1 100644 --- a/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/node/InternalNode.java +++ b/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/node/InternalNode.java @@ -181,8 +181,9 @@ public String toDot(Boolean showRepeatingEdges) { if (showRepeatingEdges || !result.toString().contains(edgeString)) { result.append(edgeString); } - result += child.toDot(showRepeatingEdges); + result.append(child.toDot(showRepeatingEdges)); } - return result; + + return result.toString(); } } From a53d67a39163060e613a2f7743f5c5ed6da0e6e0 Mon Sep 17 00:00:00 2001 From: "Filip.Gumula" Date: Fri, 17 Nov 2023 12:48:24 +0100 Subject: [PATCH 19/25] Upgrade slf4j and logback to latest versions, export slff4j and logback dependency versions to versions.gradle, small import fixes Signed-off-by: Neo --- build.gradle | 4 ++-- gradle/versions.gradle | 4 ++++ .../besu/ethereum/trie/verkle/SimpleVerkleTrie.java | 4 ++-- .../besu/ethereum/trie/verkle/exporter/DotExporter.java | 7 ++++++- .../besu/ethereum/trie/verkle/DotExporterTest.java | 1 + 5 files changed, 15 insertions(+), 5 deletions(-) diff --git a/build.gradle b/build.gradle index bf333932..cddc4bee 100644 --- a/build.gradle +++ b/build.gradle @@ -60,8 +60,8 @@ dependencies { implementation 'io.tmio:tuweni-rlp' implementation 'org.hyperledger.besu:ipa-multipoint' implementation 'org.hyperledger.besu.internal:trie:23.1.3-SNAPSHOT' - implementation 'org.slf4j:slf4j-api:1.7.32' - implementation 'ch.qos.logback:logback-classic:1.2.6' + implementation 'org.slf4j:slf4j-api' + implementation 'ch.qos.logback:logback-classic' testImplementation 'org.junit.jupiter:junit-jupiter-api' testImplementation 'org.junit.jupiter:junit-jupiter-params' diff --git a/gradle/versions.gradle b/gradle/versions.gradle index 265d4605..7bb4973f 100644 --- a/gradle/versions.gradle +++ b/gradle/versions.gradle @@ -23,6 +23,10 @@ dependencyManagement { dependency 'org.assertj:assertj-core:3.24.2' + dependency 'org.slf4j:slf4j-api:2.0.9' + + dependency 'ch.qos.logback:logback-classic:1.4.11' + dependencySet(group: 'io.tmio', version: '2.4.2') { entry 'tuweni-bytes' entry 'tuweni-rlp' diff --git a/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/SimpleVerkleTrie.java b/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/SimpleVerkleTrie.java index f2f01f29..16b012fd 100644 --- a/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/SimpleVerkleTrie.java +++ b/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/SimpleVerkleTrie.java @@ -177,7 +177,7 @@ public String toDotTree() { * Exports the Verkle Trie DOT representation to a '.gv' file located in the current directory. * The default file name is "VerkleTree.gv". * - * @throws IOException + * @throws IOException if an I/O error occurs. */ public void dotTreeToFile() throws IOException { DotExporter.exportToDotFile(toDotTree()); @@ -188,7 +188,7 @@ public void dotTreeToFile() throws IOException { * Exports the Verkle Trie DOT representation to a '.gv' file located at the specified path. * * @param path The location where the DOT file will be saved. - * @throws IOException + * @throws IOException if ann I/O error occurs. */ public void dotTreeToFile(String path) throws IOException { DotExporter.exportToDotFile(toDotTree(), path); diff --git a/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/exporter/DotExporter.java b/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/exporter/DotExporter.java index 0a52ea20..e1dd6e58 100644 --- a/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/exporter/DotExporter.java +++ b/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/exporter/DotExporter.java @@ -4,7 +4,12 @@ import java.io.FileWriter; import java.io.IOException; import java.nio.charset.StandardCharsets; -import java.nio.file.*; + +import java.nio.file.AccessDeniedException; +import java.nio.file.FileSystemException; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; import java.util.regex.Matcher; import java.util.regex.Pattern; diff --git a/src/test/java/org/hyperledger/besu/ethereum/trie/verkle/DotExporterTest.java b/src/test/java/org/hyperledger/besu/ethereum/trie/verkle/DotExporterTest.java index 015c3ee7..fe30e523 100644 --- a/src/test/java/org/hyperledger/besu/ethereum/trie/verkle/DotExporterTest.java +++ b/src/test/java/org/hyperledger/besu/ethereum/trie/verkle/DotExporterTest.java @@ -22,6 +22,7 @@ public class DotExporterTest { * @throws IOException If an I/O error occurs. */ private String getResources(final String fileName) throws IOException { + var classLoader = DotDisplayTest.class.getClassLoader(); try (BufferedReader reader = new BufferedReader(new InputStreamReader( classLoader.getResourceAsStream(fileName), StandardCharsets.UTF_8))) { From 0ebe839c6e7ea6bfa97ad846bcfdde6ffb561909 Mon Sep 17 00:00:00 2001 From: Neo Date: Sat, 18 Nov 2023 11:11:12 +0300 Subject: [PATCH 20/25] spotlessApply Signed-off-by: Neo --- build.gradle | 1 - .../trie/verkle/SimpleVerkleTrie.java | 3 +- .../trie/verkle/exporter/DotExporter.java | 117 ++++++---- .../ethereum/trie/verkle/DotDisplayTest.java | 213 ++++++++++-------- .../ethereum/trie/verkle/DotExporterTest.java | 77 ++++--- 5 files changed, 236 insertions(+), 175 deletions(-) diff --git a/build.gradle b/build.gradle index cddc4bee..cc6989c0 100644 --- a/build.gradle +++ b/build.gradle @@ -68,7 +68,6 @@ dependencies { testImplementation 'com.fasterxml.jackson.core:jackson-databind' testImplementation 'org.assertj:assertj-core' testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine' - } diff --git a/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/SimpleVerkleTrie.java b/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/SimpleVerkleTrie.java index 16b012fd..31c49b28 100644 --- a/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/SimpleVerkleTrie.java +++ b/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/SimpleVerkleTrie.java @@ -184,8 +184,7 @@ public void dotTreeToFile() throws IOException { } /** - /** - * Exports the Verkle Trie DOT representation to a '.gv' file located at the specified path. + * /** Exports the Verkle Trie DOT representation to a '.gv' file located at the specified path. * * @param path The location where the DOT file will be saved. * @throws IOException if ann I/O error occurs. diff --git a/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/exporter/DotExporter.java b/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/exporter/DotExporter.java index e1dd6e58..082e8593 100644 --- a/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/exporter/DotExporter.java +++ b/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/exporter/DotExporter.java @@ -1,10 +1,24 @@ +/* + * Copyright Besu Contributors + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * + */ package org.hyperledger.besu.ethereum.trie.verkle.exporter; import java.io.BufferedWriter; import java.io.FileWriter; import java.io.IOException; import java.nio.charset.StandardCharsets; - import java.nio.file.AccessDeniedException; import java.nio.file.FileSystemException; import java.nio.file.Files; @@ -16,62 +30,65 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -/** - * Utility class for exporting Verkle Trie representations to DOT files. - */ +/** Utility class for exporting Verkle Trie representations to DOT files. */ public class DotExporter { - private static final Logger LOG = LoggerFactory.getLogger(DotExporter.class); - private static final Pattern FILE_EXTENSION_PATTERN = Pattern.compile("\\.(dot|gv)$"); - private static final String DEFAULT_FILE_NAME = "./VerkleTrie.gv"; + private static final Logger LOG = LoggerFactory.getLogger(DotExporter.class); + private static final Pattern FILE_EXTENSION_PATTERN = Pattern.compile("\\.(dot|gv)$"); + private static final String DEFAULT_FILE_NAME = "./VerkleTrie.gv"; - /** - * Exports the Verkle Trie DOT representation to a '.gv' file located in the current directory. - * The default file name is "VerkleTrie.gv". - * - * @param verkleTrieDotString The DOT representation of the Verkle Trie. - * @throws IOException If an I/O error occurs during the export process. - */ - public static void exportToDotFile(String verkleTrieDotString) throws IOException { - exportToDotFile(verkleTrieDotString, DEFAULT_FILE_NAME); - } + /** + * Exports the Verkle Trie DOT representation to a '.gv' file located in the current directory. + * The default file name is "VerkleTrie.gv". + * + * @param verkleTrieDotString The DOT representation of the Verkle Trie. + * @throws IOException If an I/O error occurs during the export process. + */ + public static void exportToDotFile(String verkleTrieDotString) throws IOException { + exportToDotFile(verkleTrieDotString, DEFAULT_FILE_NAME); + } + /** + * Exports the Verkle Trie DOT representation to a '.gv' file located at the specified path. + * + * @param verkleTrieDotString The DOT representation of the Verkle Trie. + * @param filePath The location where the DOT file will be saved. + * @throws IOException If an I/O error occurs during the export process. + */ + public static void exportToDotFile(String verkleTrieDotString, String filePath) + throws IOException { + try { + if (filePath == null || filePath.isEmpty()) { + filePath = DEFAULT_FILE_NAME; + } else { + Matcher matcher = FILE_EXTENSION_PATTERN.matcher(filePath); + if (!matcher.find()) { + throw new IllegalArgumentException("Invalid file extension. Use .dot or .gv extension."); + } + } - /** - * Exports the Verkle Trie DOT representation to a '.gv' file located at the specified path. - * - * @param verkleTrieDotString The DOT representation of the Verkle Trie. - * @param filePath The location where the DOT file will be saved. - * @throws IOException If an I/O error occurs during the export process. - */ - public static void exportToDotFile(String verkleTrieDotString, String filePath) throws IOException { - try { - if (filePath == null || filePath.isEmpty()) { - filePath = DEFAULT_FILE_NAME; - } else { - Matcher matcher = FILE_EXTENSION_PATTERN.matcher(filePath); - if (!matcher.find()) { - throw new IllegalArgumentException("Invalid file extension. Use .dot or .gv extension."); - } - } - - Path path = Paths.get(filePath); + Path path = Paths.get(filePath); - Files.createDirectories(path.getParent()); + Files.createDirectories(path.getParent()); - try (BufferedWriter writer = new BufferedWriter(new FileWriter(path.toString(), StandardCharsets.UTF_8))) { - writer.write(verkleTrieDotString); - } + try (BufferedWriter writer = + new BufferedWriter(new FileWriter(path.toString(), StandardCharsets.UTF_8))) { + writer.write(verkleTrieDotString); + } - } catch (AccessDeniedException e) { - LOG.error("Access denied. Check write permissions for the file. Details: {}", e.getMessage(), e); - throw e; - } catch (FileSystemException e) { - LOG.error("File system issue. Check disk space and file system restrictions. Details: {}", e.getMessage(), e); - throw e; - } catch (IOException e) { - LOG.error("Error writing DOT file: {}. Details: {}", e.getMessage(), e); - throw e; - } + } catch (AccessDeniedException e) { + LOG.error( + "Access denied. Check write permissions for the file. Details: {}", e.getMessage(), e); + throw e; + } catch (FileSystemException e) { + LOG.error( + "File system issue. Check disk space and file system restrictions. Details: {}", + e.getMessage(), + e); + throw e; + } catch (IOException e) { + LOG.error("Error writing DOT file: {}. Details: {}", e.getMessage(), e); + throw e; } + } } diff --git a/src/test/java/org/hyperledger/besu/ethereum/trie/verkle/DotDisplayTest.java b/src/test/java/org/hyperledger/besu/ethereum/trie/verkle/DotDisplayTest.java index 4ee61d53..bd007dab 100644 --- a/src/test/java/org/hyperledger/besu/ethereum/trie/verkle/DotDisplayTest.java +++ b/src/test/java/org/hyperledger/besu/ethereum/trie/verkle/DotDisplayTest.java @@ -1,8 +1,21 @@ +/* + * Copyright Besu Contributors + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * + */ package org.hyperledger.besu.ethereum.trie.verkle; -import org.apache.tuweni.bytes.Bytes32; -import org.hyperledger.besu.ethereum.trie.verkle.exporter.DotExporter; -import org.junit.jupiter.api.Test; +import static org.junit.jupiter.api.Assertions.assertEquals; import java.io.BufferedReader; import java.io.IOException; @@ -10,99 +23,115 @@ import java.nio.charset.StandardCharsets; import java.util.stream.Collectors; -import static org.junit.jupiter.api.Assertions.assertEquals; +import org.apache.tuweni.bytes.Bytes32; +import org.junit.jupiter.api.Test; public class DotDisplayTest { - /** - * Reads the content of a file from the resources folder. - * - * @param fileName The name of the file in the resources folder. - * @return The content of the file as a String. - * @throws IOException If an I/O error occurs. - */ - private String getResources(final String fileName) throws IOException { - var classLoader = DotDisplayTest.class.getClassLoader(); - try (BufferedReader reader = new BufferedReader(new InputStreamReader( + /** + * Reads the content of a file from the resources folder. + * + * @param fileName The name of the file in the resources folder. + * @return The content of the file as a String. + * @throws IOException If an I/O error occurs. + */ + private String getResources(final String fileName) throws IOException { + var classLoader = DotDisplayTest.class.getClassLoader(); + try (BufferedReader reader = + new BufferedReader( + new InputStreamReader( classLoader.getResourceAsStream(fileName), StandardCharsets.UTF_8))) { - return reader.lines().collect(Collectors.joining("\n")); - } - } - - @Test - public void testToDotTrieOneValueNoRepeatingEdgesExport() throws IOException { - SimpleVerkleTrie trie = new SimpleVerkleTrie<>(); - Bytes32 key = Bytes32.fromHexString("0x00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff"); - Bytes32 value = Bytes32.fromHexString("0x1000000000000000000000000000000000000000000000000000000000000000"); - trie.put(key, value); - - final String fileName = "expectedTreeOneValueNoRepeatingEdges.txt"; - final String expectedTree = getResources(fileName); - final String actualTree = trie.toDotTree(); - - assertEquals(expectedTree, actualTree); - } - - @Test - public void testToDotTrieOneValueNoRepeatingEdges() throws IOException { - SimpleVerkleTrie trie = new SimpleVerkleTrie<>(); - Bytes32 key = Bytes32.fromHexString("0x00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff"); - Bytes32 value = Bytes32.fromHexString("0x1000000000000000000000000000000000000000000000000000000000000000"); - trie.put(key, value); - - final String fileName = "expectedTreeOneValueNoRepeatingEdges.txt"; - final String expectedTree = getResources(fileName); - final String actualTree = trie.toDotTree(); - assertEquals(expectedTree, actualTree); - } - - - - @Test - public void testToDotTrieTwoValuesNoRepeatingEdges() throws IOException { - SimpleVerkleTrie trie = new SimpleVerkleTrie(); - Bytes32 key1 = Bytes32.fromHexString("0x00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff"); - Bytes32 value1 = Bytes32.fromHexString("0x1000000000000000000000000000000000000000000000000000000000000000"); - Bytes32 key2 = Bytes32.fromHexString("0x00112233445566778899aabbccddeeff00112233445566778899aabbccddee00"); - Bytes32 value2 = Bytes32.fromHexString("0x0100000000000000000000000000000000000000000000000000000000000000"); - - trie.put(key1, value1); - trie.put(key2, value2); - - final String fileName = "expectedTreeTwoValuesNoRepeatingEdges.txt"; - final String expectedTree = getResources(fileName);; - final String actualTree = trie.toDotTree(); - assertEquals(expectedTree, actualTree); - } - - @Test - public void testToDotTrieOneValueRepeatingEdges() throws IOException { - SimpleVerkleTrie trie = new SimpleVerkleTrie<>(); - Bytes32 key = Bytes32.fromHexString("0x00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff"); - Bytes32 value = Bytes32.fromHexString("0x1000000000000000000000000000000000000000000000000000000000000000"); - trie.put(key, value); - - final String fileName = "expectedTreeOneValueRepeatingEdges.txt"; - final String expectedTree = getResources(fileName); - final String actualTree = trie.toDotTree(true); - assertEquals(expectedTree, actualTree); - } - - @Test - public void testToDotTrieTwoValuesRepeatingEdges() throws IOException { - SimpleVerkleTrie trie = new SimpleVerkleTrie(); - Bytes32 key1 = Bytes32.fromHexString("0x00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff"); - Bytes32 value1 = Bytes32.fromHexString("0x1000000000000000000000000000000000000000000000000000000000000000"); - Bytes32 key2 = Bytes32.fromHexString("0x00112233445566778899aabbccddeeff00112233445566778899aabbccddee00"); - Bytes32 value2 = Bytes32.fromHexString("0x0100000000000000000000000000000000000000000000000000000000000000"); - - trie.put(key1, value1); - trie.put(key2, value2); - - final String fileName = "expectedTreeTwoValuesRepeatingEdges.txt"; - final String expectedTree = getResources(fileName); - final String actualTree = trie.toDotTree(true); - assertEquals(expectedTree, actualTree); + return reader.lines().collect(Collectors.joining("\n")); } + } + + @Test + public void testToDotTrieOneValueNoRepeatingEdgesExport() throws IOException { + SimpleVerkleTrie trie = new SimpleVerkleTrie<>(); + Bytes32 key = + Bytes32.fromHexString("0x00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff"); + Bytes32 value = + Bytes32.fromHexString("0x1000000000000000000000000000000000000000000000000000000000000000"); + trie.put(key, value); + + final String fileName = "expectedTreeOneValueNoRepeatingEdges.txt"; + final String expectedTree = getResources(fileName); + final String actualTree = trie.toDotTree(); + + assertEquals(expectedTree, actualTree); + } + + @Test + public void testToDotTrieOneValueNoRepeatingEdges() throws IOException { + SimpleVerkleTrie trie = new SimpleVerkleTrie<>(); + Bytes32 key = + Bytes32.fromHexString("0x00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff"); + Bytes32 value = + Bytes32.fromHexString("0x1000000000000000000000000000000000000000000000000000000000000000"); + trie.put(key, value); + + final String fileName = "expectedTreeOneValueNoRepeatingEdges.txt"; + final String expectedTree = getResources(fileName); + final String actualTree = trie.toDotTree(); + assertEquals(expectedTree, actualTree); + } + + @Test + public void testToDotTrieTwoValuesNoRepeatingEdges() throws IOException { + SimpleVerkleTrie trie = new SimpleVerkleTrie(); + Bytes32 key1 = + Bytes32.fromHexString("0x00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff"); + Bytes32 value1 = + Bytes32.fromHexString("0x1000000000000000000000000000000000000000000000000000000000000000"); + Bytes32 key2 = + Bytes32.fromHexString("0x00112233445566778899aabbccddeeff00112233445566778899aabbccddee00"); + Bytes32 value2 = + Bytes32.fromHexString("0x0100000000000000000000000000000000000000000000000000000000000000"); + + trie.put(key1, value1); + trie.put(key2, value2); + + final String fileName = "expectedTreeTwoValuesNoRepeatingEdges.txt"; + final String expectedTree = getResources(fileName); + ; + final String actualTree = trie.toDotTree(); + assertEquals(expectedTree, actualTree); + } + + @Test + public void testToDotTrieOneValueRepeatingEdges() throws IOException { + SimpleVerkleTrie trie = new SimpleVerkleTrie<>(); + Bytes32 key = + Bytes32.fromHexString("0x00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff"); + Bytes32 value = + Bytes32.fromHexString("0x1000000000000000000000000000000000000000000000000000000000000000"); + trie.put(key, value); + + final String fileName = "expectedTreeOneValueRepeatingEdges.txt"; + final String expectedTree = getResources(fileName); + final String actualTree = trie.toDotTree(true); + assertEquals(expectedTree, actualTree); + } + + @Test + public void testToDotTrieTwoValuesRepeatingEdges() throws IOException { + SimpleVerkleTrie trie = new SimpleVerkleTrie(); + Bytes32 key1 = + Bytes32.fromHexString("0x00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff"); + Bytes32 value1 = + Bytes32.fromHexString("0x1000000000000000000000000000000000000000000000000000000000000000"); + Bytes32 key2 = + Bytes32.fromHexString("0x00112233445566778899aabbccddeeff00112233445566778899aabbccddee00"); + Bytes32 value2 = + Bytes32.fromHexString("0x0100000000000000000000000000000000000000000000000000000000000000"); + + trie.put(key1, value1); + trie.put(key2, value2); + + final String fileName = "expectedTreeTwoValuesRepeatingEdges.txt"; + final String expectedTree = getResources(fileName); + final String actualTree = trie.toDotTree(true); + assertEquals(expectedTree, actualTree); + } } diff --git a/src/test/java/org/hyperledger/besu/ethereum/trie/verkle/DotExporterTest.java b/src/test/java/org/hyperledger/besu/ethereum/trie/verkle/DotExporterTest.java index fe30e523..da2a3508 100644 --- a/src/test/java/org/hyperledger/besu/ethereum/trie/verkle/DotExporterTest.java +++ b/src/test/java/org/hyperledger/besu/ethereum/trie/verkle/DotExporterTest.java @@ -1,8 +1,21 @@ +/* + * Copyright Besu Contributors + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * + */ package org.hyperledger.besu.ethereum.trie.verkle; -import org.apache.tuweni.bytes.Bytes32; -import org.hyperledger.besu.ethereum.trie.verkle.exporter.DotExporter; -import org.junit.jupiter.api.Test; +import static org.junit.jupiter.api.Assertions.assertEquals; import java.io.BufferedReader; import java.io.IOException; @@ -10,42 +23,46 @@ import java.nio.charset.StandardCharsets; import java.util.stream.Collectors; -import static org.junit.jupiter.api.Assertions.assertEquals; +import org.apache.tuweni.bytes.Bytes32; +import org.junit.jupiter.api.Test; public class DotExporterTest { - /** - * Reads the content of a file from the resources folder. - * - * @param fileName The name of the file in the resources folder. - * @return The content of the file as a String. - * @throws IOException If an I/O error occurs. - */ - private String getResources(final String fileName) throws IOException { - - var classLoader = DotDisplayTest.class.getClassLoader(); - try (BufferedReader reader = new BufferedReader(new InputStreamReader( + /** + * Reads the content of a file from the resources folder. + * + * @param fileName The name of the file in the resources folder. + * @return The content of the file as a String. + * @throws IOException If an I/O error occurs. + */ + private String getResources(final String fileName) throws IOException { + + var classLoader = DotDisplayTest.class.getClassLoader(); + try (BufferedReader reader = + new BufferedReader( + new InputStreamReader( classLoader.getResourceAsStream(fileName), StandardCharsets.UTF_8))) { - return reader.lines().collect(Collectors.joining("\n")); - } + return reader.lines().collect(Collectors.joining("\n")); } + } - @Test - public void testToDotTrieOneValueNoRepeatingEdgesExport() throws IOException { - SimpleVerkleTrie trie = new SimpleVerkleTrie<>(); - Bytes32 key = Bytes32.fromHexString("0x00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff"); - Bytes32 value = Bytes32.fromHexString("0x1000000000000000000000000000000000000000000000000000000000000000"); - trie.put(key, value); + @Test + public void testToDotTrieOneValueNoRepeatingEdgesExport() throws IOException { + SimpleVerkleTrie trie = new SimpleVerkleTrie<>(); + Bytes32 key = + Bytes32.fromHexString("0x00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff"); + Bytes32 value = + Bytes32.fromHexString("0x1000000000000000000000000000000000000000000000000000000000000000"); + trie.put(key, value); - trie.dotTreeToFile("src/test/resources/VerkleTrie.gv"); + trie.dotTreeToFile("src/test/resources/VerkleTrie.gv"); - final String fileName = "expectedTreeOneValueNoRepeatingEdges.txt"; - final String expectedTree = getResources(fileName); + final String fileName = "expectedTreeOneValueNoRepeatingEdges.txt"; + final String expectedTree = getResources(fileName); - final String actualFromFile = getResources("VerkleTrie.gv"); - - assertEquals(expectedTree, actualFromFile); - } + final String actualFromFile = getResources("VerkleTrie.gv"); + assertEquals(expectedTree, actualFromFile); + } } From a69c55d1a7826e38bc6571f42db50fd42a96622a Mon Sep 17 00:00:00 2001 From: Neo Date: Sat, 18 Nov 2023 15:25:11 +0300 Subject: [PATCH 21/25] fix tests & remove semicolon Signed-off-by: Neo --- .../hyperledger/besu/ethereum/trie/verkle/DotDisplayTest.java | 2 +- src/test/resources/expectedTreeOneValueNoRepeatingEdges.txt | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/test/java/org/hyperledger/besu/ethereum/trie/verkle/DotDisplayTest.java b/src/test/java/org/hyperledger/besu/ethereum/trie/verkle/DotDisplayTest.java index bd007dab..4d862cf7 100644 --- a/src/test/java/org/hyperledger/besu/ethereum/trie/verkle/DotDisplayTest.java +++ b/src/test/java/org/hyperledger/besu/ethereum/trie/verkle/DotDisplayTest.java @@ -94,7 +94,7 @@ public void testToDotTrieTwoValuesNoRepeatingEdges() throws IOException { final String fileName = "expectedTreeTwoValuesNoRepeatingEdges.txt"; final String expectedTree = getResources(fileName); - ; + final String actualTree = trie.toDotTree(); assertEquals(expectedTree, actualTree); } diff --git a/src/test/resources/expectedTreeOneValueNoRepeatingEdges.txt b/src/test/resources/expectedTreeOneValueNoRepeatingEdges.txt index baae3691..9e1ee361 100644 --- a/src/test/resources/expectedTreeOneValueNoRepeatingEdges.txt +++ b/src/test/resources/expectedTreeOneValueNoRepeatingEdges.txt @@ -517,3 +517,4 @@ NullNode0x[location="0x"] NullNode0x[location="0x"] NullNode0x[location="0x"] } + From a6564c96ba5d3804198d3996f9638fc76bb07c41 Mon Sep 17 00:00:00 2001 From: Neo Date: Sat, 18 Nov 2023 15:28:59 +0300 Subject: [PATCH 22/25] add working tests Signed-off-by: Neo --- .../besu/ethereum/trie/verkle/exporter/DotExporter.java | 2 +- src/test/resources/VerkleTrie.gv | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/exporter/DotExporter.java b/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/exporter/DotExporter.java index 082e8593..02cdd778 100644 --- a/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/exporter/DotExporter.java +++ b/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/exporter/DotExporter.java @@ -73,7 +73,7 @@ public static void exportToDotFile(String verkleTrieDotString, String filePath) try (BufferedWriter writer = new BufferedWriter(new FileWriter(path.toString(), StandardCharsets.UTF_8))) { - writer.write(verkleTrieDotString); + writer.write(verkleTrieDotString + "\n"); } } catch (AccessDeniedException e) { diff --git a/src/test/resources/VerkleTrie.gv b/src/test/resources/VerkleTrie.gv index baae3691..9e1ee361 100644 --- a/src/test/resources/VerkleTrie.gv +++ b/src/test/resources/VerkleTrie.gv @@ -517,3 +517,4 @@ NullNode0x[location="0x"] NullNode0x[location="0x"] NullNode0x[location="0x"] } + From de98029fff80f5f4da78f3de8e87a5932f65bd44 Mon Sep 17 00:00:00 2001 From: "Filip.Gumula" Date: Sat, 18 Nov 2023 20:39:27 +0100 Subject: [PATCH 23/25] Regex for removing unnecessary newlines, adjust tests. Signed-off-by: Neo --- .../besu/ethereum/trie/verkle/SimpleVerkleTrie.java | 2 +- .../besu/ethereum/trie/verkle/exporter/DotExporter.java | 2 +- .../hyperledger/besu/ethereum/trie/verkle/DotDisplayTest.java | 1 + src/test/resources/VerkleTrie.gv | 3 +-- src/test/resources/expectedTreeOneValueNoRepeatingEdges.txt | 3 +-- src/test/resources/expectedTreeOneValueRepeatingEdges.txt | 3 +-- src/test/resources/expectedTreeTwoValuesNoRepeatingEdges.txt | 3 +-- src/test/resources/expectedTreeTwoValuesRepeatingEdges.txt | 3 +-- 8 files changed, 8 insertions(+), 12 deletions(-) diff --git a/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/SimpleVerkleTrie.java b/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/SimpleVerkleTrie.java index 31c49b28..3b9e7e3d 100644 --- a/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/SimpleVerkleTrie.java +++ b/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/SimpleVerkleTrie.java @@ -155,7 +155,7 @@ public void commit(final NodeUpdater nodeUpdater) { * @return The DOT representation of the Verkle Trie. */ public String toDotTree(Boolean showRepeatingEdges) { - return String.format("digraph VerkleTrie {\n%s}\n", getRoot().toDot(showRepeatingEdges)); + return String.format("digraph VerkleTrie {\n%s\n}", getRoot().toDot(showRepeatingEdges).replaceAll("^\\n+|\\n+$", "")); } /** diff --git a/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/exporter/DotExporter.java b/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/exporter/DotExporter.java index 02cdd778..082e8593 100644 --- a/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/exporter/DotExporter.java +++ b/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/exporter/DotExporter.java @@ -73,7 +73,7 @@ public static void exportToDotFile(String verkleTrieDotString, String filePath) try (BufferedWriter writer = new BufferedWriter(new FileWriter(path.toString(), StandardCharsets.UTF_8))) { - writer.write(verkleTrieDotString + "\n"); + writer.write(verkleTrieDotString); } } catch (AccessDeniedException e) { diff --git a/src/test/java/org/hyperledger/besu/ethereum/trie/verkle/DotDisplayTest.java b/src/test/java/org/hyperledger/besu/ethereum/trie/verkle/DotDisplayTest.java index 4d862cf7..caaa6752 100644 --- a/src/test/java/org/hyperledger/besu/ethereum/trie/verkle/DotDisplayTest.java +++ b/src/test/java/org/hyperledger/besu/ethereum/trie/verkle/DotDisplayTest.java @@ -58,6 +58,7 @@ public void testToDotTrieOneValueNoRepeatingEdgesExport() throws IOException { final String fileName = "expectedTreeOneValueNoRepeatingEdges.txt"; final String expectedTree = getResources(fileName); final String actualTree = trie.toDotTree(); + System.out.println(actualTree); assertEquals(expectedTree, actualTree); } diff --git a/src/test/resources/VerkleTrie.gv b/src/test/resources/VerkleTrie.gv index 9e1ee361..67a9c05c 100644 --- a/src/test/resources/VerkleTrie.gv +++ b/src/test/resources/VerkleTrie.gv @@ -516,5 +516,4 @@ NullNode0x[location="0x"] NullNode0x[location="0x"] NullNode0x[location="0x"] NullNode0x[location="0x"] -} - +} \ No newline at end of file diff --git a/src/test/resources/expectedTreeOneValueNoRepeatingEdges.txt b/src/test/resources/expectedTreeOneValueNoRepeatingEdges.txt index 9e1ee361..67a9c05c 100644 --- a/src/test/resources/expectedTreeOneValueNoRepeatingEdges.txt +++ b/src/test/resources/expectedTreeOneValueNoRepeatingEdges.txt @@ -516,5 +516,4 @@ NullNode0x[location="0x"] NullNode0x[location="0x"] NullNode0x[location="0x"] NullNode0x[location="0x"] -} - +} \ No newline at end of file diff --git a/src/test/resources/expectedTreeOneValueRepeatingEdges.txt b/src/test/resources/expectedTreeOneValueRepeatingEdges.txt index 674ef96e..c0c52a24 100644 --- a/src/test/resources/expectedTreeOneValueRepeatingEdges.txt +++ b/src/test/resources/expectedTreeOneValueRepeatingEdges.txt @@ -1024,5 +1024,4 @@ InternalNode0x -> NullNode0x NullNode0x[location="0x"] InternalNode0x -> NullNode0x NullNode0x[location="0x"] -} - +} \ No newline at end of file diff --git a/src/test/resources/expectedTreeTwoValuesNoRepeatingEdges.txt b/src/test/resources/expectedTreeTwoValuesNoRepeatingEdges.txt index 3fa52433..453e2ad2 100644 --- a/src/test/resources/expectedTreeTwoValuesNoRepeatingEdges.txt +++ b/src/test/resources/expectedTreeTwoValuesNoRepeatingEdges.txt @@ -517,5 +517,4 @@ NullNode0x[location="0x"] NullNode0x[location="0x"] NullNode0x[location="0x"] NullNode0x[location="0x"] -} - +} \ No newline at end of file diff --git a/src/test/resources/expectedTreeTwoValuesRepeatingEdges.txt b/src/test/resources/expectedTreeTwoValuesRepeatingEdges.txt index f2e567ac..5cc59b0a 100644 --- a/src/test/resources/expectedTreeTwoValuesRepeatingEdges.txt +++ b/src/test/resources/expectedTreeTwoValuesRepeatingEdges.txt @@ -1024,5 +1024,4 @@ InternalNode0x -> NullNode0x NullNode0x[location="0x"] InternalNode0x -> NullNode0x NullNode0x[location="0x"] -} - +} \ No newline at end of file From bbe9931321d4ff2269a67c2dbd754f72600d8343 Mon Sep 17 00:00:00 2001 From: "Filip.Gumula" Date: Sat, 18 Nov 2023 20:42:35 +0100 Subject: [PATCH 24/25] format - spotlessApply Signed-off-by: Neo --- .../besu/ethereum/trie/verkle/SimpleVerkleTrie.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/SimpleVerkleTrie.java b/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/SimpleVerkleTrie.java index 3b9e7e3d..94ab9748 100644 --- a/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/SimpleVerkleTrie.java +++ b/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/SimpleVerkleTrie.java @@ -155,7 +155,9 @@ public void commit(final NodeUpdater nodeUpdater) { * @return The DOT representation of the Verkle Trie. */ public String toDotTree(Boolean showRepeatingEdges) { - return String.format("digraph VerkleTrie {\n%s\n}", getRoot().toDot(showRepeatingEdges).replaceAll("^\\n+|\\n+$", "")); + return String.format( + "digraph VerkleTrie {\n%s\n}", + getRoot().toDot(showRepeatingEdges).replaceAll("^\\n+|\\n+$", "")); } /** @@ -174,7 +176,8 @@ public String toDotTree() { } /** - * Exports the Verkle Trie DOT representation to a '.gv' file located in the current directory. + * Exports the Verkle Trie DOT representation to a '.gv' file located in the + * current directory. * The default file name is "VerkleTree.gv". * * @throws IOException if an I/O error occurs. @@ -184,7 +187,8 @@ public void dotTreeToFile() throws IOException { } /** - * /** Exports the Verkle Trie DOT representation to a '.gv' file located at the specified path. + * /** Exports the Verkle Trie DOT representation to a '.gv' file located at the + * specified path. * * @param path The location where the DOT file will be saved. * @throws IOException if ann I/O error occurs. From deee991487ace7dcc4de9e783c0fb57c84773056 Mon Sep 17 00:00:00 2001 From: Uacias Date: Mon, 20 Nov 2023 16:21:02 +0000 Subject: [PATCH 25/25] Fix newline issue, tests pass, format Signed-off-by: Neo --- .../trie/verkle/SimpleVerkleTrie.java | 23 +- .../trie/verkle/StoredVerkleTrie.java | 1 - .../besu/ethereum/trie/verkle/VerkleTrie.java | 14 +- .../ethereum/trie/verkle/node/BranchNode.java | 45 +- .../trie/verkle/node/InternalNode.java | 45 +- .../ethereum/trie/verkle/node/LeafNode.java | 25 +- .../besu/ethereum/trie/verkle/node/Node.java | 9 +- .../trie/verkle/node/NullLeafNode.java | 26 +- .../ethereum/trie/verkle/node/NullNode.java | 26 +- .../ethereum/trie/verkle/node/StemNode.java | 96 ++-- .../ethereum/trie/verkle/node/StoredNode.java | 15 +- .../ethereum/trie/verkle/DotDisplayTest.java | 1 - .../trie/verkle/SimpleVerkleTrieTest.java | 504 ++++++++++-------- 13 files changed, 452 insertions(+), 378 deletions(-) diff --git a/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/SimpleVerkleTrie.java b/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/SimpleVerkleTrie.java index 94ab9748..31970ab5 100644 --- a/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/SimpleVerkleTrie.java +++ b/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/SimpleVerkleTrie.java @@ -78,8 +78,7 @@ public Node getRoot() { * Gets the value associated with the specified key from the Verkle Trie. * * @param key The key to retrieve the value for. - * @return An optional containing the value if found, or an empty optional if - * not found. + * @return An optional containing the value if found, or an empty optional if not found. */ @Override public Optional get(final K key) { @@ -90,7 +89,7 @@ public Optional get(final K key) { /** * Inserts a key-value pair into the Verkle Trie. * - * @param key The key to insert. + * @param key The key to insert. * @param value The value to associate with the key. */ @Override @@ -137,8 +136,7 @@ public String toString() { /** * Commits the Verkle Trie using the provided node updater. * - * @param nodeUpdater The node updater for storing the changes in the Verkle - * Trie. + * @param nodeUpdater The node updater for storing the changes in the Verkle Trie. */ @Override public void commit(final NodeUpdater nodeUpdater) { @@ -149,9 +147,7 @@ public void commit(final NodeUpdater nodeUpdater) { /** * Returns the DOT representation of the entire Verkle Trie. * - * @param showRepeatingEdges if true displays repeating edges; if false does - * not. - * + * @param showRepeatingEdges if true displays repeating edges; if false does not. * @return The DOT representation of the Verkle Trie. */ public String toDotTree(Boolean showRepeatingEdges) { @@ -163,8 +159,7 @@ public String toDotTree(Boolean showRepeatingEdges) { /** * Returns the DOT representation of the entire Verkle Trie. * - *

- * The representation does not contain repeating edges. + *

The representation does not contain repeating edges. * * @return The DOT representation of the Verkle Trie. */ @@ -172,12 +167,11 @@ public String toDotTree() { StringBuilder result = new StringBuilder("digraph VerkleTrie {\n"); Node root = getRoot(); result.append(root.toDot()); - return result.append("}\n").toString(); + return result.append("}").toString(); } /** - * Exports the Verkle Trie DOT representation to a '.gv' file located in the - * current directory. + * Exports the Verkle Trie DOT representation to a '.gv' file located in the current directory. * The default file name is "VerkleTree.gv". * * @throws IOException if an I/O error occurs. @@ -187,8 +181,7 @@ public void dotTreeToFile() throws IOException { } /** - * /** Exports the Verkle Trie DOT representation to a '.gv' file located at the - * specified path. + * /** Exports the Verkle Trie DOT representation to a '.gv' file located at the specified path. * * @param path The location where the DOT file will be saved. * @throws IOException if ann I/O error occurs. diff --git a/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/StoredVerkleTrie.java b/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/StoredVerkleTrie.java index b6632123..7fbde051 100644 --- a/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/StoredVerkleTrie.java +++ b/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/StoredVerkleTrie.java @@ -38,5 +38,4 @@ public StoredVerkleTrie(final NodeFactory nodeFactory) { super(nodeFactory.retrieve(Bytes.EMPTY, null)); this.nodeFactory = nodeFactory; } - } diff --git a/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/VerkleTrie.java b/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/VerkleTrie.java index b307ce87..7652994c 100644 --- a/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/VerkleTrie.java +++ b/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/VerkleTrie.java @@ -25,29 +25,25 @@ public interface VerkleTrie { /** - * Returns an {@code Optional} of value mapped to the hash if it exists; - * otherwise empty. + * Returns an {@code Optional} of value mapped to the hash if it exists; otherwise empty. * * @param key The key for the value. - * @return an {@code Optional} of value mapped to the hash if it exists; - * otherwise empty + * @return an {@code Optional} of value mapped to the hash if it exists; otherwise empty */ Optional get(K key); /** - * Updates the value mapped to the specified key, creating the mapping if one - * does not already + * Updates the value mapped to the specified key, creating the mapping if one does not already * exist. * - * @param key The key that corresponds to the value to be updated. + * @param key The key that corresponds to the value to be updated. * @param value The value to associate the key with. * @return Optional previous value before replacement if it exists. */ Optional put(K key, V value); /** - * Deletes the value mapped to the specified key, if such a value exists - * (Optional operation). + * Deletes the value mapped to the specified key, if such a value exists (Optional operation). * * @param key The key of the value to be deleted. */ diff --git a/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/node/BranchNode.java b/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/node/BranchNode.java index 9f8ffb82..95af72d4 100644 --- a/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/node/BranchNode.java +++ b/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/node/BranchNode.java @@ -42,10 +42,10 @@ public abstract class BranchNode implements Node { /** * Constructs a new BranchNode with location, hash, path, and children. * - * @param location The location in the tree. - * @param hash Node's vector commitment's hash. + * @param location The location in the tree. + * @param hash Node's vector commitment's hash. * @param commitment Node's vector commitment. - * @param children The list of children nodes. + * @param children The list of children nodes. */ public BranchNode( final Bytes location, @@ -60,14 +60,13 @@ public BranchNode( } /** - * Constructs a new BranchNode with optional location, optional hash, optional - * commitment and + * Constructs a new BranchNode with optional location, optional hash, optional commitment and * children. * - * @param location The optional location in the tree. - * @param hash The optional vector commitment of children's commitments. + * @param location The optional location in the tree. + * @param hash The optional vector commitment of children's commitments. * @param commitment Node's optional vector commitment. - * @param children The list of children nodes. + * @param children The list of children nodes. */ public BranchNode( final Optional location, @@ -96,8 +95,7 @@ public BranchNode(final Optional location, final List> children) } /** - * Constructs a new BranchNode with optional location and path, initializing - * children to + * Constructs a new BranchNode with optional location and path, initializing children to * NullNodes. * * @param location The optional location in the tree. @@ -125,7 +123,7 @@ public static int maxChild() { * Accepts a visitor for path-based operations on the node. * * @param visitor The path node visitor. - * @param path The path associated with a node. + * @param path The path associated with a node. * @return The result of the visitor's operation. */ @Override @@ -153,7 +151,7 @@ public Node child(final byte childIndex) { /** * Replaces the child node at a specified index with a new node. * - * @param index The index of the child node to replace. + * @param index The index of the child node to replace. * @param childNode The new child node. */ public void replaceChild(final byte index, final Node childNode) { @@ -251,15 +249,24 @@ public String print() { */ @Override public String toDot(Boolean showRepeatingEdges) { - StringBuilder result = new StringBuilder() - .append(getClass().getSimpleName()).append(getLocation().orElse(Bytes.EMPTY)) - .append("\", location=\"").append(getLocation().orElse(Bytes.EMPTY)) - .append("\", commitment=\"").append(getHash().orElse(Bytes32.ZERO)).append("\"]\n"); + StringBuilder result = + new StringBuilder() + .append(getClass().getSimpleName()) + .append(getLocation().orElse(Bytes.EMPTY)) + .append("\", location=\"") + .append(getLocation().orElse(Bytes.EMPTY)) + .append("\", commitment=\"") + .append(getHash().orElse(Bytes32.ZERO)) + .append("\"]\n"); for (Node child : getChildren()) { - String edgeString = getClass().getSimpleName() + getLocation().orElse(Bytes.EMPTY) + " -> " - + child.getClass().getSimpleName() - + child.getLocation().orElse(Bytes.EMPTY) + "\n"; + String edgeString = + getClass().getSimpleName() + + getLocation().orElse(Bytes.EMPTY) + + " -> " + + child.getClass().getSimpleName() + + child.getLocation().orElse(Bytes.EMPTY) + + "\n"; if (showRepeatingEdges || !result.toString().contains(edgeString)) { result.append(edgeString); diff --git a/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/node/InternalNode.java b/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/node/InternalNode.java index 0bf50fa1..24b60842 100644 --- a/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/node/InternalNode.java +++ b/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/node/InternalNode.java @@ -38,10 +38,10 @@ public class InternalNode extends BranchNode { /** * Constructs a new InternalNode with location, hash, path, and children. * - * @param location The location in the tree. - * @param hash Node's vector commitment's hash. + * @param location The location in the tree. + * @param hash Node's vector commitment's hash. * @param commitment Node's vector commitment. - * @param children The list of children nodes. + * @param children The list of children nodes. */ public InternalNode( final Bytes location, @@ -52,14 +52,13 @@ public InternalNode( } /** - * Constructs a new InternalNode with optional location, optional hash, optional - * commitment and + * Constructs a new InternalNode with optional location, optional hash, optional commitment and * children. * - * @param location The optional location in the tree. - * @param hash The optional vector commitment of children's commitments. + * @param location The optional location in the tree. + * @param hash The optional vector commitment of children's commitments. * @param commitment Node's optional vector commitment. - * @param children The list of children nodes. + * @param children The list of children nodes. */ public InternalNode( final Optional location, @@ -80,8 +79,7 @@ public InternalNode(final Optional location, final List> children } /** - * Constructs a new InternalNode with optional location and path, initializing - * children to + * Constructs a new InternalNode with optional location and path, initializing children to * NullNodes. * * @param location The optional location in the tree. @@ -94,7 +92,7 @@ public InternalNode(final Bytes location) { * Accepts a visitor for path-based operations on the node. * * @param visitor The path node visitor. - * @param path The path associated with a node. + * @param path The path associated with a node. * @return The result of the visitor's operation. */ @Override @@ -116,7 +114,7 @@ public Node accept(final NodeVisitor visitor) { /** * Replace the vector commitment with a new one. * - * @param hash The new vector commitment's hash to set. + * @param hash The new vector commitment's hash to set. * @param commitment The new vector commitment to set. * @return A new InternalNode with the updated vector commitment. */ @@ -168,15 +166,24 @@ public String print() { */ @Override public String toDot(Boolean showRepeatingEdges) { - StringBuilder result = new StringBuilder() - .append(getClass().getSimpleName()).append(getLocation().orElse(Bytes.EMPTY)) - .append("[location=\"").append(getLocation().orElse(Bytes.EMPTY)) - .append("\", commitment=\"").append(getHash().orElse(Bytes32.ZERO)).append("\"]\n"); + StringBuilder result = + new StringBuilder() + .append(getClass().getSimpleName()) + .append(getLocation().orElse(Bytes.EMPTY)) + .append("[location=\"") + .append(getLocation().orElse(Bytes.EMPTY)) + .append("\", commitment=\"") + .append(getHash().orElse(Bytes32.ZERO)) + .append("\"]\n"); for (Node child : getChildren()) { - String edgeString = getClass().getSimpleName() + getLocation().orElse(Bytes.EMPTY) + " -> " - + child.getClass().getSimpleName() - + child.getLocation().orElse(Bytes.EMPTY) + "\n"; + String edgeString = + getClass().getSimpleName() + + getLocation().orElse(Bytes.EMPTY) + + " -> " + + child.getClass().getSimpleName() + + child.getLocation().orElse(Bytes.EMPTY) + + "\n"; if (showRepeatingEdges || !result.toString().contains(edgeString)) { result.append(edgeString); diff --git a/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/node/LeafNode.java b/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/node/LeafNode.java index 2c9ff2bc..fe459162 100644 --- a/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/node/LeafNode.java +++ b/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/node/LeafNode.java @@ -43,7 +43,7 @@ public class LeafNode implements Node { * Constructs a new LeafNode with location, value. * * @param location The location of the node in the tree. - * @param value The value associated with the node. + * @param value The value associated with the node. */ public LeafNode(final Bytes location, final V value) { this.location = Optional.of(location); @@ -55,7 +55,7 @@ public LeafNode(final Bytes location, final V value) { * Constructs a new LeafNode with optional location, value. * * @param location The location of the node in the tree (Optional). - * @param value The value associated with the node. + * @param value The value associated with the node. */ public LeafNode(final Optional location, final V value) { this.location = location; @@ -67,7 +67,7 @@ public LeafNode(final Optional location, final V value) { * Accepts a visitor for path-based operations on the node. * * @param visitor The path node visitor. - * @param path The path associated with a node. + * @param path The path associated with a node. * @return The result of the visitor's operation. */ @Override @@ -107,8 +107,7 @@ public Optional getLocation() { } /** - * Get the children of the node. A leaf node does not have children, so this - * method throws an + * Get the children of the node. A leaf node does not have children, so this method throws an * UnsupportedOperationException. * * @return The list of children nodes (unsupported operation). @@ -129,7 +128,8 @@ public Bytes getEncodedValue() { if (encodedValue.isPresent()) { return encodedValue.get(); } - Bytes encodedVal = getValue().isPresent() ? valueSerializer.apply(getValue().get()) : Bytes.EMPTY; + Bytes encodedVal = + getValue().isPresent() ? valueSerializer.apply(getValue().get()) : Bytes.EMPTY; List values = Arrays.asList(encodedVal); Bytes result = RLP.encodeList(values, RLPWriter::writeValue); this.encodedValue = Optional.of(result); @@ -172,10 +172,15 @@ public String toDot(Boolean showRepeatingEdges) { Bytes locationBytes = getLocation().orElse(Bytes.EMPTY); return new StringBuilder() - .append(getClass().getSimpleName()).append(locationBytes) - .append("[location=\"").append(locationBytes) - .append("\", suffix=\"").append(locationBytes.get(locationBytes.size() - 1)) - .append("\", value=\"").append(getValue().orElse(null)).append("\"]\n") + .append(getClass().getSimpleName()) + .append(locationBytes) + .append("[location=\"") + .append(locationBytes) + .append("\", suffix=\"") + .append(locationBytes.get(locationBytes.size() - 1)) + .append("\", value=\"") + .append(getValue().orElse(null)) + .append("\"]\n") .toString(); } } diff --git a/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/node/Node.java b/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/node/Node.java index aabae25a..5a9a18ce 100644 --- a/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/node/Node.java +++ b/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/node/Node.java @@ -42,7 +42,7 @@ public interface Node { * Accept a visitor to perform operations on the node based on a provided path. * * @param visitor The visitor to accept. - * @param path The path associated with a node. + * @param path The path associated with a node. * @return The result of visitor's operation. */ Node accept(PathNodeVisitor visitor, Bytes path); @@ -129,9 +129,7 @@ default List> getChildren() { /** * Generates DOT representation for the Node. * - * @param showRepeatingEdges If true, prints all edges; if false, prints only - * unique edges. - * + * @param showRepeatingEdges If true, prints all edges; if false, prints only unique edges. * @return DOT representation of the Node. */ String toDot(Boolean showRepeatingEdges); @@ -139,8 +137,7 @@ default List> getChildren() { /** * Generates DOT representation for the Node. * - *

- * Representation does not contain repeating edges. + *

Representation does not contain repeating edges. * * @return DOT representation of the Node. */ diff --git a/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/node/NullLeafNode.java b/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/node/NullLeafNode.java index 463f843a..d4111368 100644 --- a/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/node/NullLeafNode.java +++ b/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/node/NullLeafNode.java @@ -26,11 +26,8 @@ /** * A special node representing a null or empty node in the Verkle Trie. * - *

- * The `NullNode` class serves as a placeholder for non-existent nodes in the - * Verkle Trie - * structure. It implements the Node interface and represents a node that - * contains no information or + *

The `NullNode` class serves as a placeholder for non-existent nodes in the Verkle Trie + * structure. It implements the Node interface and represents a node that contains no information or * value. */ public class NullLeafNode implements Node { @@ -38,12 +35,10 @@ public class NullLeafNode implements Node { private static final NullLeafNode instance = new NullLeafNode(); /** - * Constructs a new `NullNode`. This constructor is protected to ensure that - * `NullNode` instances + * Constructs a new `NullNode`. This constructor is protected to ensure that `NullNode` instances * are only created as singletons. */ - protected NullLeafNode() { - } + protected NullLeafNode() {} /** * Gets the shared instance of the `NullNode`. @@ -60,7 +55,7 @@ public static NullLeafNode instance() { * Accepts a visitor for path-based operations on the node. * * @param visitor The path node visitor. - * @param path The path associated with a node. + * @param path The path associated with a node. * @return The result of the visitor's operation. */ @Override @@ -116,8 +111,12 @@ public String print() { */ @Override public String toDot(Boolean showRepeatingEdges) { - String result = getClass().getSimpleName() + getLocation().orElse(Bytes.EMPTY) + " [location=\"" - + getLocation().orElse(Bytes.EMPTY) + "\"]\n"; + String result = + getClass().getSimpleName() + + getLocation().orElse(Bytes.EMPTY) + + " [location=\"" + + getLocation().orElse(Bytes.EMPTY) + + "\"]\n"; return result; } @@ -134,8 +133,7 @@ public boolean isDirty() { /** * Mark the `NullNode` as dirty (not used, no operation). * - *

- * This method intentionally does nothing. + *

This method intentionally does nothing. */ @Override public void markDirty() { diff --git a/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/node/NullNode.java b/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/node/NullNode.java index 844a2a31..e4c07334 100644 --- a/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/node/NullNode.java +++ b/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/node/NullNode.java @@ -26,11 +26,8 @@ /** * A special node representing a null or empty node in the Verkle Trie. * - *

- * The `NullNode` class serves as a placeholder for non-existent nodes in the - * Verkle Trie - * structure. It implements the Node interface and represents a node that - * contains no information or + *

The `NullNode` class serves as a placeholder for non-existent nodes in the Verkle Trie + * structure. It implements the Node interface and represents a node that contains no information or * value. */ public class NullNode implements Node { @@ -38,12 +35,10 @@ public class NullNode implements Node { private static final NullNode instance = new NullNode(); /** - * Constructs a new `NullNode`. This constructor is protected to ensure that - * `NullNode` instances + * Constructs a new `NullNode`. This constructor is protected to ensure that `NullNode` instances * are only created as singletons. */ - protected NullNode() { - } + protected NullNode() {} /** * Gets the shared instance of the `NullNode`. @@ -60,7 +55,7 @@ public static NullNode instance() { * Accepts a visitor for path-based operations on the node. * * @param visitor The path node visitor. - * @param path The path associated with a node. + * @param path The path associated with a node. * @return The result of the visitor's operation. */ @Override @@ -116,8 +111,12 @@ public String print() { */ @Override public String toDot(Boolean showRepeatingEdges) { - String result = getClass().getSimpleName() + getLocation().orElse(Bytes.EMPTY) + "[location=\"" - + getLocation().orElse(Bytes.EMPTY) + "\"]\n"; + String result = + getClass().getSimpleName() + + getLocation().orElse(Bytes.EMPTY) + + "[location=\"" + + getLocation().orElse(Bytes.EMPTY) + + "\"]\n"; return result; } @@ -134,8 +133,7 @@ public boolean isDirty() { /** * Mark the `NullNode` as dirty (not used, no operation). * - *

- * This method intentionally does nothing. + *

This method intentionally does nothing. */ @Override public void markDirty() { diff --git a/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/node/StemNode.java b/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/node/StemNode.java index 4373e370..4ecde3a9 100644 --- a/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/node/StemNode.java +++ b/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/node/StemNode.java @@ -30,9 +30,7 @@ /** * Represents a stem node in the Verkle Trie. * - *

- * StemNodes are nodes storing the stem of the key, and is the root of the - * suffix to value trie. + *

StemNodes are nodes storing the stem of the key, and is the root of the suffix to value trie. * * @param The type of the node's value. */ @@ -49,15 +47,15 @@ public class StemNode extends BranchNode { /** * Constructs a new StemNode with non-optional parameters. * - * @param location The location in the tree. - * @param stem Node's stem. - * @param hash Node's vector commitment's hash. - * @param commitment Node's vector commitment. - * @param leftHash Hash of vector commitment to left values. - * @param leftCommitment Vector commitment to left values. - * @param rightHash Hash of vector commitment to right values. + * @param location The location in the tree. + * @param stem Node's stem. + * @param hash Node's vector commitment's hash. + * @param commitment Node's vector commitment. + * @param leftHash Hash of vector commitment to left values. + * @param leftCommitment Vector commitment to left values. + * @param rightHash Hash of vector commitment to right values. * @param rightCommitment Vector commitment to right values. - * @param children The list of children nodes. + * @param children The list of children nodes. */ public StemNode( final Bytes location, @@ -80,15 +78,15 @@ public StemNode( /** * Constructs a new StemNode with optional parameters. * - * @param location Optional location in the tree. - * @param stem Node's stem. - * @param hash Optional node's vector commitment's hash. - * @param commitment Optional node's vector commitment. - * @param leftHash Optional hash of vector commitment to left values. - * @param leftCommitment Optional vector commitment to left values. - * @param rightHash Optional hash of vector commitment to right values. + * @param location Optional location in the tree. + * @param stem Node's stem. + * @param hash Optional node's vector commitment's hash. + * @param commitment Optional node's vector commitment. + * @param leftHash Optional hash of vector commitment to left values. + * @param leftCommitment Optional vector commitment to left values. + * @param rightHash Optional hash of vector commitment to right values. * @param rightCommitment Optional vector commitment to right values. - * @param children The list of children nodes. + * @param children The list of children nodes. */ public StemNode( final Optional location, @@ -112,7 +110,7 @@ public StemNode( * Constructs a new BranchNode with non-optional parameters. * * @param location The location in the tree. - * @param stem Node's stem. + * @param stem Node's stem. */ public StemNode(final Bytes location, final Bytes stem) { super(location); @@ -130,7 +128,7 @@ public StemNode(final Bytes location, final Bytes stem) { * Accepts a visitor for path-based operations on the node. * * @param visitor The path node visitor. - * @param path The path associated with a node. + * @param path The path associated with a node. * @return The result of the visitor's operation. */ @Override @@ -225,11 +223,11 @@ public StemNode replaceLocation(final Bytes location) { /** * Creates a new node by replacing all its commitments * - * @param hash Node's vector commitment hash - * @param commitment Node's vector commitment - * @param leftHash Node's left vector commitment hash - * @param leftCommitment Node's left vector commitment - * @param rightHash Node's right vector commitment hash + * @param hash Node's vector commitment hash + * @param commitment Node's vector commitment + * @param leftHash Node's left vector commitment hash + * @param leftCommitment Node's left vector commitment + * @param rightHash Node's right vector commitment hash * @param rightCommitment Node's right vector commitment * @return StemNode with new commitments. */ @@ -262,14 +260,15 @@ public Bytes getEncodedValue() { if (encodedValue.isPresent()) { return encodedValue.get(); } - List values = Arrays.asList( - getStem(), - (Bytes) getHash().get(), - (Bytes) getCommitment().get(), - (Bytes) getLeftHash().get(), - (Bytes) getLeftCommitment().get(), - (Bytes) getRightHash().get(), - (Bytes) getRightCommitment().get()); + List values = + Arrays.asList( + getStem(), + (Bytes) getHash().get(), + (Bytes) getCommitment().get(), + (Bytes) getLeftHash().get(), + (Bytes) getLeftCommitment().get(), + (Bytes) getRightHash().get(), + (Bytes) getRightCommitment().get()); Bytes result = RLP.encodeList(values, RLPWriter::writeValue); this.encodedValue = Optional.of(result); return result; @@ -301,17 +300,28 @@ private Bytes extractStem(final Bytes stemValue) { @Override public String toDot(Boolean showRepeatingEdges) { - StringBuilder result = new StringBuilder() - .append(getClass().getSimpleName()).append(getLocation().orElse(Bytes.EMPTY)) - .append("[location=\"").append(getLocation().orElse(Bytes.EMPTY)) - .append("\", stem=\"").append(getStem()) - .append("\", leftCommitment=\"").append(getLeftCommitment().orElse(Bytes32.ZERO)) - .append("\", rightCommitment=\"").append(getRightCommitment().orElse(Bytes32.ZERO)).append("\"]\n"); + StringBuilder result = + new StringBuilder() + .append(getClass().getSimpleName()) + .append(getLocation().orElse(Bytes.EMPTY)) + .append("[location=\"") + .append(getLocation().orElse(Bytes.EMPTY)) + .append("\", stem=\"") + .append(getStem()) + .append("\", leftCommitment=\"") + .append(getLeftCommitment().orElse(Bytes32.ZERO)) + .append("\", rightCommitment=\"") + .append(getRightCommitment().orElse(Bytes32.ZERO)) + .append("\"]\n"); for (Node child : getChildren()) { - String edgeString = getClass().getSimpleName() + getLocation().orElse(Bytes.EMPTY) + " -> " - + child.getClass().getSimpleName() - + child.getLocation().orElse(Bytes.EMPTY) + "\n"; + String edgeString = + getClass().getSimpleName() + + getLocation().orElse(Bytes.EMPTY) + + " -> " + + child.getClass().getSimpleName() + + child.getLocation().orElse(Bytes.EMPTY) + + "\n"; if (showRepeatingEdges || !result.toString().contains(edgeString)) { result.append(edgeString); diff --git a/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/node/StoredNode.java b/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/node/StoredNode.java index deaa547f..a5b78bc0 100644 --- a/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/node/StoredNode.java +++ b/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/node/StoredNode.java @@ -28,8 +28,7 @@ /** * Represents a regular node that can possibly be stored in storage. * - *

- * StoredNodes wrap regular nodes and loads them lazily from storage as needed. + *

StoredNodes wrap regular nodes and loads them lazily from storage as needed. * * @param The type of the node's value. */ @@ -44,7 +43,7 @@ public class StoredNode implements Node { * Constructs a new StoredNode at location. * * @param nodeFactory The node factory for creating nodes from storage. - * @param location The location in the tree. + * @param location The location in the tree. */ public StoredNode(final NodeFactory nodeFactory, final Bytes location) { this.location = location; @@ -56,7 +55,7 @@ public StoredNode(final NodeFactory nodeFactory, final Bytes location) { * Accept a visitor to perform operations on the node based on a provided path. * * @param visitor The visitor to accept. - * @param path The path associated with a node. + * @param path The path associated with a node. * @return The result of visitor's operation. */ @Override @@ -176,8 +175,12 @@ public String print() { */ @Override public String toDot(Boolean showRepeatingEdges) { - String result = getClass().getSimpleName() + getLocation().orElse(Bytes.EMPTY) + "[location=\"" - + getLocation().orElse(Bytes.EMPTY) + "\"]\n"; + String result = + getClass().getSimpleName() + + getLocation().orElse(Bytes.EMPTY) + + "[location=\"" + + getLocation().orElse(Bytes.EMPTY) + + "\"]\n"; return result; } diff --git a/src/test/java/org/hyperledger/besu/ethereum/trie/verkle/DotDisplayTest.java b/src/test/java/org/hyperledger/besu/ethereum/trie/verkle/DotDisplayTest.java index caaa6752..4d862cf7 100644 --- a/src/test/java/org/hyperledger/besu/ethereum/trie/verkle/DotDisplayTest.java +++ b/src/test/java/org/hyperledger/besu/ethereum/trie/verkle/DotDisplayTest.java @@ -58,7 +58,6 @@ public void testToDotTrieOneValueNoRepeatingEdgesExport() throws IOException { final String fileName = "expectedTreeOneValueNoRepeatingEdges.txt"; final String expectedTree = getResources(fileName); final String actualTree = trie.toDotTree(); - System.out.println(actualTree); assertEquals(expectedTree, actualTree); } diff --git a/src/test/java/org/hyperledger/besu/ethereum/trie/verkle/SimpleVerkleTrieTest.java b/src/test/java/org/hyperledger/besu/ethereum/trie/verkle/SimpleVerkleTrieTest.java index 784b2c16..8bbc538c 100644 --- a/src/test/java/org/hyperledger/besu/ethereum/trie/verkle/SimpleVerkleTrieTest.java +++ b/src/test/java/org/hyperledger/besu/ethereum/trie/verkle/SimpleVerkleTrieTest.java @@ -25,246 +25,308 @@ public class SimpleVerkleTrieTest { - @Test - public void testToDotTrieOneValueNoRepeatingEdges() { - SimpleVerkleTrie trie = new SimpleVerkleTrie<>(); - Bytes32 key = Bytes32.fromHexString("0x00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff"); - Bytes32 value = Bytes32.fromHexString("0x1000000000000000000000000000000000000000000000000000000000000000"); - trie.put(key, value); + @Test + public void testToDotTrieOneValueNoRepeatingEdges() { + SimpleVerkleTrie trie = new SimpleVerkleTrie<>(); + Bytes32 key = + Bytes32.fromHexString("0x00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff"); + Bytes32 value = + Bytes32.fromHexString("0x1000000000000000000000000000000000000000000000000000000000000000"); + trie.put(key, value); - System.out.println(trie.toDotTree()); - } + System.out.println(trie.toDotTree()); + } - @Test - public void testToDotTrieTwoValuesNoRepeatingEdges() { - SimpleVerkleTrie trie = new SimpleVerkleTrie(); - Bytes32 key1 = Bytes32.fromHexString("0x00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff"); - Bytes32 value1 = Bytes32.fromHexString("0x1000000000000000000000000000000000000000000000000000000000000000"); - Bytes32 key2 = Bytes32.fromHexString("0x00112233445566778899aabbccddeeff00112233445566778899aabbccddee00"); - Bytes32 value2 = Bytes32.fromHexString("0x0100000000000000000000000000000000000000000000000000000000000000"); + @Test + public void testToDotTrieTwoValuesNoRepeatingEdges() { + SimpleVerkleTrie trie = new SimpleVerkleTrie(); + Bytes32 key1 = + Bytes32.fromHexString("0x00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff"); + Bytes32 value1 = + Bytes32.fromHexString("0x1000000000000000000000000000000000000000000000000000000000000000"); + Bytes32 key2 = + Bytes32.fromHexString("0x00112233445566778899aabbccddeeff00112233445566778899aabbccddee00"); + Bytes32 value2 = + Bytes32.fromHexString("0x0100000000000000000000000000000000000000000000000000000000000000"); - trie.put(key1, value1); - trie.put(key2, value2); + trie.put(key1, value1); + trie.put(key2, value2); - System.out.println(trie.toDotTree()); - } + System.out.println(trie.toDotTree()); + } - @Test - public void testToDotTrieOneValueRepeatingEdges() { - SimpleVerkleTrie trie = new SimpleVerkleTrie<>(); - Bytes32 key = Bytes32.fromHexString("0x00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff"); - Bytes32 value = Bytes32.fromHexString("0x1000000000000000000000000000000000000000000000000000000000000000"); - trie.put(key, value); + @Test + public void testToDotTrieOneValueRepeatingEdges() { + SimpleVerkleTrie trie = new SimpleVerkleTrie<>(); + Bytes32 key = + Bytes32.fromHexString("0x00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff"); + Bytes32 value = + Bytes32.fromHexString("0x1000000000000000000000000000000000000000000000000000000000000000"); + trie.put(key, value); - System.out.println(trie.toDotTree(true)); - } + System.out.println(trie.toDotTree(true)); + } - @Test - public void testToDotTrieTwoValuesRepeatingEdges() { - SimpleVerkleTrie trie = new SimpleVerkleTrie(); - Bytes32 key1 = Bytes32.fromHexString("0x00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff"); - Bytes32 value1 = Bytes32.fromHexString("0x1000000000000000000000000000000000000000000000000000000000000000"); - Bytes32 key2 = Bytes32.fromHexString("0x00112233445566778899aabbccddeeff00112233445566778899aabbccddee00"); - Bytes32 value2 = Bytes32.fromHexString("0x0100000000000000000000000000000000000000000000000000000000000000"); + @Test + public void testToDotTrieTwoValuesRepeatingEdges() { + SimpleVerkleTrie trie = new SimpleVerkleTrie(); + Bytes32 key1 = + Bytes32.fromHexString("0x00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff"); + Bytes32 value1 = + Bytes32.fromHexString("0x1000000000000000000000000000000000000000000000000000000000000000"); + Bytes32 key2 = + Bytes32.fromHexString("0x00112233445566778899aabbccddeeff00112233445566778899aabbccddee00"); + Bytes32 value2 = + Bytes32.fromHexString("0x0100000000000000000000000000000000000000000000000000000000000000"); - trie.put(key1, value1); - trie.put(key2, value2); + trie.put(key1, value1); + trie.put(key2, value2); - System.out.println(trie.toDotTree(true)); - } + System.out.println(trie.toDotTree(true)); + } - @Test - public void testEmptyTrie() { - SimpleVerkleTrie trie = new SimpleVerkleTrie(); - assertThat(trie.getRootHash()).as("Retrieve root hash").isEqualByComparingTo(Bytes32.ZERO); - } + @Test + public void testEmptyTrie() { + SimpleVerkleTrie trie = new SimpleVerkleTrie(); + assertThat(trie.getRootHash()).as("Retrieve root hash").isEqualByComparingTo(Bytes32.ZERO); + } - @Test - public void testOneValue() { - SimpleVerkleTrie trie = new SimpleVerkleTrie(); - Bytes32 key = Bytes32.fromHexString("0x00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff"); - Bytes32 value = Bytes32.fromHexString("0x1000000000000000000000000000000000000000000000000000000000000000"); - trie.put(key, value); - assertThat(trie.get(key)) - .as("Get one value should be the inserted value") - .isEqualTo(Optional.of(value)); - Bytes32 expectedRootHash = Bytes32 - .fromHexString("afceaacfd8f1d62ceff7d2bbfc733e42fdb40cef6f7c3c870a5bdd9203c30a16"); - assertThat(trie.getRootHash()).as("Retrieve root hash").isEqualByComparingTo(expectedRootHash); - } + @Test + public void testOneValue() { + SimpleVerkleTrie trie = new SimpleVerkleTrie(); + Bytes32 key = + Bytes32.fromHexString("0x00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff"); + Bytes32 value = + Bytes32.fromHexString("0x1000000000000000000000000000000000000000000000000000000000000000"); + trie.put(key, value); + assertThat(trie.get(key)) + .as("Get one value should be the inserted value") + .isEqualTo(Optional.of(value)); + Bytes32 expectedRootHash = + Bytes32.fromHexString("afceaacfd8f1d62ceff7d2bbfc733e42fdb40cef6f7c3c870a5bdd9203c30a16"); + assertThat(trie.getRootHash()).as("Retrieve root hash").isEqualByComparingTo(expectedRootHash); + } - @Test - public void testTwoValuesAtSameStem() throws Exception { - SimpleVerkleTrie trie = new SimpleVerkleTrie(); - Bytes32 key1 = Bytes32.fromHexString("0x00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff"); - Bytes32 value1 = Bytes32.fromHexString("0x1000000000000000000000000000000000000000000000000000000000000000"); - Bytes32 key2 = Bytes32.fromHexString("0x00112233445566778899aabbccddeeff00112233445566778899aabbccddee00"); - Bytes32 value2 = Bytes32.fromHexString("0x0100000000000000000000000000000000000000000000000000000000000000"); - Bytes32 key3 = Bytes32.fromHexString("0xde112233445566778899aabbccddeeff00112233445566778899aabbccddeeff"); - trie.put(key1, value1); - trie.put(key2, value2); - assertThat(trie.get(key1).get()).as("Get first value").isEqualByComparingTo(value1); - assertThat(trie.get(key2).get()).as("Get second value").isEqualByComparingTo(value2); - assertThat(trie.get(key3)).as("Get non-key returns empty").isEmpty(); + @Test + public void testTwoValuesAtSameStem() throws Exception { + SimpleVerkleTrie trie = new SimpleVerkleTrie(); + Bytes32 key1 = + Bytes32.fromHexString("0x00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff"); + Bytes32 value1 = + Bytes32.fromHexString("0x1000000000000000000000000000000000000000000000000000000000000000"); + Bytes32 key2 = + Bytes32.fromHexString("0x00112233445566778899aabbccddeeff00112233445566778899aabbccddee00"); + Bytes32 value2 = + Bytes32.fromHexString("0x0100000000000000000000000000000000000000000000000000000000000000"); + Bytes32 key3 = + Bytes32.fromHexString("0xde112233445566778899aabbccddeeff00112233445566778899aabbccddeeff"); + trie.put(key1, value1); + trie.put(key2, value2); + assertThat(trie.get(key1).get()).as("Get first value").isEqualByComparingTo(value1); + assertThat(trie.get(key2).get()).as("Get second value").isEqualByComparingTo(value2); + assertThat(trie.get(key3)).as("Get non-key returns empty").isEmpty(); - Bytes32 expectedRootHash = Bytes32 - .fromHexString("1defb89c793eb6cf89a90fe7e9bff4b96b5c9774ad21433adb959466a7669602"); - assertThat(trie.getRootHash()).as("Get root hash").isEqualByComparingTo(expectedRootHash); - } + Bytes32 expectedRootHash = + Bytes32.fromHexString("1defb89c793eb6cf89a90fe7e9bff4b96b5c9774ad21433adb959466a7669602"); + assertThat(trie.getRootHash()).as("Get root hash").isEqualByComparingTo(expectedRootHash); + } - @Test - public void testTwoValuesAtDifferentIndex() throws Exception { - SimpleVerkleTrie trie = new SimpleVerkleTrie(); - Bytes32 key1 = Bytes32.fromHexString("0x00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff"); - Bytes32 value1 = Bytes32.fromHexString("0x1000000000000000000000000000000000000000000000000000000000000000"); - Bytes32 key2 = Bytes32.fromHexString("0xff112233445566778899aabbccddeeff00112233445566778899aabbccddee00"); - Bytes32 value2 = Bytes32.fromHexString("0x0100000000000000000000000000000000000000000000000000000000000000"); - trie.put(key1, value1); - trie.put(key2, value2); - assertThat(trie.get(key1).get()).as("Get first value").isEqualByComparingTo(value1); - assertThat(trie.get(key2).get()).as("Get second value").isEqualByComparingTo(value2); - Bytes32 expectedRootHash = Bytes32 - .fromHexString("1758925a729ae085d4a2e32139f47c647f70495a6a38053bc0056996dd34b60e"); - assertThat(trie.getRootHash()).as("Retrieve root hash").isEqualByComparingTo(expectedRootHash); - } + @Test + public void testTwoValuesAtDifferentIndex() throws Exception { + SimpleVerkleTrie trie = new SimpleVerkleTrie(); + Bytes32 key1 = + Bytes32.fromHexString("0x00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff"); + Bytes32 value1 = + Bytes32.fromHexString("0x1000000000000000000000000000000000000000000000000000000000000000"); + Bytes32 key2 = + Bytes32.fromHexString("0xff112233445566778899aabbccddeeff00112233445566778899aabbccddee00"); + Bytes32 value2 = + Bytes32.fromHexString("0x0100000000000000000000000000000000000000000000000000000000000000"); + trie.put(key1, value1); + trie.put(key2, value2); + assertThat(trie.get(key1).get()).as("Get first value").isEqualByComparingTo(value1); + assertThat(trie.get(key2).get()).as("Get second value").isEqualByComparingTo(value2); + Bytes32 expectedRootHash = + Bytes32.fromHexString("1758925a729ae085d4a2e32139f47c647f70495a6a38053bc0056996dd34b60e"); + assertThat(trie.getRootHash()).as("Retrieve root hash").isEqualByComparingTo(expectedRootHash); + } - @Test - public void testTwoValuesWithDivergentStemsAtDepth2() throws Exception { - SimpleVerkleTrie trie = new SimpleVerkleTrie(); - Bytes32 key1 = Bytes32.fromHexString("0x00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff"); - Bytes32 value1 = Bytes32.fromHexString("0x1000000000000000000000000000000000000000000000000000000000000000"); - Bytes32 key2 = Bytes32.fromHexString("0x00ff112233445566778899aabbccddeeff00112233445566778899aabbccddee"); - Bytes32 value2 = Bytes32.fromHexString("0x0100000000000000000000000000000000000000000000000000000000000000"); - trie.put(key1, value1); - trie.put(key2, value2); - assertThat(trie.get(key1)).as("Retrieve first value").isEqualTo(Optional.of(value1)); - assertThat(trie.get(key2)).as("Retrieve second value").isEqualTo(Optional.of(value2)); - Bytes32 expectedRootHash = Bytes32 - .fromHexString("88028cbafb20137dba8b42d243cfcac81f6ac635cf984c7a89e54ef006bf750d"); - assertThat(trie.getRootHash()).as("Retrieve root hash").isEqualByComparingTo(expectedRootHash); - } + @Test + public void testTwoValuesWithDivergentStemsAtDepth2() throws Exception { + SimpleVerkleTrie trie = new SimpleVerkleTrie(); + Bytes32 key1 = + Bytes32.fromHexString("0x00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff"); + Bytes32 value1 = + Bytes32.fromHexString("0x1000000000000000000000000000000000000000000000000000000000000000"); + Bytes32 key2 = + Bytes32.fromHexString("0x00ff112233445566778899aabbccddeeff00112233445566778899aabbccddee"); + Bytes32 value2 = + Bytes32.fromHexString("0x0100000000000000000000000000000000000000000000000000000000000000"); + trie.put(key1, value1); + trie.put(key2, value2); + assertThat(trie.get(key1)).as("Retrieve first value").isEqualTo(Optional.of(value1)); + assertThat(trie.get(key2)).as("Retrieve second value").isEqualTo(Optional.of(value2)); + Bytes32 expectedRootHash = + Bytes32.fromHexString("88028cbafb20137dba8b42d243cfcac81f6ac635cf984c7a89e54ef006bf750d"); + assertThat(trie.getRootHash()).as("Retrieve root hash").isEqualByComparingTo(expectedRootHash); + } - @Test - public void testDeleteTwoValuesAtSameStem() throws Exception { - SimpleVerkleTrie trie = new SimpleVerkleTrie(); - Bytes32 key1 = Bytes32.fromHexString("0x00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff"); - Bytes32 value1 = Bytes32.fromHexString("0x1000000000000000000000000000000000000000000000000000000000000001"); - Bytes32 key2 = Bytes32.fromHexString("0x00112233445566778899aabbccddeeff00112233445566778899aabbccddee00"); - Bytes32 value2 = Bytes32.fromHexString("0x0100000000000000000000000000000000000000000000000000000000000002"); - trie.put(key1, value1); - trie.put(key2, value2); - trie.remove(key1); - assertThat(trie.get(key1)).as("Make sure value is deleted").isEqualTo(Optional.empty()); - trie.remove(key2); - assertThat(trie.get(key2)).as("Make sure value is deleted").isEqualTo(Optional.empty()); - } + @Test + public void testDeleteTwoValuesAtSameStem() throws Exception { + SimpleVerkleTrie trie = new SimpleVerkleTrie(); + Bytes32 key1 = + Bytes32.fromHexString("0x00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff"); + Bytes32 value1 = + Bytes32.fromHexString("0x1000000000000000000000000000000000000000000000000000000000000001"); + Bytes32 key2 = + Bytes32.fromHexString("0x00112233445566778899aabbccddeeff00112233445566778899aabbccddee00"); + Bytes32 value2 = + Bytes32.fromHexString("0x0100000000000000000000000000000000000000000000000000000000000002"); + trie.put(key1, value1); + trie.put(key2, value2); + trie.remove(key1); + assertThat(trie.get(key1)).as("Make sure value is deleted").isEqualTo(Optional.empty()); + trie.remove(key2); + assertThat(trie.get(key2)).as("Make sure value is deleted").isEqualTo(Optional.empty()); + } - @Test - public void testDeleteTwoValuesAtDifferentIndex() throws Exception { - SimpleVerkleTrie trie = new SimpleVerkleTrie(); - Bytes32 key1 = Bytes32.fromHexString("0x00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff"); - Bytes32 value1 = Bytes32.fromHexString("0x1000000000000000000000000000000000000000000000000000000000000000"); - Bytes32 key2 = Bytes32.fromHexString("0xff112233445566778899aabbccddeeff00112233445566778899aabbccddee00"); - Bytes32 value2 = Bytes32.fromHexString("0x0100000000000000000000000000000000000000000000000000000000000000"); - trie.put(key1, value1); - trie.put(key2, value2); - trie.remove(key1); - assertThat(trie.get(key1)).as("Make sure value is deleted").isEqualTo(Optional.empty()); - trie.remove(key2); - assertThat(trie.get(key2)).as("Make sure value is deleted").isEqualTo(Optional.empty()); - } + @Test + public void testDeleteTwoValuesAtDifferentIndex() throws Exception { + SimpleVerkleTrie trie = new SimpleVerkleTrie(); + Bytes32 key1 = + Bytes32.fromHexString("0x00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff"); + Bytes32 value1 = + Bytes32.fromHexString("0x1000000000000000000000000000000000000000000000000000000000000000"); + Bytes32 key2 = + Bytes32.fromHexString("0xff112233445566778899aabbccddeeff00112233445566778899aabbccddee00"); + Bytes32 value2 = + Bytes32.fromHexString("0x0100000000000000000000000000000000000000000000000000000000000000"); + trie.put(key1, value1); + trie.put(key2, value2); + trie.remove(key1); + assertThat(trie.get(key1)).as("Make sure value is deleted").isEqualTo(Optional.empty()); + trie.remove(key2); + assertThat(trie.get(key2)).as("Make sure value is deleted").isEqualTo(Optional.empty()); + } - @Test - public void testDeleteTwoValuesWithDivergentStemsAtDepth2() throws Exception { - SimpleVerkleTrie trie = new SimpleVerkleTrie(); - Bytes32 key1 = Bytes32.fromHexString("0x00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff"); - Bytes32 value1 = Bytes32.fromHexString("0x1000000000000000000000000000000000000000000000000000000000000000"); - Bytes32 key2 = Bytes32.fromHexString("0x00ff112233445566778899aabbccddeeff00112233445566778899aabbccddee"); - Bytes32 value2 = Bytes32.fromHexString("0x0100000000000000000000000000000000000000000000000000000000000000"); - trie.put(key1, value1); - trie.put(key2, value2); - trie.remove(key1); - assertThat(trie.get(key1)).as("Make sure value is deleted").isEqualTo(Optional.empty()); - trie.remove(key2); - assertThat(trie.get(key2)).as("Make sure value is deleted").isEqualTo(Optional.empty()); - } + @Test + public void testDeleteTwoValuesWithDivergentStemsAtDepth2() throws Exception { + SimpleVerkleTrie trie = new SimpleVerkleTrie(); + Bytes32 key1 = + Bytes32.fromHexString("0x00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff"); + Bytes32 value1 = + Bytes32.fromHexString("0x1000000000000000000000000000000000000000000000000000000000000000"); + Bytes32 key2 = + Bytes32.fromHexString("0x00ff112233445566778899aabbccddeeff00112233445566778899aabbccddee"); + Bytes32 value2 = + Bytes32.fromHexString("0x0100000000000000000000000000000000000000000000000000000000000000"); + trie.put(key1, value1); + trie.put(key2, value2); + trie.remove(key1); + assertThat(trie.get(key1)).as("Make sure value is deleted").isEqualTo(Optional.empty()); + trie.remove(key2); + assertThat(trie.get(key2)).as("Make sure value is deleted").isEqualTo(Optional.empty()); + } - @Test - public void testDeleteThreeValues() throws Exception { - SimpleVerkleTrie trie = new SimpleVerkleTrie(); - Bytes32 key1 = Bytes32.fromHexString("0x00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff"); - Bytes32 value1 = Bytes32.fromHexString("0x1000000000000000000000000000000000000000000000000000000000000000"); - Bytes32 key2 = Bytes32.fromHexString("0x00ff112233445566778899aabbccddeeff00112233445566778899aabbccddee"); - Bytes32 value2 = Bytes32.fromHexString("0x0200000000000000000000000000000000000000000000000000000000000000"); - Bytes32 key3 = Bytes32.fromHexString("0x00ff112233445566778899aabbccddeeff00112233445566778899aabbccddff"); - Bytes32 value3 = Bytes32.fromHexString("0x0300000000000000000000000000000000000000000000000000000000000000"); - trie.put(key1, value1); - trie.put(key2, value2); - trie.put(key3, value3); - trie.remove(key3); - assertThat(trie.get(key3)).as("Make sure value is deleted").isEqualTo(Optional.empty()); - assertThat(trie.get(key2)).as("Retrieve second value").isEqualTo(Optional.of(value2)); - trie.remove(key2); - assertThat(trie.get(key2)).as("Make sure value is deleted").isEqualTo(Optional.empty()); - assertThat(trie.get(key1)).as("Retrieve first value").isEqualTo(Optional.of(value1)); - trie.remove(key1); - assertThat(trie.get(key1)).as("Make sure value is deleted").isEqualTo(Optional.empty()); - } + @Test + public void testDeleteThreeValues() throws Exception { + SimpleVerkleTrie trie = new SimpleVerkleTrie(); + Bytes32 key1 = + Bytes32.fromHexString("0x00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff"); + Bytes32 value1 = + Bytes32.fromHexString("0x1000000000000000000000000000000000000000000000000000000000000000"); + Bytes32 key2 = + Bytes32.fromHexString("0x00ff112233445566778899aabbccddeeff00112233445566778899aabbccddee"); + Bytes32 value2 = + Bytes32.fromHexString("0x0200000000000000000000000000000000000000000000000000000000000000"); + Bytes32 key3 = + Bytes32.fromHexString("0x00ff112233445566778899aabbccddeeff00112233445566778899aabbccddff"); + Bytes32 value3 = + Bytes32.fromHexString("0x0300000000000000000000000000000000000000000000000000000000000000"); + trie.put(key1, value1); + trie.put(key2, value2); + trie.put(key3, value3); + trie.remove(key3); + assertThat(trie.get(key3)).as("Make sure value is deleted").isEqualTo(Optional.empty()); + assertThat(trie.get(key2)).as("Retrieve second value").isEqualTo(Optional.of(value2)); + trie.remove(key2); + assertThat(trie.get(key2)).as("Make sure value is deleted").isEqualTo(Optional.empty()); + assertThat(trie.get(key1)).as("Retrieve first value").isEqualTo(Optional.of(value1)); + trie.remove(key1); + assertThat(trie.get(key1)).as("Make sure value is deleted").isEqualTo(Optional.empty()); + } - @Test - public void testDeleteThreeValuesWithFlattening() throws Exception { - SimpleVerkleTrie trie = new SimpleVerkleTrie(); - Bytes32 key1 = Bytes32.fromHexString("0x00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff"); - Bytes32 value1 = Bytes32.fromHexString("0x1000000000000000000000000000000000000000000000000000000000000000"); - Bytes32 key2 = Bytes32.fromHexString("0x00ff112233445566778899aabbccddeeff00112233445566778899aabbccddee"); - Bytes32 value2 = Bytes32.fromHexString("0x0200000000000000000000000000000000000000000000000000000000000000"); - Bytes32 key3 = Bytes32.fromHexString("0x00ff112233445566778899aabbccddeeff00112233445566778899aabbccddff"); - Bytes32 value3 = Bytes32.fromHexString("0x0300000000000000000000000000000000000000000000000000000000000000"); - trie.put(key1, value1); - trie.put(key2, value2); - trie.put(key3, value3); - trie.remove(key1); - assertThat(trie.get(key1)).as("First value has been deleted").isEqualTo(Optional.empty()); - assertThat(trie.get(key2)).as("Second value").isEqualTo(Optional.of(value2)); - trie.remove(key2); - assertThat(trie.get(key2)).as("Second value has been deleted").isEqualTo(Optional.empty()); - assertThat(trie.get(key3)).as("Third value").isEqualTo(Optional.of(value3)); - trie.remove(key3); - assertThat(trie.get(key3)).as("Third value has been deleted").isEqualTo(Optional.empty()); - } + @Test + public void testDeleteThreeValuesWithFlattening() throws Exception { + SimpleVerkleTrie trie = new SimpleVerkleTrie(); + Bytes32 key1 = + Bytes32.fromHexString("0x00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff"); + Bytes32 value1 = + Bytes32.fromHexString("0x1000000000000000000000000000000000000000000000000000000000000000"); + Bytes32 key2 = + Bytes32.fromHexString("0x00ff112233445566778899aabbccddeeff00112233445566778899aabbccddee"); + Bytes32 value2 = + Bytes32.fromHexString("0x0200000000000000000000000000000000000000000000000000000000000000"); + Bytes32 key3 = + Bytes32.fromHexString("0x00ff112233445566778899aabbccddeeff00112233445566778899aabbccddff"); + Bytes32 value3 = + Bytes32.fromHexString("0x0300000000000000000000000000000000000000000000000000000000000000"); + trie.put(key1, value1); + trie.put(key2, value2); + trie.put(key3, value3); + trie.remove(key1); + assertThat(trie.get(key1)).as("First value has been deleted").isEqualTo(Optional.empty()); + assertThat(trie.get(key2)).as("Second value").isEqualTo(Optional.of(value2)); + trie.remove(key2); + assertThat(trie.get(key2)).as("Second value has been deleted").isEqualTo(Optional.empty()); + assertThat(trie.get(key3)).as("Third value").isEqualTo(Optional.of(value3)); + trie.remove(key3); + assertThat(trie.get(key3)).as("Third value has been deleted").isEqualTo(Optional.empty()); + } - @Test - public void testDeleteManyValuesWithDivergentStemsAtDepth2() throws Exception { - SimpleVerkleTrie trie = new SimpleVerkleTrie<>(); - assertThat(trie.getRootHash()).isEqualTo(Bytes32.ZERO); - Bytes32 key0 = Bytes32.fromHexString("0x1e4abaeaa58259f4784e086ddbaa74a9d3975efb2e4380595f0eed5692c45641"); - Bytes32 value0 = Bytes32.fromHexString("0x0000000000000000000000000000000000000000000000000000000000000001"); - Bytes32 key1 = Bytes32.fromHexString("0x1e4abaeaa58259f4784e086ddbaa74a9d3975efb2e4380595f0eed5692c45601"); - Bytes32 value1 = Bytes32.fromHexString("0x0000000000000000000000000000000000000000000000000000000000000001"); - Bytes32 key2 = Bytes32.fromHexString("0x1e4abaeaa58259f4784e086ddbaa74a9d3975efb2e4380595f0eed5692c45602"); - Bytes32 value2 = Bytes32.fromHexString("0x01"); - Bytes32 key3 = Bytes32.fromHexString("0x1e4abaeaa58259f4784e086ddbaa74a9d3975efb2e4380595f0eed5692c45600"); - Bytes32 value3 = Bytes32.fromHexString("0x00"); - Bytes32 key4 = Bytes32.fromHexString("0x1e4abaeaa58259f4784e086ddbaa74a9d3975efb2e4380595f0eed5692c45603"); - Bytes32 value4 = Bytes32.fromHexString("0xf84a97f1f0a956e738abd85c2e0a5026f8874e3ec09c8f012159dfeeaab2b156"); - Bytes32 key5 = Bytes32.fromHexString("0x1e4abaeaa58259f4784e086ddbaa74a9d3975efb2e4380595f0eed5692c45604"); - Bytes32 value5 = Bytes32.fromHexString("0x03"); - Bytes32 key6 = Bytes32.fromHexString("0x1e4abaeaa58259f4784e086ddbaa74a9d3975efb2e4380595f0eed5692c45680"); - Bytes32 value6 = Bytes32.fromHexString("0x0000010200000000000000000000000000000000000000000000000000000000"); - trie.put(key0, value0); - trie.put(key1, value1); - trie.put(key2, value2); - trie.put(key3, value3); - trie.put(key4, value4); - trie.put(key5, value5); - trie.put(key6, value6); - trie.remove(key0); - trie.remove(key4); - trie.remove(key5); - trie.remove(key6); - trie.remove(key3); - trie.remove(key1); - trie.remove(key2); - assertThat(trie.getRootHash()).isEqualTo(Bytes32.ZERO); - } + @Test + public void testDeleteManyValuesWithDivergentStemsAtDepth2() throws Exception { + SimpleVerkleTrie trie = new SimpleVerkleTrie<>(); + assertThat(trie.getRootHash()).isEqualTo(Bytes32.ZERO); + Bytes32 key0 = + Bytes32.fromHexString("0x1e4abaeaa58259f4784e086ddbaa74a9d3975efb2e4380595f0eed5692c45641"); + Bytes32 value0 = + Bytes32.fromHexString("0x0000000000000000000000000000000000000000000000000000000000000001"); + Bytes32 key1 = + Bytes32.fromHexString("0x1e4abaeaa58259f4784e086ddbaa74a9d3975efb2e4380595f0eed5692c45601"); + Bytes32 value1 = + Bytes32.fromHexString("0x0000000000000000000000000000000000000000000000000000000000000001"); + Bytes32 key2 = + Bytes32.fromHexString("0x1e4abaeaa58259f4784e086ddbaa74a9d3975efb2e4380595f0eed5692c45602"); + Bytes32 value2 = Bytes32.fromHexString("0x01"); + Bytes32 key3 = + Bytes32.fromHexString("0x1e4abaeaa58259f4784e086ddbaa74a9d3975efb2e4380595f0eed5692c45600"); + Bytes32 value3 = Bytes32.fromHexString("0x00"); + Bytes32 key4 = + Bytes32.fromHexString("0x1e4abaeaa58259f4784e086ddbaa74a9d3975efb2e4380595f0eed5692c45603"); + Bytes32 value4 = + Bytes32.fromHexString("0xf84a97f1f0a956e738abd85c2e0a5026f8874e3ec09c8f012159dfeeaab2b156"); + Bytes32 key5 = + Bytes32.fromHexString("0x1e4abaeaa58259f4784e086ddbaa74a9d3975efb2e4380595f0eed5692c45604"); + Bytes32 value5 = Bytes32.fromHexString("0x03"); + Bytes32 key6 = + Bytes32.fromHexString("0x1e4abaeaa58259f4784e086ddbaa74a9d3975efb2e4380595f0eed5692c45680"); + Bytes32 value6 = + Bytes32.fromHexString("0x0000010200000000000000000000000000000000000000000000000000000000"); + trie.put(key0, value0); + trie.put(key1, value1); + trie.put(key2, value2); + trie.put(key3, value3); + trie.put(key4, value4); + trie.put(key5, value5); + trie.put(key6, value6); + trie.remove(key0); + trie.remove(key4); + trie.remove(key5); + trie.remove(key6); + trie.remove(key3); + trie.remove(key1); + trie.remove(key2); + assertThat(trie.getRootHash()).isEqualTo(Bytes32.ZERO); + } }