public NodeId (byte[] bytes) {
        Objects.requireNonNull(bytes);

        if (bytes.length != 20) {
            throw new IllegalArgumentException("invalid length");
        }

        this.bytes = Arrays.copyOf(bytes, bytes.length);
        this.hash = Arrays.hashCode(bytes);

        // Hex String
        StringBuilder sb = new StringBuilder("NodeID(");
        for (byte b : bytes) {
            int ub = (b) & 0xFF;

            if (ub < 16) {
                sb.append('0');
            }
            sb.append(Integer.toHexString(ub).toUpperCase());
        }
        this.string = sb.append(")").toString();
    }