We have down the route of not allowing inconsistent changes in apply_changeset in chain graph. I think this is the right way. For better or worse applications may generate their own changesets. We shouldn't allow inserting a tx at a position higher than the latest checkpoint even in apply changeset.
Note we should not check here whether a tx has moved without having changed the block hash it was previously in. That would be overkill and make the whole system less flexible. We just want to make sure that you aren't able to violate the invariants we want to enforce through the changeset APIs.
We have down the route of not allowing inconsistent changes in
apply_changeset
in chain graph. I think this is the right way. For better or worse applications may generate their own changesets. We shouldn't allow inserting a tx at a position higher than the latest checkpoint even in apply changeset.Note we should not check here whether a tx has moved without having changed the block hash it was previously in. That would be overkill and make the whole system less flexible. We just want to make sure that you aren't able to violate the invariants we want to enforce through the changeset APIs.