designitycom / web-services

Apache License 2.0
0 stars 0 forks source link

Reviews provided record types in Growth base #98

Open saberistic opened 11 months ago

saberistic commented 11 months ago

Description

Transactions with zero values for all pillars in the Airtable Growth Base are causing the Solana smart contract to fail with a panic. This issue results in failed transactions, preventing updates in Airtable, and causing the schedule processor to pick up and re-attempt the transactions.

Description

Transactions with zero values for all pillars in the Airtable Growth Base are causing the Solana smart contract to fail with a panic. This issue results in failed transactions, preventing updates in Airtable, and causing the schedule processor to pick up and re-attempt the transactions.

Error Details

[
"Program 97d8t22JenPAwR85PZEXvc4gkvtAMZR9Ct7xuY11a2X8 invoke [1]",
"Program log: Instruction: ReceiveScore",
"Program log: Calculating new score",
"Program log: Updating potential levels",
"Program log: potential levels:[0, 0]",
"Program log: Calculating next level",
"Program log: next levels:[1, 1]",
"Program log: check debug last_update:1658707200 level_wait:10520000 current_ts:1698188743 current_level:[2, 1] next_level:[1, 1]",
"Program log: panicked at src/ser/mod.rs:150:1",
"Program 97d8t22JenPAwR85PZEXvc4gkvtAMZR9Ct7xuY11a2X8 consumed 25407 of 200000 compute units",
"Program 97d8t22JenPAwR85PZEXvc4gkvtAMZR9Ct7xuY11a2X8 failed: SBF program panicked"
]

Steps to Reproduce

  1. Initiate a transaction with zero values for all pillars in the Airtable Growth Base.
  2. Observe the panic in the smart contract.

Expected Behavior

The smart contract should handle transactions with zero values gracefully, without panicking.

Additional Information

Impact

This issue impacts the reliability of the smart contract, leading to failed transactions and preventing updates in Airtable. It also triggers the schedule processor to re-attempt the transactions.

Possible Solution

Web services and contract both should mitigate this condition

Attachments

https://explorer.solana.com/address/97d8t22JenPAwR85PZEXvc4gkvtAMZR9Ct7xuY11a2X8

Reproduction Environment

Production

saberistic commented 8 months ago

https://github.com/designitycom/web-services/commit/d351a4290a48fee4e6acd56ab80d4bbd8f75285d this commit should address it, deploying it rn