We create a immutable data unit Block which contains an immutable list of blockchain
related blocks (TxBlock) and an immutable list of non-blockchain related events.
Service classes which produces StateChangeEvents like ProposalService registers as
stateChangeEventListProvider and returns a list of StateChangeEvents when a new TxBlock
arrives. The stateService collect all those returned lists and put it to the newly created
immutable Block.
- Rename BsqBlock to TxBlock
- Create Block class containing txBlock as delegate and stateChangeEvents
- Add registerStateChangeEventListProvider method for clients processing a new TxBlock and producing stateChangeEvents
- Rename StateService listeners to blockListeners
- Pass Block instead of TxBlock at blockListeners.onBlockAdded
- Rename StateService.Listener to StateService.BlockListener
- Rename ParamChangeEvent to ChangeParamEvent
- Make ChangeParamEvent extending StateChangeEvent
- Make ChangeParam implementing ProtectedStoragePayload
Setting this value to `false` was a minor optimization to improve build
speed, as we don't need both tar and zip dists to be built (and zip
actually takes a few seconds).
PR #1500 set it to `true`, because it ended up causing build failures
down the road. This commit removes the statement altogether, as `true`
is the default value anyway.
- Remove immutable fields from Tx, TxInput adn TxOutput
- Add maps to ChainState for mutable fields
- Integrate BaseService in BlindVoteService
- Remove ValidationCandidate and BaseService
- Remove reset prameter at clone methods
- Move validation out of valueObject into Validator classes to keep valueObjects small
- Move BsqBlockchain data to ChainState
- Add ChainStateService for accessing ChainState data
- Replace ReadableBsqBlockChain and WritableBsqBlockChain with ChainStateService
- Add MyProposalService and ProposalListService to split up responsibility and threading boundaries
- Make ProposalService running in parser thread. Refactor resonsibilities.
- Add thread context aware listeners
- Use injectable NodeExecutor to make parsre thread accessible for thread context aware listeners
- Add stream() method and Iterable<T> interface to PersistableList
- Add ProposalFactory to create proposals from its payload
- Add ProposalPayload and BlindVoteList to Tx
- Add getLastOutput method to Tx
- Add VoteResultService for all proposals
- Use stake instead of nr. of votes for majority data view calculation
- Use IssuanceService fro compensation requests
- Add more checks at issuance
- Use secondary sort by hex of hash for getMajorityHash
- Add issued amount to dashboard view