Skip to content
This repository was archived by the owner on May 27, 2022. It is now read-only.

Commit 1c6de5b

Browse files
authored
Merge pull request #202 from ConsenSys/DocUpdatesRebased
Doc updates rebased
2 parents 3e456c5 + 569ac4f commit 1c6de5b

File tree

6 files changed

+113
-204
lines changed

6 files changed

+113
-204
lines changed

.github/ISSUE_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Cakeshop version or commit hash: [version]
1818

1919
Cakeshop runtime configuration: [stand alone or attach mode]
2020

21-
Geth/Quorum version testing against: [run `geth version` or copy from Node Info in UI]
21+
Geth/GoQuorum version testing against: [run `geth version` or copy from Node Info in UI]
2222

2323
Cakeshop OS & Version: Windows/Linux/OSX
2424

README.md

Lines changed: 50 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,93 +1,111 @@
11
# Cakeshop
22

3-
[![Build Status](https://travis-ci.com/jpmorganchase/cakeshop.svg?branch=master)](https://travis-ci.com/jpmorganchase/cakeshop)
4-
5-
An integrated development environment and SDK for Ethereum-like ledgers
6-
73
![screenshot](docs/images/console.png "screenshot")
84

95
![screenshot](docs/images/sandbox.png "sandbox screenshot")
106

117
## What is it?
128

13-
_Cakeshop_ is a set of tools and APIs for working with [Ethereum](https://ethereum.org/)-like ledgers, packaged as a Java web application archive (WAR) that gets you up and running in under 60 seconds.
14-
15-
Cakeshop will download the latest version of [quorum](https://github.com/jpmorganchase/quorum) and bootnode from [geth](https://github.com/ethereum/go-ethereum) (to use a different version, see [here](docs/configuration.md#custom-quorum-binaries)). The cakeshop package includes the [tessera](https://github.com/jpmorganchase/tessera) and [constellation](https://github.com/jpmorganchase/constellation) transaction managers, a [Solidity](https://solidity.readthedocs.org/en/latest/)
16-
compiler, and all dependencies.
9+
_Cakeshop_ is a set of tools and APIs for working with GoQuorum nodes, packaged as a Java web application archive (WAR) that gets you up and running in under 60 seconds.
1710

18-
It provides tools for managing a local blockchain node, setting up clusters,
19-
exploring the state of the chain, and working with contracts.
11+
It provides tools for attaching to GoQuorum nodes, exploring the state of the chain, and working with contracts.
2012

2113
## Download
2214

23-
Binary packages are available for macOS and Linux platforms on the [releases](https://github.com/jpmorganchase/cakeshop/releases) page.
15+
Binary packages are available on the [Github releases page](https://github.com/ConsenSys/cakeshop/releases).
16+
17+
## Configuration
18+
19+
Cakeshop is a Spring Boot application, so you may place an `application.properties` file in the working directory to override any default configuration values. For more info, see the [configuration page](docs/configuration.md).
2420

25-
## Quickstart
21+
## Running via GoQuorum Wizard
22+
23+
The easiest way to use Cakeshop is to generate a GoQuorum network with [GoQuorum Wizard](https://docs.goquorum.consensys.net/en/stable/HowTo/GetStarted/Wizard/GettingStarted/) and choose to deploy Cakeshop alongside the network.
24+
25+
## Running via Spring Boot
2626

2727
### Requirements
2828

29-
* Java 8+
30-
* NodeJS (if the nodejs binary on your machine isn't called 'node', see [here](docs/configuration.md#nodejs-binary))
29+
* Java 11+
30+
* NodeJS (if the nodejs binary on your machine isn't called 'node', see [here](docs/configuration.md#cakeshop-internals))
3131

32-
### Running via Spring Boot
32+
### Running
3333

3434
* Download WAR file
3535
* Run `java -jar cakeshop.war`
3636
* Navigate to [http://localhost:8080/](http://localhost:8080/)
3737

3838

39-
### Running via Docker -- NEEDS UPDATE
39+
## Running via Docker
4040

41-
Run via docker and access UI on [http://localhost:8080/](http://localhost:8080/)
41+
Simple example of running via docker on port 8080:
4242

4343
```sh
4444
docker run -p 8080:8080 quorumengineering/cakeshop
4545
```
4646

47-
You'll probably want to mount a data volume:
47+
Then access the UI at [http://localhost:8080/](http://localhost:8080/)
48+
49+
### Docker Customizations
50+
You can add some extra flags to the run command to further customize cakeshop.
51+
52+
Here is an example where you mount `./data` as a data volume for the container to use:
4853

4954
```sh
5055
mkdir data
5156
docker run -p 8080:8080 -v "$PWD/data":/opt/cakeshop/data quorumengineering/cakeshop
5257
```
5358

54-
Running under a specific environment
59+
An example providing an initial nodes.json in the data directory and configuring it to be used:
5560

5661
```sh
62+
# makes sure you have nodes.json at $PWD/data/nodes.json
5763
docker run -p 8080:8080 -v "$PWD/data":/opt/cakeshop/data \
58-
-e JAVA_OPTS="-Dspring.profiles.active=local" \
64+
-e JAVA_OPTS="-Dcakeshop.initialnodes=/opt/cakeshop/data/nodes.json" \
5965
quorumengineering/cakeshop
6066
```
6167

62-
Note that DAG generation will take time and Cakeshop will not be available until it's complete. If you already have a DAG for epoch 0 in your `$HOME/.ethash` folder, then you can expose that to your container (or just cache it for later):
68+
## Migrating from Cakeshop v0.11.0
6369

64-
```sh
65-
docker run -p 8080:8080 -v "$PWD/data":/opt/cakeshop/data \
66-
-v $HOME/.ethash:/opt/cakeshop/.ethash \
67-
quorumengineering/cakeshop
68-
```
70+
The following big changes were made in v0.12.0:
71+
1. Simplification of config file to better follow Spring Boot standards.
72+
1. Moved Contract Registry from being stored in a combination of a smart contract and the database to being in the database only.
73+
1. Elimination of cakeshop's managed node in favor of only attaching to existing nodes.
74+
1. Simplified DB configuration by using Spring Data.
75+
76+
To ensure easy transition, Cakeshop will still look in the locations where v0.11.0 commonly stored the config file. But (1) allows you to now place your config in the folder where you run cakeshop, or specify a different location using standard spring boot flags, for easier customization.
77+
78+
Cakeshop had custom logging location logic in the config before this change, which was removed. You may now redirect logs yourself or use Spring's logging config settings.
79+
80+
For (2), if you had contracts deployed and stored in the old Contract Registry, you may leave the `contract.registry.addr` line in your config file. Cakeshop will look for that contract address when it connects to the network and add those contracts to the database.
81+
82+
For (3), most of the original config values were related to this feature, and can be safely removed. See the [default config file](../cakeshop-api/src/main/resources/config/application.properties) for all the values that are actually used.
83+
84+
(4) means that you will need to update the db-related config values to use spring data. So the old `cakeshop.database`, `cakeshop.hibernate`, and `cakeshop.jdbc` settings should change to use `spring.data`, `spring.jpa`, etc. See the [configuration](docs/configuration.md#database) doc for more info.
85+
86+
Note: Due to an bug that happens when you update from Hibernate 4 to 5, when auto-updating the database it will try to recreate some column constraints that don't need to be recreated. These will fail and print a stack trace in the logs because they already exist. There are no negative effects from this error, so the best thing to do is to run with `spring.jpa.hibernate.ddl-auto=update` once and then change `update` to `none` on subsequent runs to avoid error logs. In production, it is not recommended to use auto-update to migrate your database at all, but instead run migrations on the database yourself.
6987

7088
## Further Reading
7189

72-
Further documentation can be found on the [wiki](https://github.com/jpmorganchase/cakeshop/wiki/) and in the [docs](docs/) folder.
90+
Further documentation can be found [here](https://docs.goquorum.consensys.net/en/stable/Concepts/Cakeshop/).
7391

7492
## See Also
7593

7694
* [JIF Dashboard](https://github.com/jpmorganchase/jif-dashboard) - The Cakeshop UI was built using the JIF Dashboard framework.
7795

78-
* [solc-cakeshop-cli](https://github.com/jpmorganchase/solc-cakeshop-cli) - The solidity compiler used behind the scenes is `solc-cakeshop-cli`, a thin wrapper atop the [solc](https://github.com/ethereum/solc-js) JS binding.
96+
* [solc-cakeshop-cli](https://github.com/ConsenSys/solc-cakeshop-cli) - The solidity compiler used behind the scenes is `solc-cakeshop-cli`, a thin wrapper atop the [solc](https://github.com/ethereum/solc-js) JS binding.
7997

8098
## Contributing
8199

82100
Thank you for your interest in contributing to Cakeshop!
83101

84-
Cakeshop is built on open source and we invite you to contribute enhancements. Upon review you will be required to complete a Contributor License Agreement (CLA) before we are able to merge. If you have any questions about the contribution process, please feel free to send an email to [quorum_info@jpmorgan.com](mailto:quorum_info@jpmorgan.com).
102+
Cakeshop is built on open source and we invite you to contribute enhancements. Upon review you will be required to complete a Contributor License Agreement (CLA) before we are able to merge. If you have any questions about the contribution process, please feel free to send an email to [info@goquorum.com](mailto:info@goquorum.com).
85103

86104

87105
## Reporting Security Bugs
88106
Security is part of our commitment to our users. At Quorum we have a close relationship with the security community, we understand the realm, and encourage security researchers to become part of our mission of building secure reliable software. This section explains how to submit security bugs, and what to expect in return.
89107

90-
All security bugs in [Quorum](https://github.com/jpmorganchase/quorum) and its ecosystem ([Tessera](https://github.com/jpmorganchase/tessera), [Constellation](https://github.com/jpmorganchase/constellation), [Cakeshop](https://github.com/jpmorganchase/cakeshop), ..etc) should be reported by email to [[email protected]](mailto:[email protected]). Please use the prefix **[security]** in your subject. This email is delivered to Quorum security team. Your email will be acknowledged, and you'll receive a more detailed response to your email as soon as possible indicating the next steps in handling your report. After the initial reply to your report, the security team will endeavor to keep you informed of the progress being made towards a fix and full announcement.
108+
All security bugs in [GoQuorum](https://github.com/ConsenSys/quorum) and its ecosystem ([Tessera](https://github.com/ConsenSys/tessera), [Constellation](https://github.com/ConsenSys/constellation), [Cakeshop](https://github.com/ConsenSys/cakeshop), ..etc) should be reported by email to [[email protected]](mailto:[email protected]). Please use the prefix **[security]** in your subject. This email is delivered to the Quorum security team. Your email will be acknowledged, and you'll receive a more detailed response to your email as soon as possible indicating the next steps in handling your report. After the initial reply to your report, the security team will endeavor to keep you informed of the progress being made towards a fix and full announcement.
91109

92110
If you have not received a reply to your email or you have not heard from the security team please contact any team member through quorum slack security channel. **Please note that Quorum slack channels are public discussion forum**. When escalating to this medium, please do not disclose the details of the issue. Simply state that you're trying to reach a member of the security team.
93111

@@ -109,9 +127,10 @@ The best way to receive security announcements is to subscribe to the Quorum-ann
109127

110128
Comments on This Policy
111129
If you have any suggestions to improve this policy, please send an email to [email protected] for discussion.
130+
112131
## License
113132

114-
Copyright (c) 2016-2019 JPMorgan Chase and/or applicable contributors
133+
Copyright (c) 2016-2021 Consensys and/or applicable contributors
115134

116135
Licensed under the Apache License, Version 2.0 (the "License");
117136
you may not use this file except in compliance with the License.

cakeshop-api/Cakeshop-from-scratch.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ sudo apt-get install libtinfo-dev
3030
```shell
3131
mkdir ~/Projects/cakeshop.git
3232
cd ~/Projects/cakeshop.git
33-
git clone https://github.com/jpmorganchase/cakeshop.git
33+
git clone https://github.com/ConsenSys/cakeshop.git
3434
```
3535

3636
```shell
@@ -52,13 +52,13 @@ git clone -b master --single-branch https://github.com/getamis/istanbul-tools.gi
5252
```shell
5353
mkdir ~/Projects/constellation.git
5454
cd ~/Projects/constellation.git
55-
git clone -b master --single-branch https://github.com/jpmorganchase/constellation.git
55+
git clone -b master --single-branch https://github.com/ConsenSys/constellation.git
5656
```
5757

5858
```shell
5959
mkdir ~/Projects/quorum.git
6060
cd ~/Projects/quorum.git
61-
git clone -b master --single-branch https://github.com/jpmorganchase/quorum.git
61+
git clone -b master --single-branch https://github.com/ConsenSys/quorum.git
6262
```
6363

6464
## Related builds

cakeshop-api/src/main/resources/config/application.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ nodejs.binary=node
1111
cakeshop.initialnodes=
1212
cakeshop.reporting.rpc=
1313
cakeshop.reporting.ui=
14+
contract.registry.addr=
1415

1516
cakeshop.cors.url=
1617
cakeshop.cors.enabled=false

0 commit comments

Comments
 (0)