Prior to this fix, a series of submitted transactions in the javascript
console would each show a different "from" field when inspected with
`eth.getTransaction`.
It turns out the transactions were all created with the correct sender,
but were just printed incorrectly. We were using the EIP155Signer when
all Quorum transactions expect the HomesteadSigner.
This fix is not exactly satisfying, since in every other place we've
been able to use an `isQuorum` boolean to tell whether a `v` of `37` or
`38` denotes a quorum private tx, but it's particularly hard to do that
in these two places.
There are a lot of places where we wrongly use the current state db
rather than getting dual state. This should have a larger audit, but
it's a good start, and passes all tests.
Remove unused TestBlockVotingBlockMaker function
Readability improvments to comments for core/quorum/ and raft/
Readability improvments to raft/speculative_chain.go
Readability improvments to docs/
This is necessary to avoid race conditions for low-latency consensus mechanisms
(like Raft) -- `ChainHeadEvent`s should always be posted in order, and the
existing code could violate this due to asynchronously sending-off events.
Now we sychronously send events in-order, but do so through a buffered
intermediary channel (`chainEvents`) so that publishing them is still
asynchronous.
Due to the asynchronous eventing system its possible that transactions
are applied on the pending state multiple times. Once with the TxPreEvent
event and once as a result of the ChainHeadEvent that will fetch all
processable transaction from the transaction pool. This leads to an
invalid nonce message.
This PR will keep track of transactions applied to the pending state
and will verify that an transaction was not applied before.
Whenever a private transaction was initiated and executed the address
would be created on the public state when initialising the initial Call.
To prevent this we use the msg's address rather than using the to method
on the state transition object.
Improved private transaction tests by checking existance of private and
public addresses on the incorrect state.
Fixed an issue where public state and private state were mixed during
the initial phase of the state transition. This causes severe issues
when creating new contracts (and addresses) and messes up the public
nonce, which, indirectly, has an effect on the contracts that are
created on the public state for both public and private txs.