Is idempotency mandatory for /block and /block/transaction endpoint?

Cause I don’t see there is a consistency check in the rosetta-cli for the idempotency of blocks. Is this really mandatory?

If the endpoint returns different content in the field of “metadata” and keeps the other part the same, will this be considered to violate the idempotency?

My situation is the block or transaction content could change after the transaction is “received” by the other address. Is there a way in Rosetta to handle this case?

Thanks in advance!


I wanted to add a little more context to the question.

We are implementing the Rosetta API for a DAG type blockchain somewhat similar to nano where a transfer from Alice to Bob is composed of a send transaction signed by Alice and a receive transaction signed by Bob.

The send transaction has a field for the matching receive transaction hash that is initially empty, that gets updated when the matching receive transaction is processed at a certain point in the future.

In our Rosetta implementation we are currently including this field both as metadata and as a forward related transaction, if it is available at the time of query.

The question would be, does this break the idempotency expectation for the block / transaction representation in Rosetta as the metadata and the related transactions for a given send transaction will change at the time when the receive transaction is processed?

If it does, how should we handle this case? Should we just not include this in metadata and / or as a related transaction?

As a note, the rosetta-cli does not seem to complain when running check:data and reports all tests as passed.