Skip to content
This repository was archived by the owner on Aug 12, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all 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
5 changes: 3 additions & 2 deletions .env
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
# this is used by docker-compose.yml to for the epoch image tag
TAG=v1.0.0
# this is used by docker-compose.yml to for the node image tag
TAG=v2.0.0

4 changes: 1 addition & 3 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
Issue tracker is **ONLY** used for reporting bugs or feature request. NO SUPPORT REQUESTS ACCEPTED! Use [stackoverflow](https://stackoverflow.com/tags/aeternity) for supporting issues.

<!--- Provide a general summary of the issue in the Title above -->

## Expected Behavior
Expand All @@ -25,7 +23,7 @@ Issue tracker is **ONLY** used for reporting bugs or feature request. NO SUPPORT

<!--- Provide a general summary of the issue in the Title above -->

## [Epoch](https://github.com/aeternity/epoch/releases) Version
## [Aeternity Node](https://github.com/aeternity/aeternity/releases) Version

## Detailed Description
<!--- Provide a detailed description of the change or addition you are proposing -->
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,6 @@ venv
aepp_sdk.egg-info
dist
build
coverage.xml
docker-compose.override.yml
test-results.xml
19 changes: 18 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,23 @@ log follows the conventions of [keepachangelog.com](http://keepachangelog.com/).

## [Unreleased]

## [2.0.0]

### Added

- Compatibility with aeternity node >= 1.4.0 and < 3.0.0
- Transaction serialization/deserialization support
- Automatic fee calculation

### Removed

- Compatibility with aeternity node < 1.4.0

### Changed

- Rename references of `epoch` to `node`
- CLI interface for aens claim

## [1.1.2]

### Changed
Expand Down Expand Up @@ -239,7 +256,7 @@ refer to the [documentation](docs/keystore_format_change.md) about how to update

### Changed

- Switch to curve ed25519 (from secp256k1) to align with Epoch protocol changes
- Switch to curve ed25519 (from secp256k1) to align with Node protocol changes
- Generate basic API directly from Swagger files, also validate input data

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion INSTALL.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# How to install an Epoch test network on Linux
# How to install an Node test network on Linux

Tested on Ubuntu 17.10, Ubuntu 17.04 and Fedora 27. This will install a 3-node
system for local testing. Optionally you may choose to speed up mining in order
Expand Down
6 changes: 1 addition & 5 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ pipeline {

environment {
DOCKER_COMPOSE = "docker-compose -p ${env.BUILD_TAG} -H 127.0.0.1:2376"
SCANNER_HOME = tool 'default-sonarqube-scanner'
}

stages {
Expand All @@ -21,12 +20,9 @@ pipeline {
withCredentials([usernamePassword(credentialsId: 'genesis-wallet',
usernameVariable: 'WALLET_PUB',
passwordVariable: 'WALLET_PRIV')]) {
sh "${env.DOCKER_COMPOSE} pull node"
sh "${env.DOCKER_COMPOSE} run sdk flake8"
sh "${env.DOCKER_COMPOSE} run sdk make test"
// run sonar?
// withSonarQubeEnv('default-sonarqube-server') {
// sh "${env.SCANNER_HOME}/bin/sonar-scanner -X"
// }
}
}
}
Expand Down
123 changes: 72 additions & 51 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,13 @@ Usage: aecli [OPTIONS] COMMAND [ARGS]...

Welcome to the aecli client.

The client is to interact with an epoch node.
The client is to interact with an node node.

Options:
--version Show the version and exit.
-u, --url URL Epoch node url
-u, --url URL Node node url
-d, --debug-url URL
--force Ignore epoch version compatibility check
--force Ignore node version compatibility check
--wait Wait for transactions to be included
--json Print output in JSON format
--version Show the version and exit.
Expand All @@ -65,68 +65,76 @@ Commands:
## Environment variables

Use the environment variables
- `EPOCH_URL`
- `EPOCH_URL_DEBUG`

- `NODE_URL`
- `NODE_URL_DEBUG`

### Example usage

The following is a walkthrough to execute an offline spend transaction on the *sdk-edgenet* network
The following is a walkthrough to execute an offline spend transaction on the *testnet* network

1. Set the environment variables
```
export EPOCH_URL=https://sdk-edgenet.aepps.com
export EPOCH_URL_DEBUG=https://sdk-edgenet.aepps.com
export NODE_URL=https://sdk-testnet.aepps.com
```

❗ When not set the command line client will connect to mainnet

2. Retrieve the top block
```
./aecli chain top
<none>
Beneficiary _______________________________________ ak_25MZX3BXYP32YDPGWsJqYZ6CgWnqD93VdpCYaTk6KsThEbeFJX
Hash ______________________________________________ kh_b8bTJYdmyiRuyCrV3AowFxSsGjXr28Ue5QtHbVuLXQQERZjnD
Height ____________________________________________ 3604
Miner _____________________________________________ ak_2Li2KZjMzNd9tWqhkhLLi2j97XFjyEBUK9BBDZtY3f2jkjtCMj
Nonce _____________________________________________ 3313408265463920434
Prev hash _________________________________________ kh_F6c5zJYf91ewJhSgH28Z59Rjzotpz8KyPWzvTiTQt4V4kDsVA
Prev key hash _____________________________________ kh_F6c5zJYf91ewJhSgH28Z59Rjzotpz8KyPWzvTiTQt4V4kDsVA
State hash ________________________________________ bs_gQTYraBQZPgPxb5a5MKtnZthVTMoDs1eZ5qGrsvziLFoQeY9
Target ____________________________________________ 536993844
Time ______________________________________________ 2018-11-16T17:41:28.123000+00:00
Version ___________________________________________ 28
</none>
$ aecli chain top
<top for node at https://sdk-testnet.aepps.com >
Beneficiary _______________________________________ ak_2iBPH7HUz3cSDVEUWiHg76MZJ6tZooVNBmmxcgVK6VV8KAE688
Hash ______________________________________________ kh_WTqMQQRsvmbtP5yrKPxd4p2PPKiA51AuPyCkVJk7d7HVtkhS6
Height ____________________________________________ 46049
Info ______________________________________________ cb_Xfbg4g==
Miner _____________________________________________ ak_24yQXT3g2jNryZbY2veHYcgQn3PspfTnkTHbXMwNYDQd9NZAs5
Nonce _____________________________________________ 17848795956567990671
Prev hash _________________________________________ kh_B5Q3F7Gxbmg2z3prkay2uYohvhv4xXUKQzKKkbTdm7Z3GuQxU
Prev key hash _____________________________________ kh_B5Q3F7Gxbmg2z3prkay2uYohvhv4xXUKQzKKkbTdm7Z3GuQxU
State hash ________________________________________ bs_bkP3QdFKCWNetDHfwL3rJG2hEgRzZRAQN6jh33SKwUd17tBjp
Target ____________________________________________ 538409724
Time ______________________________________________ 2019-03-03T23:38:49.720000+00:00
Version ___________________________________________ 2
</top for node at https://sdk-testnet.aepps.com >
```

3. Create an account
3. Create a new account

```
aecli account create TEST.json
aecli account create Bob.json
Enter the account password []:
<account>
Address ___________________________________________ ak_KUF5Y1BwYaMYXCGZU93vjQHxT3hQSVeryBvCMLLguvZTgGGWB
Path ______________________________________________ /..../TEST.json
Address ___________________________________________ ak_BobY97QUVR4iDLg4k3RKmy6shZYx9FR75nLaN33GsVmSnhWxn
Path ______________________________________________ /.../Bob.json
</account>

```

4. Go to [edge-faucet.aepps.com](https://edge-faucet.aepps.com) and top up your account
❗ Make sure that you use a long and difficult-to-guess password for an account that you plan to use on mainnet

4. Go to [testnet.faucet.aepps.com](https://testnet.faucet.aepps.com) and top up your account

![](docs/assets/images/faucet.png)

5. Inspect the transaction reported by the faucet app
```
aecli inspect th_uMTuHHgk2RHVjWktNXUKSfPBNjirCRXSRQgx4S5wjGJms2pwE
aecli inspect th_2CV4a7xxDYj5ysaDjXNoCSLxnkowGM5bbyAvtdoPvHZwTSYykX
<transaction>
Block hash ________________________________________ mh_25fkUuH9ZWF8NVHJRxG6SByPvgpR9tYEfc2sES3nQacQcoPVEz
Block height ______________________________________ 3605
Hash ______________________________________________ th_uMTuHHgk2RHVjWktNXUKSfPBNjirCRXSRQgx4S5wjGJms2pwE
Block hash ________________________________________ mh_2vjFffExUZPVGo3q6CHRSzxVUhzLcUnQQUWpijFtSvKfoHwQWe
Block height ______________________________________ 12472
Hash ______________________________________________ th_2CV4a7xxDYj5ysaDjXNoCSLxnkowGM5bbyAvtdoPvHZwTSYykX
<signatures 1>
Signature #1 ____________________________________ sg_G7rDNL81BGPL9iEUC9w4Pmuvk582QBWm2W41gq1DKR8q7sPBhqmU3VbJhBFzvTKJe6XfkRDWd1rF6kmF86aqyw78g6G76
Signature #1 ____________________________________ sg_WtPeyKWN4zmcnZZXpAxCT8EvjF3qSjiUidc9cdxQooxe1JCLADTVbKDFm9S5bNwv3yq57PQKTG4XuUP4eTzD5jymPHpNu
</signatures>
<tx>
Amount __________________________________________ 250
Fee _____________________________________________ 1
Nonce ___________________________________________ 23
Amount __________________________________________ 5000000000000000000
Fee _____________________________________________ 20000
Nonce ___________________________________________ 146
Payload _________________________________________ Faucet Tx
Recipient id ____________________________________ ak_KUF5Y1BwYaMYXCGZU93vjQHxT3hQSVeryBvCMLLguvZTgGGWB
Sender id _______________________________________ ak_Jq7fsE1x9Hy8XnXpyHuJuwxiC1xbeCLsKqrKggfBi6b5o9VSE
Ttl _____________________________________________ 3655
Recipient id ____________________________________ ak_2ioQbdSViNKjknaLUWphdRjpbTNVpMHpXf9X5ZkoVrhrCZGuyW
Sender id _______________________________________ ak_2iBPH7HUz3cSDVEUWiHg76MZJ6tZooVNBmmxcgVK6VV8KAE688
Ttl _____________________________________________ 12522
Type ____________________________________________ SpendTx
Version _________________________________________ 1
</tx>
Expand All @@ -136,46 +144,59 @@ aecli inspect th_uMTuHHgk2RHVjWktNXUKSfPBNjirCRXSRQgx4S5wjGJms2pwE
6. Create another account

```
aecli account create TEST1.json
aecli account create Alice.json
Enter the account password []:
<account>
Address ___________________________________________ ak_2PSjWyfKy1vitPF3UVWW7bFLBVC96vTbU6XF8Z5sWFDsJ9UX8w
Path ______________________________________________ /Users/andrea/Documents/workspaces/blockchain/aeternity/aepp-sdk-python/TEST1.json
Address ___________________________________________ ak_9j8akv2PE2Mnt5khFeDvS9BGc3TBBrJkfcgaJHgBXcLLagX8M
Path ______________________________________________ /.../Alice.json
</account>
```


7. Transfer some tokens to an account to the other

```
aecli account spend TEST.json ak_2PSjWyfKy1vitPF3UVWW7bFLBVC96vTbU6XF8Z5sWFDsJ9UX8w 50
aecli account spend Bob.json ak_9j8akv2PE2Mnt5khFeDvS9BGc3TBBrJkfcgaJHgBXcLLagX8M 1000000000000000000
Enter the account password []:
<spend transaction>
Sender account ____________________________________ ak_KUF5Y1BwYaMYXCGZU93vjQHxT3hQSVeryBvCMLLguvZTgGGWB
Recipient account _________________________________ ak_2PSjWyfKy1vitPF3UVWW7bFLBVC96vTbU6XF8Z5sWFDsJ9UX8w
Unsigned __________________________________________ tx_51fEeKes4ZMpp7njot9VTwFQQCmU4EHgc2U6EzU8dm3TuvB3YzsQhshMV9ksrqCpygPtQyHoMxzC3XXW5QJmADyo8WUJogjrTtgkGXmB88JfVncVC6
Signed ____________________________________________ tx_66dpehQZhw1sUsS5agWkmDMYasvWBYFoagoMEsFatXUaXawyhu9Fy6Has356wNir5bzN567qtLTSxmYr2LpEFN6DMpktFp2YPWtfmGAm8Wcjr2qcXWHS32dBMA1va3CfkS7o5bdzFVVjohhVaN2BPnECJBnJGJHBdJBuQCadeCnY4PWEH5dbdGij3iLADgBjRCCyGomQsuz594heQL8Bhaf
Hash ______________________________________________ th_LUbGLvcY3YL9rG52jzsyQDyxvagqwqgEsxMhrRNuoHXGLqTsg
<data>
Tag _____________________________________________ 12
Vsn _____________________________________________ 1
Sender id _______________________________________ ak_BobY97QUVR4iDLg4k3RKmy6shZYx9FR75nLaN33GsVmSnhWxn
Recipient id ____________________________________ ak_9j8akv2PE2Mnt5khFeDvS9BGc3TBBrJkfcgaJHgBXcLLagX8M
Amount __________________________________________ 1000000000000000000
Fee _____________________________________________ 16860000000000
Ttl _____________________________________________ 0
Nonce ___________________________________________ 4
Payload _________________________________________
</data>
Metadata
Tx ________________________________________________ tx_+KMLAfhCuEAKN05UwTV0fSgO5woziVNnAMBcDrh46XlNFTZTJQlI05fz/8pVSyrb1guCLcw8n7++O887k/JEu6/XHcCSHOMMuFv4WQwBoQEYh8aMDs7saMDBvys+lbKds3Omnzm4crYNbs9xGolBm6EBE9B4l/BeyxMO//3ANxwyT+ZHL52j9nAZosRe/YFuK4eIDeC2s6dkAACGD1WGT5gAAASAN24JGA==
Hash ______________________________________________ th_2gAL72dtnaeDcZoZA9MbfSL1JrWzNErMJuikmTRvBY8zhkGh91
Signature _________________________________________ sg_2LX9hnJRiYGSspzpS34QeN3PLT9bGSkFRbad9LXvLj5QUFoV5eHRf9SueDgLiiquCGbeFEBPBe7xMJidf8NMSuF16dngr
Network id ________________________________________ ae_uat
</spend transaction>
```

8. Verify the balance of the new account
```
aecli inspect ak_2PSjWyfKy1vitPF3UVWW7bFLBVC96vTbU6XF8Z5sWFDsJ9UX8w
aecli inspect ak_9j8akv2PE2Mnt5khFeDvS9BGc3TBBrJkfcgaJHgBXcLLagX8M
<account>
Balance ___________________________________________ 50
Id ________________________________________________ ak_2PSjWyfKy1vitPF3UVWW7bFLBVC96vTbU6XF8Z5sWFDsJ9UX8w
Balance ___________________________________________ 1000000000000000000
Id ________________________________________________ ak_9j8akv2PE2Mnt5khFeDvS9BGc3TBBrJkfcgaJHgBXcLLagX8M
Nonce _____________________________________________ 0
</account>
```



## Advanced usage

For advanced usage check the [documentation](docs).


## Reference:

[AENS API Spec](https://github.com/aeternity/protocol/blob/master/epoch/api/naming_system_api_usage.md)
[AENS API Spec](https://github.com/aeternity/protocol/blob/master/node/api/naming_system_api_usage.md)

[AENS Protocol](https://github.com/aeternity/protocol/blob/master/AENS.md)
6 changes: 3 additions & 3 deletions aeternity/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
__version__ = '1.1.2'
__version__ = '2.0.0'

__compatibility__ = dict(
from_version=">=1.0.0",
to_version="<2.0.0"
from_version=">=1.4.0",
to_version="<3.0.0"
)
Loading