My Experience with the FEVM DealRewarder
Table of contents
In this article, I will highlight my experiences with the Filecoin DealRewarder contract (DealRewarder.sol), including the installation of Lotus.
This will be a long blog entry, and it will also include things that didn't work, it's not a tutorial. The idea is that I will make a much shorter version as well, which will be more like a walkthrough.
This is the repository that I cloned:
https://github.com/filecoin-project/FEVM-Hardhat-Kit
For this to work, I had to install Lotus
Lotus installation
This is the documentation that I was following while installing Lotus: https://lotus.filecoin.io/tutorials/lotus/store-and-retrieve/set-up/
You will need GLIBC 2.34 or higher for this to work. I'm on a system where I'm working with VMs, I had a debian-9
system that was already up and running. Problem is, debian-9 uses GLIBC 2.24. I could easily install a debian-11 system on my computer, from a template, but debian-11 still only has GLIBC GLIBC 2.31, but I was not willing to accept this, because it would be too much complicated to get a debian-12 especially that I was not sure if that would work out-of-the-box (still not sure). You can see some information about glibc here. To see the version of GLIBC on your Linux, type ldd --version
.
REMEMBER! I was on a virtual machine that I've just spin up for this! Don't do this with a system that you need! (you will see the reason for this later)
So I was not willing to accept that debian-11 is not good. Next thing I did, I tried to install a parallel GLIBC according to this tutorial. Did not work out for me. After I failed with that, I added the following line to /etc/apt/sources.list
:
deb http://ftp.de.debian.org/debian bookworm main
By this, you are basically making your system think that it's debian-12
. This StackOverflow answer helped a lot.
sudo apt-get install libc6
And it worked! Typing ldd -version
now said that I have GLIBC 2.36.
ldd (Debian GLIBC 2.36-8) 2.36
Copyright (C) 2022 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by Roland McGrath and Ulrich Drepper.
At this point, I also installed build-essentials
and bison
, but I'm not sure if it was needed.
GLIBC is a very essential component of a Linux system, and in a lot of places they straight out say that it's not possible to upgrade it. Here you can see that debian-12 bookworm has GLIBC 2.36.
After this, I did the following steps:
mkdir lotus_downloader
sudo apt install -y hwloc
Find out which is the latest Lotus release, this is what I found: https://github.com/filecoin-project/lotus/releases/tag/v1.20.3
Get the latest release:
wget
https://github.com/filecoin-project/lotus/releases/download/v1.20.3/lotus_v1.20.3_linux_amd64.tar.gz
Extract:
tar -xvf lotus_v1.20.3_linux_amd64.tar.gz
Move the binary:
sudo mv lotus_v1.20.3_linux_amd64/lotus /usr/local/bin/lotus
Check lotus version:
lotus --version
Should give something like this:lotus version 1.20.3+mainnet+git.b332db0a3
Connect to remote full node:
FULLNODE_API_INFO=wss://
wss.hyperspace.node.glif.io/apigw/lotus/
lotus daemon --lite
So it shouldn't contain/rpc/v1
, not like how it is shown in Glif Nodes page. See this: https://github.com/filecoin-project/lotus/issues/10099Generate a new address:
lotus wallet new
See the list of addresses:
lotus wallet list
Backup your address:
lotus wallet export f1q7shwxwpc6eirbim7y2sr6et6ll7svgytdprr2i > main.key
Get some funds from Faucet: https://hyperspace.yoga/#faucet After this,
lotus wallet list
should show the new balance.
Now we can test adding a file through Lotus
I created a file with random data
dd if=/dev/urandom of=small-file.bin bs=1M count=100
Then I imported it to Lotus
lotus client import small-file.bin
My CID is bafykbzacebnganivehv3ctxspg3sqzghidesvlb3xudrxlmz25op3wpjf67aqI started the interactive deal process with
lotus client deal
We will need to copy-paste the Data CID, which we got by the previous step. It will ask for duration, in days, I gave in 360, and that's it, it will give us a Deal CID as a result:bafyreiff4zjwid4am3mh6l3s25uolbs2c5c7ca2gyj5uestatrvxmdv3rq
My piece size is 128MiB, I started with a 100MiB file.Check the state of the deal with:
lotus client list-deals --show-failed
. On Chain? isN
, Message:StorageDealPublishing
.
This is what I got:
2023-03-11T12:07:31.913-0500 INFO markets loggers/loggers.go:16 storage client event {"name": "ClientEventDealPublishFailed", "proposal CID": "bafyreiff4zjwid4am3mh6l3s25uolbs2c5c7ca2gyj5uestatrvxmdv3rq", "state": "StorageDealError", "message": "error validating deal published: decoding deal publish return: unsupported network version 21"}
I change deal duration to 180
Deal (f01129) CID: bafyreihovlucv3zfehcope6nl3p65m5v6ouffaef26ja5mob7eeftqtwbi
Now lotus client list-transfers
shows activity.
I also can see that the state of the Deal is StorageDealTransferring
with lotus client list-deals --show-failed
Same error
2023-03-11T12:29:02.709-0500 INFO markets loggers/loggers.go:16 storage client event {"name": "ClientEventDealPublishFailed", "proposal CID": "bafyreihovlucv3zfehcope6nl3p65m5v6ouffaef26ja5mob7eeftqtwbi", "state": "StorageDealError", "message": "error validating deal published: decoding deal publish return: unsupported network version 21"}
I tried to activate IPFS, find [Client] in ~/.lotus/config.toml nano ~/.lotus/config.toml
Same error with IPFS.
Now with some funds: lotus client deal bafkreifqkk5ghpobbob56lr576lijo2v4geie447z7ovvnu6c5enak4zdm t01129 0.00000001 518400
2023-03-11T13:11:17.422-0500 INFO storageadapter storageadapter/client.go:148 DEAL ACCEPTED!
2023-03-11T13:11:23.092-0500 INFO markets loggers/loggers.go:16 storage client event {"name": "ClientEventDealPublishFailed", "proposal CID": "bafyreihdbg7ln65vpe33raqku5lwf7432ccgbyzmsgveuelxorikokr34q", "state": "StorageDealError", "message": "error validating deal published: decoding deal publish return: unsupported network version 21"}
Lassie fetch
/home/user/go/bin/lassie fetch -o
big.car
-p bafyreihovlucv3zfehcope6nl3p65m5v6ouffaef26ja5mob7eeftqtwbi /home/user/go/bin/car extract --file
TheSun.car
-v -p TheSun.jpg
What the documentation does not mention, is that you will need to specify the full path for the newly installed go programs, or you would need to add them to the PATH.
I was running mainnet lotus instead of hyperspace. Thank you @TippyFlits!
Installing Lotus, take 2
git clone https://github.com/filecoin-project/lotus
cd ./lotus
git checkout v1.20.3-hyperspace-nv21
make clean hyperspacenet
Had to install 'jq'
# github.com/lucas-clemente/quic-go/internal/qtls
../../go/pkg/mod/github.com/lucas-clemente/quic-go@v0.29.1/internal/qtls/go120.go:5:13: cannot use "The version of quic-go you're using can't be built on Go 1.20 yet. For more details, please see https://github.com/lucas-clemente/quic-go/wiki/quic-go-and-Go-versions." (untyped string constant "The version of quic-go you're using can't be built on Go 1.20 yet. F...) as int value in variable declaration
make: *** [Makefile:92: lotus] Error 1
It turns out that you need a lower version of go to work with quic-go
.
I reinstalled go, to be version 18.0
Makefile:14: Your Golang version is go1.18.0 Makefile:15: *** Update Golang to version to at least 1.18.8. Stop.
This was too low. Reinstalled go to version go18.8
/usr/bin/ld: cannot find -lhwloc: No such file or directory
/usr/bin/ld: cannot find -lOpenCL: No such file or directory
collect2: error: ld returned 1 exit status
make: *** [Makefile:92: lotus] Error 2
I linked hwloc to /usr/lib/ld
sudo ln -s /usr/lib/x86_64-linux-gnu/libhwloc.so.15.6.1 /usr/lib/libhwloc.so
sudo ln -s /usr/lib/x86_64-linux-gnu/hwloc/hwloc_opencl.so /usr/lib/hwloc_opencl.so
The error message changed, now it is:
/usr/bin/ld: cannot find -lOpenCL: No such file or directory
collect2: error: ld returned 1 exit status
So it probably half-worked.
sudo ln -s /usr/lib/x86_64-linux-gnu/hwloc/hwloc_opencl.so /usr/lib/opencl.so
sudo apt-get install opencl-c-headers
sudo apt-get install opencl-1.2-html-doc
sudo apt-get install opencl-headers
This was useful, and also, this was very useful This was very useful.
ld -lOpenCL --verbose
This command will basically explain to you how the linker tries to open a shared object, in this case, lOpenCL
. It will say a lot of "attempt to open xyz ... failed", "attempt to open abc ... failed" You need to look up these locations, and look for a file that is very similar that what it is looking for, but with a number after the .so
extension. After this, construct a command that is similar to this:
sudo ln -s /usr/lib/x86_64-linux-gnu/libOpenCL.so.1 /usr/lib/x86_64-linux-gnu/libOpenCL.so
I think it worked.
Trying to start lotus again.
FULLNODE_API_INFO=wss://
wss.hyperspace.node.glif.io/apigw/lotus/
./lotus daemon --lite
ERROR: initializing node: starting node: could not build arguments for function "github.com/filecoin-project/lotus/node/modules/lp2p".StartListening.func1 (/home/user/lotus_installer/lotus/node/modules/lp2p/addrs.go:85): failed to build host.Host: could not build arguments for function "reflect".makeFuncStub (/usr/local/go/src/reflect/asm_amd64.s:28): failed to build lp2p.BaseIpfsRouting: could not build arguments for function "reflect".makeFuncStub (/usr/local/go/src/reflect/asm_amd64.s:28): failed to build dtypes.NetworkName: could not build arguments for function "reflect".makeFuncStub (/usr/local/go/src/reflect/asm_amd64.s:28): failed to build dtypes.AfterGenesisSet: received non-nil error from function "reflect".makeFuncStub (/usr/local/go/src/reflect/asm_amd64.s:28): genesis in the repo is not the one expected by this version of Lotus!
Most likely the old config folder is causing conflicts.
rm -r .lotus/
Generate a new wallet:
lotus wallet new
See the list of addresses:
lotus wallet list
Backup your address:
lotus wallet export f134amb3tackwmtgd7gqctxyp4pajm6qmcba5zunq > main.key
Get some funds from Faucet: https://hyperspace.yoga/#faucet After this,
lotus wallet list
should show the new balance.
Be careful not to use the old Lotus! Overwrite the binary:
sudo cp ~/lotus_installer/lotus/lotus /usr/local/bin
I followed this:
https://lotus.filecoin.io/tutorials/lotus/store-and-retrieve/store-data/ I changed the size of the data to 100 mb
dd if=/dev/urandom of=uploadable.bin bs=1M count=100
lotus client import uploadable.bin
For deal duration, I gave in 180, for miner: t01129 Check status with these 2 commands:
lotus client list-deals --show-failed
lotus client list-transfers
After some 10 or 20 minutes, I get
2023-03-12T05:34:32.364-0400 INFO markets loggers/loggers.go:16 storage client event {"name": "ClientEventDealPublished", "proposal CID": "bafyreigkv3dtvcm77aam5humncbhruhnykhjgnqnwefqm3uha7b4ucd2iq", "state": "StorageDealAwaitingPreCommit", "message": ""}
And lotus client list-deals --show-failed
now shows StorageDealAwaitingPreCommit
2023-03-12T05:40:34.207-0400 INFO markets loggers/loggers.go:16 storage client event {"name": "ClientEventDealActivationFailed", "proposal CID": "bafyreigkv3dtvcm77aam5humncbhruhnykhjgnqnwefqm3uha7b4ucd2iq", "state": "StorageDealError", "message": "error in deal activation: failed to set up called handler: on head changed error: called check error (h: 158841): failed to look up deal on chain: looking for publish deal message bafy2bzacecg6msfjxnuufx7ziwn7xtf2w6qxezxo4llmxdffzdieoq34ymyk2: not found"}
Now with IPFS! Enable IFPS. Restart everything.
lotus client deal bafkreifqkk5ghpobbob56lr576lijo2v4geie447z7ovvnu6c5enak4zdm t01129 0 518400
I previously added a file to the Deal Rewarder contract like this:
yarn hardhat add-cid --contract '0x3DB01CA19E472FA7d25Baa4D0e71026b69aD22aC' --piececid 'bafkreifqkk5ghpobbob56lr576lijo2v4geie447z7ovvnu6c5enak4zdm' --size '89495'
Now I try to claim the reward yarn hardhat claim-bounty --contract '0x3DB01CA19E472FA7d25Baa4D0e71026b69aD22aC' --dealid '1087'
I had an error which roughly says that the gas limit can't be predicted. UNPREDICTABLE_GAS_LIMIT
but it also says
reason: 'failed to estimate gas: message execution failed: exit 33, revert reason: Error(cid must be added before authorizing), vm error: message failed with backtrace:\n' +
I added gas options to the task:
const options = {
gasLimit: 1000000000,
maxPriorityFeePerGas: 2000000000
}
//send a transaction to call claim_bounty() method
transaction = await dealRewarder.claim_bounty(dealid, options)
Error: underlying network changed (event="changed", network={"chainId":21,"name":"unknown"}, detectedNetwork={"chainId":3141,"name":"unknown"}, code=NETWORK_ERROR, version=providers/5.7.2)
21 is the same number as with the lotus error, when we were in the wrong network.
I don't know why the underlying network changed. I didn't tell it to change.
I removed maxPriorityFeePerGas
const options = {
gasLimit: 1000000000,
//maxPriorityFeePerGas: 2000000000
}
yarn hardhat claim-bounty --contract '0x3DB01CA19E472FA7d25Baa4D0e71026b69aD22aC' --dealid '1087'
Claiming Bounty on network hyperspace
Complete!
Done in 8.14s.
And I can repeat this how many times I want.
Claiming Bounty on network hyperspace
Complete!
Done in 6.98s.
It does not seem like that money went out to anywhere: https://hyperspace.filscan.io/address/general?address=0x3DB01CA19E472FA7d25Baa4D0e71026b69aD22aC
And I didn't receive money in Lotus.
Now I'm making a deal that is not free:
lotus client deal bafkreifqkk5ghpobbob56lr576lijo2v4geie447z7ovvnu6c5enak4zdm t01129 0.000001 518400
I'm trying to claim again:
yarn hardhat claim-bounty --contract '0x3DB01CA19E472FA7d25Baa4D0e71026b69aD22aC' --dealid '1092'
UND_ERR_HEADERS_TIMEOUT
Try again!
Claiming Bounty on network hyperspace
Complete!
Done in 6.43s.
The contract will not give error even if we pass in a non-existent dealid.
Filscan is not a good explorer for this. Filfox is better.
I modified the size to 128 KB.
This is very useful: https://gist.github.com/aashidham/2534a39ac3d1f8f1ae8c85e2fc6177f1
I put the SmilingSun image into a CAR file
lotus client generate-car /home/user/Lotus/original_SmilingSun /home/user/Lotus/sun.car
Full path was important. You will probably get errors with a relative path.
Generate info lotus client commP
sun.car
>> PieceCID.txt
yarn hardhat add-cid --contract '0x3DB01CA19E472FA7d25Baa4D0e71026b69aD22aC' --piececid 'baga6ea4seaqid2ai2ziysobfzjojvghijcq2vjk3reesvwrbhf7t2xvxxmdmwla' --size '130048'
I crashed my system with trying to install additional packages (namely LibreOffice). It's not that much of a good idea to mess with GLIBC after all. I can't give you a proper advice, but I think, if you would really need it, it would be possible to do the thing that I've done here, but you have to be really careful, for example, in my example, the problem was that it auto-removed a package the next time I run apt
, and that package was essential for the VM to connect to the frame OS. So, in theory, this could work, but you are really playing with fire here, don't do it! Except, if you like adventures, or if you really have to, for example, because you have to install Lotus to a specific machine, and that machine happens to be debian-11
for example. In this case, if this is a VM, I would clone the VM first.
Installing Lotus on Fedora
After the crash I was a bit upset, but then I realized that I also have a Fedora template available, so I headed to install Lotus on Fedora 36
. Fedora 36 has ldd (GNU libc) 2.35
by default.
Useful: https://www.pragmaticlinux.com/2022/05/how-to-install-build-essential-on-fedora/
Commands that I run for dependencies:
sudo dnf install golang
sudo dnf install rust cargo
sudo dnf check-update
sudo dnf upgrade
dnf group list --hidden # Not needed, just a test
dnf group info "C Development Tools and Libraries" # also just a test
sudo dnf group install "C Development Tools and Libraries" "Development Tools"
sudo dnf install cmake
Then:
git clone https://github.com/filecoin-project/lotus
cd ./lotus
git checkout v1.20.3-hyperspace-nv21
make clean hyperspacenet
Needs rustup
, this is the error
+ echo '[build_from_source] Error: rustup is not installed.'
[build_from_source] Error: rustup is not installed.
+ echo '[build_from_source] install Rust toolchain installer to resolve this problem.'
[build_from_source] install Rust toolchain installer to resolve this problem.
Useful article: https://snapcraft.io/install/rustup/fedora
sudo dnf install snapd
sudo ln -s /var/lib/snapd/snap /snap
sudo snap install rustup --classic
Stuck at qtls
, I don't know why:
go: downloading github.com/marten-seemann/qtls-go1-19 v0.1.0
Restarted the command.
go build go.opencensus.io/metric: write /tmp/go-build438240977/b1521/importcfg: no space left on device
Because /tmp is a separate partition, and its size is 1 GB. At first glance, you would think that you still have space, but you don't.
sudo mount -o remount,size=5G /tmp/
After this, I get this error:
/usr/lib/golang/pkg/tool/linux_amd64/link: running gcc failed: exit status 1
/usr/bin/ld: cannot find -lhwloc
/usr/bin/ld: cannot find -lOpenCL
sudo dnf install hwloc
ln -s /usr/lib64/libhwloc.so.15 /usr/lib64/libhwloc.so
One of the errors went away:
/usr/lib/golang/pkg/tool/linux_amd64/link: running gcc failed: exit status 1
/usr/bin/ld: cannot find -lOpenCL
sudo dnf install intel-opencl
I used the ld
and find
commands to figure out where the file is located, and where the compiler is looking for it.
sudo ln -s /usr/lib64/libopencl-clang.so.14 /usr/lib64/libopencl-clang.so
./lotus: symbol lookup error: ./lotus: undefined symbol: clEnqueueReadImage
This was very helpful: https://www.codeweavers.com/support/wiki/Diag/missinglibopencl
sudo dnf install ocl-icd.i686 ocl-icd.x86_64
sudo ln -s /usr/lib64/libOpenCL.so.1.0.0 /usr/lib64/libOpenCL.so
This worked! Now I have lotus again.
FULLNODE_API_INFO=wss://
wss.hyperspace.node.glif.io/apigw/lotus/
lotus daemon --lite
Generate a new address:
lotus wallet new
See the list of addresses:
lotus wallet list
Backup your address:
lotus wallet export t1hk5pmvjthtxldhcdgmsqs2snadk52m4kteomoky > main.key
Get some funds from Faucet: https://hyperspace.yoga/#faucet After this,
lotus wallet list
should show the new balance.
# Generate CAR file
lotus client generate-car /home/user/SmilingSun.jpg /home/user/sun.car
# Get the PieceCID based on that CAR file, this is what the DealRewarder needs. Inside this file, we will find the size as well.
lotus client commP sun.car >> PieceCID.txt
# Add the CID to the contract, so BountyHunter can claim reward. We are the BountyHunter.
yarn hardhat add-cid --contract '0x3DB01CA19E472FA7d25Baa4D0e71026b69aD22aC' --piececid 'baga6ea4seaqid2ai2ziysobfzjojvghijcq2vjk3reesvwrbhf7t2xvxxmdmwla' --size '130048'
Now we are where we were before the system crash.
2023-03-12T17:34:03.071-0400 INFO storageadapter storageadapter/client.go:148 DEAL ACCEPTED!
2023-03-12T17:34:05.779-0400 INFO markets loggers/loggers.go:16 storage client event {"name": "ClientEventDealPublished", "proposal CID": "bafyreigd6prapkkcll5ya2zej7zx2ceakeze4fh4lhvy7aioxpv5tkc4y4", "state": "StorageDealAwaitingPreCommit", "message": ""}
found dealIdx 0
I'm trying to claim bounty:
hardhat claim-bounty --contract '0x3DB01CA19E472FA7d25Baa4D0e71026b69aD22aC' --dealid '1107'
2023-03-12T17:40:09.103-0400 INFO markets loggers/loggers.go:16 storage client event {"name": "ClientEventDealActivationFailed", "proposal CID": "bafyreigd6prapkkcll5ya2zej7zx2ceakeze4fh4lhvy7aioxpv5tkc4y4", "state": "StorageDealError", "message": "error in deal activation: failed to set up called handler: on head changed error: called check error (h: 160280): failed to look up deal on chain: looking for publish deal message bafy2bzaceao2wkxyivftpasp3kugqpylvk35k2q4h7hnej7ijf7xh6gubkdzi: not found"}
The contract would send 1 FIL to the entity that created the deal, not the account that is calling the contract.
This is what Lotus says:
2023-03-12T18:27:01.948-0400 INFO graphsync responsemanager/server.go:316 graphsync response processing complete (messages stil sending) {"request id": "e1337d01-dfb5-4abe-b9ee-65fd5a7d3f1e", "peer": "12D3KooWRUeeh76B16pi54wr8RZQAZv9wVbRiJFGVfLNnzwxCbkr", "total time": 0.061933833}
2023-03-12T18:27:01.962-0400 INFO dt-impl impl/events.go:315 channel 12D3KooWD6SQSckYZnqvLBncbmdYainFA4iZCF2DhizXJoRSGkwk-12D3KooWRUeeh76B16pi54wr8RZQAZv9wVbRiJFGVfLNnzwxCbkr-1678655444764537621: transfer initiated by local node is complete
2023-03-12T18:27:02.191-0400 INFO dt-impl impl/events.go:205 received complete response {"chid": "12D3KooWD6SQSckYZnqvLBncbmdYainFA4iZCF2DhizXJoRSGkwk-12D3KooWRUeeh76B16pi54wr8RZQAZv9wVbRiJFGVfLNnzwxCbkr-1678655444764537621", "isAccepted": true}
@f8-ptrk says that these deals are active, see this thread on Slack. But the claim function fails https://hyperspace.filfox.info/en/message/bafy2bzaceaz7sae6ztfhm4kmqh6or272tzs47y7hpqjne5z4namtmgm6o3jj2
(Unrelated to the failure) It turns out that I'm paying a very high overestimation penalty, because I'm trying to solve the problem by sending a very large amount of gas. I end up paying ~1.5 FIL every time I invoke a function on the contract.
I can see this error:
...
reason: Error(data size must match expected)
...
somewhere inside the big error message that claim-bounty gives So the CID is added, and we pass MarketAPI call as well.
Now I'm getting a new error, but even for add-cid
Claiming Bounty on network hyperspace
An unexpected error occurred:
ProviderError: cannot parse block param: pending
at HttpProvider.request (/home/user/FEVM/new_hardhat/node_modules/hardhat/src/internal/core/providers/http.ts:88:21)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at EthersProviderWrapper.send (/home/user/FEVM/new_hardhat/node_modules/hardhat-deploy-ethers/src/internal/ethers-provider-wrapper.ts:13:20)
I tried loading the contract into Remix. It is possible to load a contract into Remix from Github, in File Explorer (the top icon on the left) you need to open the drop-down, with the hamburger icon, then you click "Clone", this is the repository you need to import: https://github.com/filecoin-project/fevm-hardhat-kit/
I tried to broadcast a lot of transactions... like 20. Most of them failed, but some got through, so most likely the Hyperspace network is not completly stable at the moment. I also changed the gas limit, but I think in the end the transaction that went through did not have a much higher gas. I have SysErrorOutOfGas
and SysErrContractReverted
errors as well. So 6 million gas should be fine.
It's possible to point Remix to the already deployed contract, but you still need to compile it before that.
I modified the contract with some events, so I forked the repository, and added my changes there, so I can import the current version to Remix. https://github.com/ottpeter/fevm-hardhat-kit-with-events
It's very important to switch to MetaMask under ENVIROMENT
, even if it is already, selected, otherwise you will get Invalid account selected
error.
The claim-bounty
uses more gas than the other function, I still got "Out of gas" error at 15 million gas. But at 21 million gas I got another type of error.
message failed with backtrace: 00: f024392 (method 3844450837) -- contract reverted (33) (RetCode=33)
18 million gas is not enough. 19 million seems to be enough.
Indeed, you can see in Filfox how much gas was actually used. 18,427,414 In comparision, add-cid used 6,485,414.
Getting lot of the above error.
Tried to redeploy as well.
Now a transaction went throgh, but I don't understand why I'm not seeing logs, I don't understand why is that nothing happened.
(next day)
I needed to do a git pull
, and merge afterwards. Now I have the same error as yesterday.
Error(data size must match expected)
@Zak Ayesh gave me the advice to do git pull
and he was also able to give me the correct data size. The data size should be 131072 according to MarketConsumer.
Now the essence of the error message is
reason: 'failed to estimate gas: message execution failed: exit 33, revert reason: 0x8f0f420600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000de0b6b3a7640000, vm error: message failed with backtrace:\n' +
NOTE: Filfox will not show the require
error messages, the console will show them. It would be good if we would see the require
error messages in Filfox.
At this point I'm stuck. But, I was able to create a deal with the DealClient, about which I'm really happy. But that's not the topic of this article.
Probably I will finish this article when I can pay out bounty with DealRewarder
, and I will probably write a shorter version of this article, which will highlight what should you do if you want this to work. So that's it for now. Cheers!
Bye!
Subscribe to my newsletter
Read articles from Peter Ott directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by