def decode_ack_eip8(ciphertext)
      size = ciphertext[0,2].unpack('S>').first + 2
      raise RLPxSessionError, 'invalid ciphertext length' unless ciphertext.size == size

      message = begin
                  @ecc.ecies_decrypt(ciphertext[2...size], ciphertext[0,2])
                rescue
                  raise AuthenticationError, $!
                end
      values = RLP.decode message, sedes: eip8_ack_sedes, strict: false
      raise RLPxSessionError, 'invalid values length' unless values.size >= 3

      [size] + values[0,3]
    end
def decode_ack_eip8(ciphertext)
      size = ciphertext[0,2].unpack('S>').first + 2
      raise RLPxSessionError, 'invalid ciphertext length' unless ciphertext.size == size

      message = begin
                  @ecc.ecies_decrypt(ciphertext[2...size], ciphertext[0,2])
                rescue
                  raise AuthenticationError, $!
                end
      values = RLP.decode message, sedes: eip8_ack_sedes, strict: false
      raise RLPxSessionError, 'invalid values length' unless values.size >= 3

      [size] + values[0,3]
    end
decode EIP-8 ack message format