iotaledger / iri

IOTA Reference Implementation
Other
1.15k stars 370 forks source link

Make Transaction Mutable Fields Atomic #1777

Closed DyrellC closed 4 years ago

DyrellC commented 4 years ago

Description

OUTDATED: In the current cache implementation, the assumption of a read-only environment for ApproveeViewModel's has led to the removal of db storage for Approvee objects. As a result, it is possible for both walking and transaction solidity propagation to be halted/hindered for transactions in the event that a given transaction's ApproveeViewModel has been swept from weak store by the Garbage Collector.

CURRENT: Transactions being passed through the cache should ensure the thread safety of the corresponding mutable fields to ensure that the logic does not ignore a parsed or solid transaction due to a race condition. Also, within the TVM store, we should be checking if the object exists before performing any caching and store logic. This is handled with the inclusion of #1774 .

OUTDATED: Fixes Dev-Ops issue #99

Type of change

How Has This Been Tested?

Checklist:

acha-bill commented 4 years ago

Added Gals #1774 into the mix

GalRogozinski commented 4 years ago

I only looked now I actually don't understand this

Approvees are:

  1. immutable
  2. stored when we save a transaction (so we don't need to have approvee store do anything....)