Cakeshop是一套与基于以太坊的区块链工具和API,
Cakeshop可以启动一个geth节点,然后可以使用Cakeshop前端与之交互,也可以将其连接到已经运行的以太坊式节点
在默认模式下运行Cakeshop将启动Cakeshop,也将开始运行常规的geth节点(在专用/测试网络上)。
以“附加”(也称为“非托管”)模式运行Cakeshop将初始化Cakeshop,但不会启动它,也不会启动任何以太坊节点。Cakeshop初始化完成后,您可以对其进行配置,以使用正在运行的节点的RPC详细信息。然后,当您启动Cakeshop时,它将连接到您的节点。
修改 application.properties ,默认使用 application-local.properties
geth.auto.start = false
geth.auto.stop = false
注意:如果网络上的不同方正在使用Cakeshop将合同部署到网络,则他们需要确保他们使用相同的ContractRegistry地址。在这种情况下,请参阅下面的详细信息以设置ContractRegistry地址。
如何在任何以太坊构建或私人以太坊网络上运行Cakeshop?
这使您能够在不自动启动geth节点的情况下启动Cakeshop,然后将其附加到已经在运行的其他网络上。
Cakeshop当前被设计为使给定的Cakeshop实例直接与单个以太坊式节点一起工作,但是您可以在同一台计算机上设置多个Cakeshop实例(每个实例都可以在“默认”模式或“附加”下启动)模式),这样每个人都可以与其他节点通话。
Sandbox 提供了以下功能:部署合同,发送事务,查看编译器和调试信息,访问预先部署的示例合同库以及设置各种“合同编辑器”设置。
您可以在编辑器中编写Solidity Contracts。您可以创建新的.sol文件并查看存储在Cakeshop合同库中的.sol文件
com.jpmorgan.cakeshop.util
getPlatformDirectory 返回的是win,getDefaultIstanbulToolsUrl判断的是windows?
public static String getDefaultIstanbulToolsUrl() {
switch (ProcessUtils.getPlatformDirectory()) {
case "mac":
return "https://dl.bintray.com/quorumengineering/istanbul-tools/istanbul-tools_v1.0.1_darwin_amd64.tar.gz";
case "linux":
return "https://dl.bintray.com/quorumengineering/istanbul-tools/istanbul-tools_v1.0.1_linux_amd64.tar.gz";
case "windows":
default:
throw new RuntimeException("Your OS is not currently supported");
}
}
public static String getPlatformDirectory() {
if (SystemUtils.IS_OS_WINDOWS) {
return "win";
} else if (SystemUtils.IS_OS_LINUX) {
return "linux";
} else if (SystemUtils.IS_OS_MAC_OSX) {
return "mac";
} else {
LOG.error(
"Running on unsupported OS! Only Windows, Linux and Mac OS X are currently supported");
throw new IllegalArgumentException(
"Running on unsupported OS! Only Windows, Linux and Mac OS X are currently supported");
}
}
********************************************************************************
Running pre-flight checks...
Testing ethereum data dir path
F:\cakeshop\data\local\data\local\ethereum
OK
Testing db path
F:\cakeshop\data\local\data\local\db
OK
ALL TESTS PASSED!
********************************************************************************
[INFO ] 2020-04-10 14:03:55.921 [main] AppStartup - Autostarting geth node
[INFO ] 2020-04-10 14:03:56.074 [main] GethRunner - Quorum binary doesn't exist, creating bin directory
[ERROR] 2020-04-10 14:03:56.123 [main] SpringApplication - Application run failed
java.lang.RuntimeException: Your OS is not currently supported
at com.jpmorgan.cakeshop.util.DownloadUtils.getDefaultQuorumReleaseUrl(DownloadUtils.java:41) ~[classes!/:0.11.0]
at com.jpmorgan.cakeshop.bean.GethConfig.getGethReleaseUrl(GethConfig.java:504) ~[classes!/:0.11.0]
at com.jpmorgan.cakeshop.bean.GethRunner.downloadQuorumIfNeeded(GethRunner.java:508) ~[classes!/:0.11.0]
at com.jpmorgan.cakeshop.service.impl.GethHttpServiceImpl.start(GethHttpServiceImpl.java:365) ~[classes!/:0.11.0]
at com.jpmorgan.cakeshop.service.impl.GethHttpServiceImpl$$FastClassBySpringCGLIB$$693062af.invoke(<generated>) ~[classes!/:0.11.0]
at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204) ~[spring-core-5.0.7.RELEASE.jar!/:5.0.7.RELEASE]
at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:684) ~[spring-aop-5.0.12.RELEASE.jar!/:5.0.12.RELEASE]
at com.jpmorgan.cakeshop.service.impl.GethHttpServiceImpl$$EnhancerBySpringCGLIB$$db93690f.start(<generated>) ~[classes!/:0.11.0]
at com.jpmorgan.cakeshop.config.AppStartup.onApplicationEvent(AppStartup.java:118) ~[classes!/:0.11.0]
at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172) ~[spring-context-5.0.12.RELEASE.jar!/:5.0.12.RELEASE]
at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:165) ~[spring-context-5.0.12.RELEASE.jar!/:5.0.12.RELEASE]
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139) ~[spring-context-5.0.12.RELEASE.jar!/:5.0.12.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:400) ~[spring-context-5.0.12.RELEASE.jar!/:5.0.12.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:354) ~[spring-context-5.0.12.RELEASE.jar!/:5.0.12.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:886) ~[spring-context-5.0.12.RELEASE.jar!/:5.0.12.RELEASE]
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.finishRefresh(ServletWebServerApplicationContext.java:161) ~[spring-boot-2.0.3.RELEASE.jar!/:2.0.3.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:551) ~[spring-context-5.0.12.RELEASE.jar!/:5.0.12.RELEASE]
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:140) ~[spring-boot-2.0.3.RELEASE.jar!/:2.0.3.RELEASE]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:759) [spring-boot-2.0.3.RELEASE.jar!/:2.0.3.RELEASE]
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:395) [spring-boot-2.0.3.RELEASE.jar!/:2.0.3.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:327) [spring-boot-2.0.3.RELEASE.jar!/:2.0.3.RELEASE]
at org.springframework.boot.builder.SpringApplicationBuilder.run(SpringApplicationBuilder.java:137) [spring-boot-2.0.3.RELEASE.jar!/:2.0.3.RELEASE]
at com.jpmorgan.cakeshop.config.SpringBootApplication.main(SpringBootApplication.java:84) [classes!/:0.11.0]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_152]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_152]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_152]
at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_152]
at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48) [cakeshop.war:0.11.0]
at org.springframework.boot.loader.Launcher.launch(Launcher.java:87) [cakeshop.war:0.11.0]
at org.springframework.boot.loader.Launcher.launch(Launcher.java:50) [cakeshop.war:0.11.0]
at org.springframework.boot.loader.WarLauncher.main(WarLauncher.java:58) [cakeshop.war:0.11.0]
[INFO ] 2020-04-10 14:03:56.153 [main] MetricsBlockListener - Stopping MetricsBlockListener (thread id=30)
1、下载最新的WAR文件
2、将WAR文件保存在您选择的文件夹中
3、(可选)将WAR文件重命名为cakeshop.war
4、Java -jar -cakeshop.war
********************************************************************************
Running pre-flight checks...
Testing ethereum data dir path
F:\cakeshop\data\local\ethereum
OK
Testing db path
F:\cakeshop\data\local\db
OK
ALL TESTS PASSED!
********************************************************************************
CAKESHOP
version: 0.11.0
build id: 1f9e7f14bb077c4405e6f67efcf3413022fa2e67
build date: 2020-03-17T10:55:26.195-0400
[INFO ] 2020-04-08 11:23:45.631 [cake-1] GethHttpServiceImpl - Node with id 1 does not exist
Access the Cakeshop UI at:
访问地址 http://192.168.225.209:8080
INFO ] 2020-04-10 11:22:15.230 [BlockScanner-45] GethHttpServiceImpl - Geth call: raft_leader
[INFO ] 2020-04-10 11:22:15.280 [BlockScanner-45] GethHttpServiceImpl - Geth call: raft_cluster
[INFO ] 2020-04-10 11:22:15.327 [BlockScanner-45] GethHttpServiceImpl - Geth call: eth_getBlockByNumber
[INFO ] 2020-04-10 11:22:15.857 [MessageBroker-1] GethHttpServiceImpl - Geth call: admin_nodeInfo
[INFO ] 2020-04-10 11:22:15.900 [MessageBroker-1] GethHttpServiceImpl - Geth call: eth_mining
[INFO ] 2020-04-10 11:22:15.941 [MessageBroker-1] GethHttpServiceImpl - Geth call: net_peerCount
[INFO ] 2020-04-10 11:22:15.983 [MessageBroker-1] GethHttpServiceImpl - Geth call: eth_blockNumber
[INFO ] 2020-04-10 11:22:16.025 [MessageBroker-1] GethHttpServiceImpl - Geth call: txpool_status
[INFO ] 2020-04-10 11:22:16.068 [MessageBroker-1] GethHttpServiceImpl - Geth call: raft_role
[INFO ] 2020-04-10 11:22:16.110 [MessageBroker-1] GethHttpServiceImpl - Geth call: admin_peers
[INFO ] 2020-04-10 11:22:16.152 [MessageBroker-1] GethHttpServiceImpl - Geth call: raft_leader
[INFO ] 2020-04-10 11:22:16.194 [MessageBroker-1] GethHttpServiceImpl - Geth call: raft_cluster
[INFO ] 2020-04-10 11:22:16.236 [MessageBroker-1] GethHttpServiceImpl - Geth call: eth_getBlockByNumber
[INFO ] 2020-04-10 11:22:17.379 [BlockScanner-45] GethHttpServiceImpl - Geth call: admin_peers
[INFO ] 2020-04-10 11:22:17.420 [BlockScanner-45] GethHttpServiceImpl - Geth call: raft_leader
[INFO ] 2020-04-10 11:22:17.462 [BlockScanner-45] GethHttpServiceImpl - Geth call: raft_cluster
[INFO ] 2020-04-10 11:22:17.505 [BlockScanner-45] GethHttpServiceImpl - Geth call: eth_getBlockByNumber
[INFO ] 2020-04-10 11:22:19.547 [BlockScanner-45] GethHttpServiceImpl - Geth call: admin_peers
[INFO ] 2020-04-10 11:22:19.589 [BlockScanner-45] GethHttpServiceImpl - Geth call: raft_leader
[INFO ] 2020-04-10 11:22:19.631 [BlockScanner-45] GethHttpServiceImpl - Geth call: raft_cluster
[INFO ] 2020-04-10 11:22:19.673 [BlockScanner-45] GethHttpServiceImpl - Geth call: eth_getBlockByNumber
[DEBUG] 2020-04-10 11:22:19.947 [StreamLogAdapter] tm - 2020-04-10 11:22:19.947 [pool-3-thread-1] INFO c.q.t.partyinfo.PartyInfoPoller - Started PartyInfo polling round
[DEBUG] 2020-04-10 11:22:19.947 [StreamLogAdapter] tm - 2020-04-10 11:22:19.947 [pool-3-thread-1] INFO c.q.t.partyinfo.PartyInfoPoller - Finished PartyInfo polling round
blockscout = burrow
erlang编写
Cakeshop带有一套RESTful API
Cakeshop = Quorum
草稿:
maven 3.X的插件参数名称已经发生了变化
additionalparam需要替换成additionalJOption
Cakeshop 默认就是openjdk11,导入项目的时候需要注意本地版本和cakeshop设置的版本
cakeshop-client-js
cakeshop-abi
cakeshop-api
cakeshop-client-java
cakeshop-client-java-codegen
cakeshop-client-java-sample
cakeshop-node-manager
PowerShell中命令改成 mvn clean package install ‘-Dmaven.test.skip=true’
clean install -Dmaven.javadoc.skip=true -Dmaven.test.skip=true
npm install cnpm -g --registry=https://registry.npm.taobao.org
npm get registry
npm config set registry http://registry.npm.taobao.org/
solc 无法下载的时候,可以利用idea自动下载,打开package.json会有提示,frontend-maven-plugin每一次都会重新下载。。。
[ERROR] /F:/java-workspace/cakeshop/cakeshop-api/src/main/java/com/jpmorgan/cakeshop/bean/GethConfig.java:[9,41] 无法访问com.quorum.tessera.config.builder.ConfigBuilder
错误的类文件: E:\dev\MavenRepo\com\jpmorgan\quorum\config-migration\0.10.4\config-migration-0.10.4.jar(com/quorum/tessera/config/builder/ConfigBuilder.class)
类文件具有错误的版本 55.0, 应为 52.0
请删除该文件或确保该文件位于正确的类路径子目录中。
geth Go-Ethereum简称Geth,用golang语言实现。