forked from hyperledger/besu
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from ChainSafe/ed/rebase
Rebase updating from upstream hyperledger
- Loading branch information
Showing
134 changed files
with
3,010 additions
and
935 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Hyperledger Security Policy | ||
|
||
## Reporting a Security Bug | ||
|
||
If you think you have discovered a security issue in any of the Hyperledger | ||
projects, we'd love to hear from you. We will take all security bugs | ||
seriously and if confirmed upon investigation we will patch it within a | ||
reasonable amount of time and release a public security bulletin discussing | ||
the impact and credit the discoverer. | ||
|
||
There are two ways to report a security bug. The easiest is to email a | ||
description of the flaw and any related information (e.g. reproduction | ||
steps, version) to | ||
[security at hyperledger dot org](mailto:[email protected]). | ||
|
||
The other way is to file a confidential security bug in our | ||
[JIRA bug tracking system](https://jira.hyperledger.org). | ||
Be sure to set the “Security Level” to “Security issue”. | ||
|
||
The process by which the Hyperledger Security Team handles security bugs | ||
is documented further in our | ||
[Defect Response](https://wiki.hyperledger.org/display/HYP/Defect+Response) | ||
page on our [wiki](https://wiki.hyperledger.org). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 40 additions & 0 deletions
40
...r/besu/tests/acceptance/dsl/privacy/transaction/PrivDistributeTransactionTransaction.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
/* | ||
* Copyright ConsenSys AG. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with | ||
* the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on | ||
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the | ||
* specific language governing permissions and limitations under the License. | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
package org.hyperledger.besu.tests.acceptance.dsl.privacy.transaction; | ||
|
||
import org.hyperledger.besu.tests.acceptance.dsl.transaction.NodeRequests; | ||
import org.hyperledger.besu.tests.acceptance.dsl.transaction.Transaction; | ||
|
||
import java.io.IOException; | ||
|
||
public class PrivDistributeTransactionTransaction implements Transaction<String> { | ||
private String signedPrivateTransaction; | ||
|
||
public PrivDistributeTransactionTransaction(final String signedPrivateTransaction) { | ||
this.signedPrivateTransaction = signedPrivateTransaction; | ||
} | ||
|
||
@Override | ||
public String execute(final NodeRequests node) { | ||
try { | ||
return node.privacy() | ||
.privDistributeTransaction(signedPrivateTransaction) | ||
.send() | ||
.getTransactionKey(); | ||
} catch (IOException e) { | ||
throw new RuntimeException(e); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
60 changes: 60 additions & 0 deletions
60
...ptance-tests/tests/src/test/java/org/hyperledger/besu/tests/web3j/CrossContractReader.sol
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
/* | ||
* Copyright 2019 ConsenSys AG. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with | ||
* the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on | ||
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the | ||
* specific language governing permissions and limitations under the License. | ||
*/ | ||
pragma solidity >=0.4.0 <0.6.0; | ||
|
||
import "./EventEmitter.sol"; | ||
|
||
// compile with: | ||
// solc CrossContractReader.sol --bin --abi --optimize --overwrite -o . | ||
// then create web3j wrappers with: | ||
// web3j solidity generate -b ./generated/CrossContractReader.bin -a ./generated/CrossContractReader.abi -o ../../../../../ -p org.hyperledger.besu.tests.web3j.generated | ||
contract CrossContractReader { | ||
uint counter; | ||
|
||
event NewEventEmitter( | ||
address contractAddress | ||
); | ||
|
||
function read(address emitter_address) view public returns (uint) { | ||
EventEmitter em = EventEmitter(emitter_address); | ||
return em.value(); | ||
} | ||
|
||
function deploy() public { | ||
EventEmitter em = new EventEmitter(); | ||
emit NewEventEmitter(address(em)); | ||
} | ||
|
||
function deployRemote(address crossAddress) public { | ||
CrossContractReader cross = CrossContractReader(crossAddress); | ||
cross.deploy(); | ||
} | ||
|
||
function increment() public { | ||
counter++; | ||
} | ||
|
||
function incrementRemote(address crossAddress) public { | ||
CrossContractReader cross = CrossContractReader(crossAddress); | ||
cross.increment(); | ||
} | ||
|
||
function destroy() public { | ||
selfdestruct(msg.sender); | ||
} | ||
|
||
function remoteDestroy(address crossAddress) public { | ||
CrossContractReader cross = CrossContractReader(crossAddress); | ||
cross.destroy(); | ||
} | ||
} |
1 change: 1 addition & 0 deletions
1
...ts/tests/src/test/java/org/hyperledger/besu/tests/web3j/generated/CrossContractReader.abi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
[{"constant":false,"inputs":[{"name":"crossAddress","type":"address"}],"name":"remoteDestroy","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"crossAddress","type":"address"}],"name":"deployRemote","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"deploy","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"destroy","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"emitter_address","type":"address"}],"name":"read","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"increment","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"crossAddress","type":"address"}],"name":"incrementRemote","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"anonymous":false,"inputs":[{"indexed":false,"name":"contractAddress","type":"address"}],"name":"NewEventEmitter","type":"event"}] |
Oops, something went wrong.