Running Canton Ethereum Domain

Hi all,

I am currently trying to run the demo Canton Ethereum deployment and I have some questions:

Do I need to have both the Canton Enterprise release tar file and the docker image? Also it says that I need to install the Hyperledger Besu. Do I install Besu inside the docker image?

Hopefully someone can give me some insight on running this demo.

Thank you.

Hi @BrunoRTL

I use the following setup for my Canton Enterprise v.2.4.x and it works fine:

  1. Canton EE v2.4.0. as a file.tar.gz extracted to ~/opt
  2. Besu v2.3.x as a Docker image
  3. PostgreSQL v14 as a Docker image

You can have Canton EE on your system as both a file.tar.gz and a Docker image, but if you do, it would probably be a good habit to consistently use only one type for testing and development. This will help you build a specific knowledge base and reduce the opportunity for additional configuration issues.

Some clients and users of Canton Enterprise use it with the various integrations using 100% Docker images, so you can build a very flexible setup to suit your needs.

Hi @Ben_M

Thank you for the help.

I tried your setup, however, when I run CANTON_VERSION=2.4.0 ./run.sh simple I dont get pass
“Getting node addresses based on the node public keys”.

maybe I have some wrong configuration… Do you have any ideas?

I am following this guide:

https://docs.daml.com/canton/usermanual/domains/ethereum.html

Thanks again

Edit:

I got passed “Getting node addresses based on the node public keys”, however, I am stuck now on
“Encoding validator nodes”

I noticed that you are using MacOS linux/arm64/v8 and the Docker image that was pulled down was linux/amd64.

I am not sure if this is the issue that is causing the process to stall, however for the sake of being diligent, may I suggest that you manually install the package Rosetta v2 for M1 devices.

softwareupdate --install-rosetta

Refer to this Stackoverflow question re bad cpu type.

Install Rosetta v2; restart the process; update with further errors.

As a test to ensure that you should be able to run this Ethereum-on-Canton example, I did the following:

  • Removed all current Docker Containers and Images
  • Logged out and then back into Docker
  • Navigated to the Canton EE v2.4.0 directory where I extracted the archive
  • Confirmed the version of Canton I have (v2.4.0)
  • Executed /../examples/e03-ethereum-sequencer$ CANTON_VERSION=2.4.0 ./run.sh simple

In the first terminal:

benm ~/opt/canton-enterprise-2.4.0/examples/e03-ethereum-sequencer $ CANTON_VERSION=2.4.0 ./run.sh simple
Using CANTON_VERSION 2.4.0
COMPOSE_PROJECT_NAME is now canton-on-ethereum-demo
Using compose file /home/benm/opt/canton-enterprise-2.4.0/examples/e03-ethereum-sequencer/docker-compose/docker-compose-besu.yaml:/home/benm/opt/canton-enterprise-2.4.0/examples/e03-ethereum-sequencer/docker-compose/docker-compose-simple.yaml
Using data dir /home/benm/opt/canton-enterprise-2.4.0/examples/e03-ethereum-sequencer/ibft-testnet/testnet
Removing previous testnet and generating a new clean testnet
Unable to find image 'hyperledger/besu:21.10' locally
21.10: Pulling from hyperledger/besu
ea362f368469: Pull complete 
b6320c011764: Pull complete 
33796e6ad525: Pull complete 
Digest: sha256:8a03d5ed779ba0735ee313ce0dde3af1217eabec17352e8bc953b9b1863de239
Status: Downloaded newer image for hyperledger/besu:21.10
secp256k1 seed randomization is turned off. This should not be used in a production setting.
Will generate testnet but not start Besu nodes.
Getting node addresses based on the node public keys
2022-12-15 00:58:52.926+00:00 | main | INFO  | KeyPairUtil | Generated new public key 0xa231589c9cf66469a6ef2cb2b09a0489acf16a4ea2f1647d12b3d9d6df6f33c8f331e924b38969e7fbab32aa318659d1a11b4b0bffd1ba29aa7650128885318c and stored it to /opt/besu/testnet/node1/data/key
2022-12-15 00:59:00.172+00:00 | main | INFO  | KeyPairUtil | Generated new public key 0x80a14913c68f99254d56f0e8e1e83412344cb0665d022583f3f759742111a3c4d57d1adbeb61ce4d4de81b0354760d4284a0b6674af0f520911d7c0e53f55308 and stored it to /opt/besu/testnet/node2/data/key
2022-12-15 00:59:07.190+00:00 | main | INFO  | KeyPairUtil | Generated new public key 0xd5e982055fddd82858a68db84fd3ce093b34f1ff8457bc2cb24530a9a8282c63ef1c004f2fcba4dbaa8583609c8fe121171277717fd9abf60e4f042acf85f9a1 and stored it to /opt/besu/testnet/node3/data/key
2022-12-15 00:59:14.206+00:00 | main | INFO  | KeyPairUtil | Generated new public key 0x471abe7767e4d17cd5da8862a0877942d8673fe10bb2450a079f9cc1a9f79c32a4663b683f93aa4507581fd244e6316d512a05e69a4713680e0bc2f3f6b037c8 and stored it to /opt/besu/testnet/node4/data/key
Generating new self-signed TLS certificates
Generating a RSA private key
.................................................................................................................++++
........++++
writing new private key to 'besu_key.pem'
-----
Generating a RSA private key
...................................++++
.............++++
writing new private key to 'canton_key.pem'
-----
Encoding validator nodes
Generating the bootnode url
Regenerating the genesis file
/besu-gen-testnet
Starting the Besu nodes and Canton
Pulling enterprise-canton-simple (digitalasset-canton-enterprise-docker.jfrog.io/digitalasset/canton-enterprise:2.4.0)...
...
...
besu-2_1                    | 2022-12-15 03:44:50.010+00:00 | pool-8-thread-1 | INFO  | IbftBesuControllerBuilder | Imported #1,084 / 0 tx / 0 pending / 0 (0.0%) gas / (0x089e3084ebd5c49be9619d34332a6183e1c425770cb46edbabc90f93c9f066c5)
besu-1_1                    | 2022-12-15 03:44:51.010+00:00 | pool-8-thread-1 | INFO  | IbftBesuControllerBuilder | Produced #1,085 / 0 tx / 0 pending / 0 (0.0%) gas / (0x58a58c2bea09ab0f52cc90ae6ce8a1d4740be7e40218e7f90f298775a537fa2a)
besu-4_1                    | 2022-12-15 03:44:51.009+00:00 | pool-8-thread-1 | INFO  | IbftBesuControllerBuilder | Imported #1,085 / 0 tx / 0 pending / 0 (0.0%) gas / (0x58a58c2bea09ab0f52cc90ae6ce8a1d4740be7e40218e7f90f298775a537fa2a)
besu-2_1                    | 2022-12-15 03:44:51.009+00:00 | pool-8-thread-1 | INFO  | IbftB
... 
...

Once the Besu network is running, you will see endless scrolling, as so long as it is continuing with no errors, you can do the next step.

Note: I have my /../canton-enterprise-2.4.0/bin set into my system path, so I can invoke Canton solely by using the term canton. You may have to use the ../../bin canton method.

In the second Terminal:

benm ~/opt/canton-enterprise-2.4.0/examples/e03-ethereum-sequencer $ canton -c canton-conf/remote.conf
Compiling (synthetic)/ammonite/predef/ArgsPredef.sc
Compiling /home/benm/opt/canton-enterprise-2.4.0/examples/e03-ethereum-sequencer/(console)
   _____            _
  / ____|          | |
 | |     __ _ _ __ | |_ ___  _ __
 | |    / _` | '_ \| __/ _ \| '_ \
 | |___| (_| | | | | || (_) | | | |
  \_____\__,_|_| |_|\__\___/|_| |_|

  Welcome to Canton!
  Type `help` to get started. `exit` to leave.


@

Hope this helps.

Hi @Ben_M,
Your reply was insightful.
I have a query: the ethereum client we used was Hyperledger Besu,
Is it possible to use other rpc clients?
Also can we connect any other Layer 2 networks and sidechains with canton, like polygon?

Hi Albert, I am glad that the answer above was useful.

In relation to integration with other Layer 2 networks and sidechains with Canton Enterprise, DA supports and strongly recommends only the following:

  • Canton domain with the Ethereum client Hyperledger Besu (Enterprise)
  • Canton domain with Fabric Ledger (Enterprise)
  • Canton domain with PostGRES Database (Community/Enterprise)
  • Canton domain with Oracle Database (Enterprise)

For further reading on these integrations with Canton Core, please refer to the Canton Domains page.

I will make further enquiries about the potential use of Polygon and will update you as soon as I am able to.

1 Like

I meant to ask before: Is this the Polygon product that you were referring to?

I think it is, but please confirm for accuracy, thank you.

Hi @Ben_M ,
Thank you so much for the concise response.
The link you hard shared is exactly what I was talking about.
Thanks again :slight_smile:

1 Like

Hi @albertlog,

Sorry for the delay in replying but it took some time to get an accurate answer.

The supported integration of Canton Core & Ethereum is aimed to provide Enterprise Ethereum networks with proof that once a block is added to the blockchain it is considered final and cannot be reverted. This integration also features a group of validators who are authorized to create new blocks and validate transaction based on their identify or reputation within the network. This being the Proof of Authority (PoA) consensus.

Where as Polygon Technology uses the Proof of Stake (PoS) consensus where validators are chosen to create new blocks of validate transactions based on the amount of cryptocurrency that they hold or ‘stake’ in the network, and is accordingly unlikely to work with the Canton-Ethereum integration.