sui icon indicating copy to clipboard operation
sui copied to clipboard

Remove events from effects after hard-coded epoch

Open mystenmark opened this issue 2 years ago • 6 comments

Short term hack after discussion with @lxfind to hopefully remove events from effects entirely, but without effecting indexing on fullnode.

@gegaowp / @patrickkuo can you please confirm this won't impact indexing?

mystenmark avatar Jan 30 '23 23:01 mystenmark

The latest updates on your projects. Learn more about Vercel for Git ↗︎

4 Ignored Deployments
Name Status Preview Comments Updated
explorer ⬜️ Ignored (Inspect) Jan 31, 2023 at 10:17PM (UTC)
explorer-storybook ⬜️ Ignored (Inspect) Jan 31, 2023 at 10:17PM (UTC)
frenemies ⬜️ Ignored (Inspect) Jan 31, 2023 at 10:17PM (UTC)
wallet-adapter ⬜️ Ignored (Inspect) Jan 31, 2023 at 10:17PM (UTC)

vercel[bot] avatar Jan 30 '23 23:01 vercel[bot]

LGTM. How do you plan to test that this works?

lxfind avatar Jan 30 '23 23:01 lxfind

IIUC perpetual_tables.executed_effects will not contain any events after this change? This might break Rosetta as it is relying on the CoinBalanceChange events from sui_getTransaction to record all balance changes.

can we keep the CoinBalanceChange event instead of clearing all events?

patrickkuo avatar Jan 30 '23 23:01 patrickkuo

LGTM. How do you plan to test that this works?

So far, I reverted https://github.com/MystenLabs/sui/commit/b4f9b1c14c5d71c1432bda3b084ed8afae7194f1 and then ran:

RUST_LOG=info CHECKPOINTS_PER_EPOCH=30  SIM_STRESS_TEST_DURATION_SECS=100 RUST_BACKTRACE=1 SIM_STRESS_TEST_NUM_VALIDATORS=4 USE_MOCK_CRYPTO=1 cargo simtest   --no-capture | grep epoch

And verified that the epoch is able to advance past 3.

We probably need to do a test deploy of this to private testnet though if we really want to be confident.

mystenmark avatar Jan 31 '23 00:01 mystenmark

IIUC perpetual_tables.executed_effects will not contain any events after this change? This might break Rosetta as it is relying on the CoinBalanceChange events from sui_getTransaction to record all balance changes.

can we keep the CoinBalanceChange event instead of clearing all events?

Sure - I want to confirm rosetta is necessary for testnet though? We will never merge this change to main.

mystenmark avatar Jan 31 '23 00:01 mystenmark

IIUC perpetual_tables.executed_effects will not contain any events after this change? This might break Rosetta as it is relying on the CoinBalanceChange events from sui_getTransaction to record all balance changes. can we keep the CoinBalanceChange event instead of clearing all events?

Sure - I want to confirm rosetta is necessary for testnet though? We will never merge this change to main.

Yes Coinbase is testing on Testnet

patrickkuo avatar Jan 31 '23 00:01 patrickkuo