Skip to content

Instantly share code, notes, and snippets.

View erwanor's full-sized avatar

Erwan Or erwanor

  • penumbra labs
  • montreal, quebec
  • X @erwanor
View GitHub Profile
@erwanor
erwanor / gist:89ae2afe1ac7b8c986308f85a2cc9d51
Created December 9, 2024 02:16
pd log - success channel
Dec 09 03:09:59 ohlone pd[2304329]: 2024-12-09T02:09:59.644249Z INFO abci:ProcessProposal{height=block::Height(1326864)}: penumbra_app::server::consensus: processing proposal height=block::Height(1326864) proposer=account::Id(EE2C43CB7940737B6E37073DBB52591B1DE0E5E7) proposal_hash=9F5847D6ED8ACF36C6DE22C9EF2D7B50E37185045D9CB0E5E4E7B42B0731BFBE
Dec 09 03:09:59 ohlone pd[2304329]: 2024-12-09T02:09:59.700880Z INFO abci:BeginBlock{height=1326864}: penumbra_app::server::consensus: beginning block time=Time(2024-12-09 2:09:54.453572828)
Dec 09 03:09:59 ohlone pd[2304329]: 2024-12-09T02:09:59.701591Z INFO abci:EndBlock{height=1326864}: penumbra_app::server::consensus: ending block height=1326864
Dec 09 03:09:59 ohlone pd[2304329]: 2024-12-09T02:09:59.750744Z INFO abci:Commit: penumbra_app::server::consensus: committed block app_hash=RootHash("e9bc938f247ee3899ae689c3b6d10ca0710bd827c44842c833ae0d82f97463a6")
Dec 09 03:10:04 ohlone pd[2304329]: 2024-12-09T02:10:04.755863Z INFO abci:ProcessProposal{height=block:
@erwanor
erwanor / gist:d781cebaa9ab6df44e6bb44f8b747eb7
Created December 9, 2024 02:15
Testnet <> Duke-1 - success
2024-12-09T02:09:02.137350Z WARN ThreadId(01) using in-memory view database for penumbra; consider setting 'view_service_storage_dir'
2024-12-09T02:09:04.148499Z INFO ThreadId(01) starting view service sync
2024-12-09T02:10:07.708665Z INFO ThreadId(01) view service sync complete sync_height=1326854
2024-12-09T02:10:09.272241Z INFO ThreadId(01) ibc grpc query clients connected
2024-12-09T02:10:09.272350Z INFO ThreadId(01) Creating new clients, new connection, and a new channel with order ORDER_UNORDERED
2024-12-09T02:10:10.917172Z DEBUG ThreadId(16) foreign_client.create{client=penumbra-testnet-phobos-2->duke-1:07-tendermint-0}:send_messages_and_wait_commit{chain=duke-1 tracking_id=create client}: sending 1 messages as 1 batches to chain duke-1 in parallel
2024-12-09T02:10:10.917502Z DEBUG ThreadId(16) foreign_client.create{client=penumbra-testnet-phobos-2->duke-1:07-tendermint-0}:send_messages_and_wait_commit{chain=duke-1 tracking_id=create client}:send_tx_with_account_sequence_retry{chain=duke-1 account
./build tx bank send noble1fataxvlt4f5m6aagmjypp80h3mkf72v7c8d9f7 noble1k89rs37w375qhmpvgu0smxm9v637ctyjxtq9tp 100uusdc
code: 111222
codespace: undefined
data: ""
events:
- attributes:
- index: true
key: fee
@erwanor
erwanor / unbonding_excerpt.rs
Created January 23, 2024 17:55
Unbonding excerpt
async fn unbonding_end_epoch_for(
&self,
id: &IdentityKey,
start_epoch_index: u64,
) -> Result<u64> {
let unbonding_epochs = self.get_stake_params().await?.unbonding_epochs;
let default_unbonding = start_epoch_index + unbonding_epochs;
let validator_unbonding =
@erwanor
erwanor / a.rs
Created September 25, 2023 20:36
/// Materializes the entire current validator set as a Tendermint update.
///
/// This re-defines all validators every time, to simplify the code compared to
/// trying to track delta updates.
#[instrument(skip(self))]
async fn build_tendermint_validator_updates(&mut self) -> Result<()> {
let current_consensus_keys: CurrentConsensusKeys = self
.get(state_key::current_consensus_keys())
.await?
.expect("current consensus keys must be present");
┌──────┐ ───────────┐
│ │ │
│ pd │ ◄───────┐ │
│ │ │ │
┌──┴──────┴────┐ │ │
│ tendermint │ │ │
└──────┬───────┘ │ │
│ fetch │ │
ws feed │ executions│ │
───────────────────┴──────────────┼──┼─────────
⋊> ~/p/p/c/c/c/dex on main ◦ cargo fix 12:27:13
warning: unused import: `async_stream::try_stream`
--> crates/proto/src/lib.rs:123:17
|
123 | use async_stream::try_stream;
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(unused_imports)]` on by default
warning: unused import: `futures::Stream`
@erwanor
erwanor / log.csv
Created June 29, 2023 13:30
`path_search` loop detour
We can make this file beautiful and searchable if this error is corrected: Illegal quoting in line 1.
:EndBlock{height=45227}:dex:handle_batch_swaps:route_and_fill: filled all input, exiting route_and_fill"
:EndBlock{height=45227}:dex:handle_batch_swaps:route_and_fill: filled along best path input=1000000 output=2426597 unfilled=0
:EndBlock{height=45227}:dex:handle_batch_swaps:route_and_fill:fill_route: returning swap execution of filled route swap_execution=SwapExecution { traces: [[Value { amount: 1000000, asset_id: pen }, Value { amount: 20000000, asset_id: test_usd }, Value { amount: 1000000, asset_id: pen }, Value { amount: 2426597, asset_id: gm }]], input: Value { amount: 1000000, asset_id: pen }, output: Value { amount: 2426597, asset_id: gm } }"
:EndBlock{height=45227}:dex:handle_batch_swaps:route_and_fill:fill_route:put_position{id=plpid1vhcjwcmz9egx8rwnxzadvaanx8en4v2jd8t8yw8mxsqkh5g7q72qmeca8t}: indexing position for 2=>1 trades
:EndBlock{height=45227}:dex:handle_batch_swaps:route_and_fill:fill_route:put_position{id=plpid1vhcjwcmz9egx8rwnxzadvaanx8en4v2jd8t8yw8mxsqkh5g7q72qmeca8t}: indexing positio
@erwanor
erwanor / response.json
Created June 28, 2023 03:10
`SimulateTrade` rpc hallucinations
{
"output": {
"traces": [
{
"value": [
{
"amount": {
"lo": "1000000"
},
"assetId": {
@erwanor
erwanor / fn_0.log
Created June 20, 2023 19:30
devnet 53.1 diverge logs between two penumbra full nodes
This file has been truncated, but you can view the full file.
abci:EndBlock{height=36066}:dex: key=b""chain/epoch_by_height/36066"" key_hash=KeyHash(""e1a88f12e2458f93987082a5c94a9cd04c3b9247a164b0ea5844e611cb96750b"")"
abci:EndBlock{height=36066}:dex:handle_batch_swaps: delta_1=402102 delta_2=0 trading_pair=TradingPair { asset_1: test_btc, asset_2: pen }"
abci:EndBlock{height=36066}:dex:handle_batch_swaps:route_and_fill: starting route_and_fill delta_1=402102 asset_1=test_btc asset_2=pen
abci:EndBlock{height=36066}:dex:handle_batch_swaps:route_and_fill:path_search{max_hops=4}: searching for path src=test_btc dst=pen max_hops=4
abci:EndBlock{height=36066}:dex:handle_batch_swaps:route_and_fill:path_search{max_hops=4}:path{start=test_btc}: beginning path
abci:EndBlock{height=36066}:dex:handle_batch_swaps:route_and_fill:path_search{max_hops=4}: relaxing active paths active_paths_len=1
abci:EndBlock{height=36066}:dex:handle_batch_swaps:route_and_fill:path_search{max_hops=4}:path{start=test_btc}: relaxing path degree=7 candidates=[gm, test_btc, test_usd, test_osmo, test_atom