Skip to content
This repository has been archived by the owner on Apr 5, 2024. It is now read-only.

Upgrade signers to 1.0.19 #386

Merged
merged 6 commits into from
Sep 27, 2021
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
# Changelog

## ...Next Version...
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@usmansaleem Any suggestions for the next version number?

### Breaking Changes
- Upgrade to signers 1.0.19 removes support for deprecated SECP256K1 curve in Azure remote signing [#386](https://github.com/ConsenSys/ethsigner/pull/386)

### Features Added

- Add publishing to docker namespace "consensys/ethsigner"
- Deprecating docker namespace "consensys/quorum-ethsigner"
- Add validation for GoQuorum transactions with value [#377](https://github.com/ConsenSys/ethsigner/pull/377)
- Upgrade web3j to latest version for fix to handle large chainids in eip155 transactions [#382](https://github.com/ConsenSys/ethsigner/pull/382)
- Add publishing to docker namespace "consensys/ethsigner" and deprecate docker namespace "consensys/quorum-ethsigner" [#384](https://github.com/ConsenSys/ethsigner/issues/384)
- Upgrade to signers 1.0.19 allows empty password files to be read when creating a Signer [#372](https://github.com/ConsenSys/ethsigner/issues/372)

## 21.3.2

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,9 @@ public Collection<String> get() {
params.add("--key-vault-name");
params.add(azureKeyVault);
params.add("--key-name");
params.add("TestKey");
params.add("TestKey2");
params.add("--key-version");
params.add("7c01fe58d68148bba5824ce418241092");
params.add("");
params.add("--client-id");
params.add(System.getenv("ETHSIGNER_AZURE_CLIENT_ID"));
params.add("--client-secret-path");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public class AzureBasedTomlLoadingAcceptanceTest extends MultiKeyAcceptanceTestB
static final String clientId = System.getenv("ETHSIGNER_AZURE_CLIENT_ID");
static final String clientSecret = System.getenv("ETHSIGNER_AZURE_CLIENT_SECRET");
static final String tenantId = System.getenv("ETHSIGNER_AZURE_TENANT_ID");
static final String FILENAME = "fe3b557e8fb62b89f4916b721be55ceb828dbd73";
static final String FILENAME = "8c250253147a091cfcb7e9425022bcd03a329ce6";
static final String AZURE_ETHEREUM_ADDRESS = "0x" + FILENAME;

@BeforeAll
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ public void createAzureTomlFileAt(
new TomlStringBuilder("signing")
.withQuotedString("type", "azure-signer")
.withQuotedString("key-vault-name", "ethsignertestkey")
.withQuotedString("key-name", "TestKey")
.withQuotedString("key-version", "7c01fe58d68148bba5824ce418241092")
.withQuotedString("key-name", "TestKey2")
.withQuotedString("key-version", "")
.withQuotedString("client-id", clientId)
.withQuotedString("client-secret", clientSecret)
.withQuotedString("tenant-id", tenantId)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ public class MultiKeyAzureTransactionSignerAcceptanceTest
static final String clientId = System.getenv("ETHSIGNER_AZURE_CLIENT_ID");
static final String clientSecret = System.getenv("ETHSIGNER_AZURE_CLIENT_SECRET");
static final String tenantId = System.getenv("ETHSIGNER_AZURE_TENANT_ID");
static final String FILENAME = "fe3b557e8fb62b89f4916b721be55ceb828dbd73";
static final String FILENAME = "8c250253147a091cfcb7e9425022bcd03a329ce6";
private static final String AZURE_GENESIS_ACCOUNT_ONE_PUBLIC_KEY =
"0x8c250253147a091cfcb7e9425022bcd03a329ce6";

@BeforeAll
public static void checkAzureCredentials() {
Expand All @@ -44,6 +46,6 @@ public void azureLoadedFromMultiKeyCanSignValueTransferTransaction(@TempDir Path

setup(tomlDirectory);

performTransaction();
performTransaction(AZURE_GENESIS_ACCOUNT_ONE_PUBLIC_KEY);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -62,17 +62,16 @@ protected static void setup(final Path tomlDirectory) {
}

void performTransaction() {
performTransaction(richBenefactor().address());
}

void performTransaction(String ethAddress) {
final BigInteger transferAmountWei = Convert.toWei("1.75", Unit.ETHER).toBigIntegerExact();

final BigInteger startBalance = ethNode.accounts().balance(RECIPIENT);
final Transaction transaction =
Transaction.createEtherTransaction(
richBenefactor().address(),
null,
GAS_PRICE,
INTRINSIC_GAS,
RECIPIENT,
transferAmountWei);
ethAddress, null, GAS_PRICE, INTRINSIC_GAS, RECIPIENT, transferAmountWei);

final String hash = ethSigner.transactions().submit(transaction);
ethNode.transactions().awaitBlockContaining(hash);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
import static tech.pegasys.ethsigner.tests.dsl.Gas.GAS_PRICE;
import static tech.pegasys.ethsigner.tests.dsl.Gas.INTRINSIC_GAS;

import tech.pegasys.ethsigner.tests.dsl.Account;
import tech.pegasys.ethsigner.tests.dsl.node.Node;
import tech.pegasys.ethsigner.tests.dsl.node.besu.BesuNodeConfig;
import tech.pegasys.ethsigner.tests.dsl.node.besu.BesuNodeConfigBuilder;
Expand All @@ -37,6 +36,8 @@
public class ValueTransferWithAzureAcceptanceTest {

private static final String RECIPIENT = "0x1b00ba00ca00bb00aa00bc00be00ac00ca00da00";
private static final String AZURE_GENESIS_ACCOUNT_ONE_PUBLIC_KEY =
"0x8c250253147a091cfcb7e9425022bcd03a329ce6";

private static Node ethNode;
private static Signer ethSigner;
Expand Down Expand Up @@ -80,10 +81,6 @@ static synchronized void tearDownBase() {
}
}

private Account richBenefactor() {
return ethSigner.accounts().richBenefactor();
}

private Signer ethSigner() {
return ethSigner;
}
Expand All @@ -99,7 +96,7 @@ public void valueTransfer() {
final BigInteger startBalance = ethNode().accounts().balance(RECIPIENT);
final Transaction transaction =
Transaction.createEtherTransaction(
richBenefactor().address(),
AZURE_GENESIS_ACCOUNT_ONE_PUBLIC_KEY,
null,
GAS_PRICE,
INTRINSIC_GAS,
Expand Down
4 changes: 4 additions & 0 deletions acceptance-tests/src/test/resources/eth_hash_2018.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@
"privateKey": "ae6ae8e5ccbfb04590405997ee2d52d2b330726137b875053c36d94e974d162f",
"comment": "private key and this comment are ignored. In a real chain, the private key should NOT be stored",
"balance": "90000000000000000000000"
},
"8c250253147a091cfcb7e9425022bcd03a329ce6" : {
"comment": "azure public key",
"balance": "90000000000000000000000"
}
},
"number": "0x0",
Expand Down
4 changes: 3 additions & 1 deletion gradle/check-licenses.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ downloadLicenses {
license('New BSD License', 'http://www.opensource.org/licenses/bsd-license.php')
],
(bsd3Clause): [
'BSD-3-Clause',
'BSD 3-Clause',
'BSD 3-Clause "New" or "Revised" License (BSD-3-Clause)',
'3-Clause BSD License',
Expand Down Expand Up @@ -162,7 +163,8 @@ downloadLicenses {
(group('javax.xml.bind')): cddl1_1,
(group('net.jcip')): apache,
(group('net.java.dev.jna')): apache,
(group('com.sun.mail')): cddl
(group('com.sun.mail')): cddl,
(group('io.netty')): apache,
]
}

Expand Down
4 changes: 2 additions & 2 deletions gradle/versions.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ dependencyManagement {

dependency 'io.rest-assured:rest-assured:4.3.1'

dependencySet(group: 'io.vertx', version: '3.9.1') {
dependencySet(group: 'io.vertx', version: '3.9.9') {
entry 'vertx-codegen'
entry 'vertx-core'
entry 'vertx-unit'
Expand Down Expand Up @@ -70,7 +70,7 @@ dependencyManagement {
entry 'crypto'
}

dependencySet(group: 'tech.pegasys.signers.internal', version: '1.0.17') {
dependencySet(group: 'tech.pegasys.signers.internal', version: '1.0.19') {
entry 'keystorage-hashicorp'
entry 'signing-secp256k1-api'
entry 'signing-secp256k1-impl'
Expand Down