Deploy smart contracts on Quorum running RAFT consensus mechanism

Hi, Community… I’m trying to execute smartcontract deployment from openzeppellin sdk, and I getting an error when I try to execute any transaction on my quorum blockchain (created reproducing step by step this guide:
The problem seems to be related to Quorum because I can deploy and execute transactions without issues over other blockchain networks (ropsten and ganache, for instance). This is the error when trying to make just a transfer:

I asked first in Quorum Slack Community Channel and I found this:
This is a known bug on quorum raft consensus when working with unpatched web3.
We provide a patched fix, but I dunno how it would work in the context you are executing --OpenZeppelin is the context where I’m executing --. See this:
Also, if this is oz cli, you may be able to edit truffle config to fix it (

Any suggestion about how to implement this fix in openzeppelin sdk???
Finally: Is OZ supposed to provide support for Quorum running with raft consensus mechanism??, or more: is OZ supposed to provide support to any thing that is already supported on truffle or web3? … Quorum is supported ofcially by truffel, and am not sure if it’s correct to assume that it’ll work with OZ too.

Thanks in advance.

1 Like

Hi @rtraba,

Welcome to the community :wave:.

I had issues running Quorum on my computer today (due to some config issues with my environment) so haven’t been able to test using oz transfer.

I have previously deployed and interacted with a public contract on Quorum created using OpenZeppelin SDK, see the following topic:

There is an open issue to support private contracts:
Also an open PR to add this support:

Thanks @abcoathup for your comments… but
I’m not trying to execute private contracts. I’m using Quorum because of performance motivations, not for adding privacy features or transaction managers. In that sens, Quorum is theorically just a fork of Ethereum with a couple of modifications in geth code that enables different consensus mechanisms: raft and Istanbul. In fact the bug I faced is supposed to be only present when running on raft consensus (please consider this if you try to reproduce the issue).
A workaround would be running the blockchain configured for Istanbul consensus, but it’d require to start a fresh new blockchain from genesis block… not so affordable for production environment (not my case yet).

1 Like

Hi @rtraba,

I finally got an environment up and running
(I am using Windows Subsystem for Linux with docker:

I am running the 7 nodes example.

When running the default consensus Istanbul BFT, I can deploy and interact with a contract using Truffle and OpenZeppelin SDK.

When I switch to RAFT I wasn’t able to deploy a contract using truffle migrate nor oz create. I didn’t see anything different I needed to do config wise in the Truffle documentation for RAFT.

thanks @abcoathup I really appreciate your effort.

do you actually get " Error: Number can only safely store up to 53 bits "?

Nope, I didn’t see that too. That’s where comes to scene the Quorum web3 extension, it includes the fix for deploying on raft, please see this:
Do you think that quorum extension can be included/supported by OZ as a feature?
In general, it’s possible that there could be other reasons for supporting quorum.js integration in OZ out of the box, no just this bug on RAFT.

The answer to that question would be factor of decision to me, because I prefer to reduce the probability of using an infrastructure that needs to relay on independent components that could not be maintained or needs custom integration to stay compatible, in that case it would be better just to change consensus from raft to istanbul.

1 Like

Hi @rtraba,

I wasn’t getting anything specific as “Error: Number can only safely store up to 53 bits”.

I can now deploy a simple contract to Quorum (running RAFT consensus) using OpenZeppelin CLI and interact with it. It appears that the docker images have been updated. I suggest that you look to update and try the latest version.

Hi @rtraba,

Were you able to deploy using OpenZeppelin CLI to Quorum running RAFT consensus?

Hi @abcoathup, actually I didn’t try that again, I moved to Istanbul and things works fine there

1 Like