gildlab / ethgild

Other
2 stars 3 forks source link

expiry time issue for certification #56

Closed thedavidmeister closed 3 weeks ago

ninokeldishvili commented 6 months ago

The issue is getting futureReferenceBlock error while trying to perform certification.

We have encountered an error related to the certification process specifically on the Arbitrum Sepolia network. Contract was deployed on several other test networks and this issue does not occur on any of the other networks but Arbitrum Sepolia

ninokeldishvili commented 6 months ago

I was having issue with certify test for the OffchainAssetReceiptVault. Error looked like this

[89287] OffChainAssetReceiptVaultTest::test_Certify() ├─ [74143] OffchainAssetReceiptVaultFactory::createChildTyped(ERC20PriceOracleVaultConfig({ priceOracle: 0x1804c8AB1F12E6bbf3894d4083f33e07309d1f38, vaultConfig: VaultConfig({ asset: 0x0000000000000000000000000000000000000000, name: "Asset Name", symbol: "ASSET" }) })) │ ├─ [9031] → new <unknown>@0x4f81992FCe2E1846dD528eC0102e6eE1f61ed3e2 │ │ └─ ← [Return] 45 bytes of code │ ├─ [250] ReceiptVault::createChild(0x) │ │ └─ ← [Revert] EvmError: Revert │ └─ ← [Revert] EvmError: Revert └─ ← [Revert] EvmError: Revert I managed to fix this error. wrote tests to check :

Certify

RevertOnZeroCertifyUntil

RevertOnFutureReferenceBlock

ninokeldishvili commented 6 months ago

Script for failing certification on Arbitrum Sepolia has been added env variable should be added before running the script for factory contract address. on arbitrum sepolia it would be: CONTRACT_FACTORY_ADDRESS=0xf1A14e96977E8dE295Ba9612691D127B157d1371

thedavidmeister commented 3 weeks ago

@ninokeldishvili @hardingjam as far as i can see, the future reference block error happens when the GUI passes in a block that hasn't happened yet, which means the only way to reproduce the bug is to send the wrong block in, which means this isn't a contract issue

most likely the issue is the RPC not calculating the block correctly, from the perspective of the contract

see https://docs.arbitrum.io/build-decentralized-apps/arbitrum-vs-ethereum/block-numbers-and-time#block-numbers-arbitrum-vs-ethereum

Screenshot 2024-11-11 at 18 19 36