* Used Tessera as a fall back when Constellation is not available in the host
* Used OSX 10.12 instead of 10.13 to avoid Kernel Extension Consent which is not available in CI environment. Can revert back once Travis CI has ability to disable the consent
* Merged upstream PR/Code to fix tests which have intermittent failures
* Cleaned up .travis.yml build matrix
Previously we had populated the public receipt `failed` field with the
result of the transaction. This is correct for public transactions. It's
also correct for successful private transactions. But it's not correct
for failing private transactions, because their public receipt should
not indicate failure. The fix is straightforward.
Testing:
I used this contract:
contract RevertTest{
uint public newValue;
function revertFunction() public{
uint a = 1;
require(a == 0);
}
}
After deploying the contract I sent in several failing transactions via
function sendBad() {
eth.sendTransaction({
from: eth.accounts[0],
data: web3.sha3("revertFunction()"),
gas: 0x47b760,
privateFor: ["ROAZBWtSacxXQrOe3FGAqJDyJjFePR5ce4TSIzmJ0Bc="]
});
}
Watching the logs (`1.log` and `2.log`), I saw the `TX-ACCEPTED` events
scroll as I sent `revertFunction` transactions. I see 10 `TX-ACCEPTED`
events in both logs (1 for deploy and 9 tests via `sendBad`).
Via extra logging, in `1.log` I see that the public receipts have status
`1`, whereas private receipts have status `0`. In `2.log` they all have
status `1`.
All nodes stayed up the whole time.
Fixes#434
Always use the EIP155 signer for verifying new transactions being added
to the transaction pool and only skip protected public transactions from replay attacks until
we reach EIP155 activation.
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.