Compare commits

...

10 commits

Author SHA1 Message Date
e7f7eb6aaf
laconversacion 2025-07-19 21:20:46 +02:00
da227df459
motoko 2025-07-17 15:37:08 +02:00
aacd491632
stuff 2025-07-17 10:40:21 +02:00
03785ed953
stuff 2025-07-16 11:12:56 +02:00
1546e0d31a
stuff 2025-07-15 16:49:51 +02:00
006e0f8113
galoy stuff 2025-07-06 22:17:06 +02:00
b2f76d0d58
backup vw 2025-07-01 10:49:05 +02:00
cf6fdcc9ad
stuff 2025-06-30 20:15:07 +02:00
3bc34af589
stuff 2025-06-29 11:57:50 +02:00
3805399476
typo 2025-06-15 20:29:27 +02:00
37 changed files with 7046 additions and 1 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 168 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 567 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

View file

@ -0,0 +1,27 @@
-----BEGIN RSA PRIVATE KEY-----
MIIEpAIBAAKCAQEA3t5YfpxuObwouMjqrYDwXz5XMSY6db3BcVX2lgkiwFTDdj7k
bybLG4gm26Jt+rUSBW6YhOmSbEcQ/dxzDEm+10/vFi83H27LuFsd0m2yvaM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EUiyzeJ1zacOeF/xrs8K9HFHo
lKKD340SHPAZCJ2gZcQFpmECgYAfj+e+RIAhpWKhU6oAUPQNmVXqdJEkiaDE2MpO
a03e43c5KfQKJ+7SVdoKRWoHiQzxo7AiF9/9JogHFGyj/f0K8z1cjrPuStMDSXA1
37+849nJywomUiFYHAiO6cENNuFZ0qUkazLgqjW2e4zOpljtpxwdWZrUwAHQkl4J
v3+5wwKBgQCjpiz9d7YumBdCRR2txJARRE7dB85KAdhGIvsVYvsqHszao/DqkdiH
B38Gow/txVJRhEj9yV6nBUhoDZT3/RG89/t3u4c4F5kfBdLuQ/KGLpTse+/7P/5r
t0Cz6vKjjVFoMnyEg6ILEnH5IRLN1uBENtH90JH61sfUX7wwXBbPRg==
-----END RSA PRIVATE KEY-----

View file

@ -0,0 +1,9 @@
-----BEGIN PUBLIC KEY-----
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA3t5YfpxuObwouMjqrYDw
Xz5XMSY6db3BcVX2lgkiwFTDdj7kbybLG4gm26Jt+rUSBW6YhOmSbEcQ/dxzDEm+
10/vFi83H27LuFsd0m2yvaM+h+6b3+5T40uHfJld01FYBEj/BVBACYSekE6BEg0a
d+5CS4Y7Mxn4/vAkGNJM6CNCoBzs4jrrjeYimBxdS7Si9xl5WlXq8LJQz5Qhy4LJ
J7aPgtXEmJYLOXLS2Iwv9IJwmV+OC6sAAcaPxJ3umnyiIXD8KKwIkM2Ydu+6lqP8
ogPfcYcQpLut6wCiJTAjGDi41jWGgHg5aeyzn68lMAaq5vwfPAbrEDlXbxmAyR1n
CwIDAQAB
-----END PUBLIC KEY-----

File diff suppressed because one or more lines are too long

Binary file not shown.

94
early_galoy/starting.md Normal file
View file

@ -0,0 +1,94 @@
# Starting at Galoy
- My notes when starting at Galoy, since I still don't have access to some company system where I can keep this.
## Accounts setup
- Nicolas asked me to create a Keybase account. This is it: https://keybase.io/pablomartincalvo.
- Next, I had to dowloand the keybase app. I followed these instructions: https://keybase.io/docs/the_app/install_linux
- Next, I verified my email.
- I bought two Yubikeys to use with my accounts. The exact model is Yubikey 5C NFC. The invoice is attached in this folder.
- I tried adding to my personal gmail account. Simple enough.
- I also checked my old mini yubi from Marcel that I've never used. The pin is slightly bent, but it still works. I'll add it as well, it shouldn't hurt.
- now, for the galoy account
- pwd undisciplinedkoalasrompenpiernas1984 got to put this in bitwarden
- I added all three keys to this account, so I can log in with any of the three. I'll have satoki at home, nakaki at transforma, and xiki on me.
## Creds
Keybase, associated to pablomartincalvo@gmail.com
pablo@galoy.io, with the three yubikeys
## Stuff to do
Requests from Nicolas:
- whenever you find an hour or 2, could you go to https://app.drata.com/, login with your galoy.io email, and review and aknowledge our policy?
- [X] Send details of one old colleague for a background check
- Make an onboarding checklist
- Find out what are everyone's timezones
## Checklist
- Access and accounts
- Get a pair of Yubikeys to secure your accounts with 2FA
- Get a @galoy.io account (ask Nicolas)
- Get added to the Galoy team in Keybase (ask Nicolas). If you don't have an account, you should create it yourself.
- Plus, drop by the #general channel and introduce yourself
## My first topics list
- People
- App
- Systems
- Docs
- Repos
- Ways of working
- Build an onboarding checklist
Morning morning Justin
I was jotting down some notes ahead of the 21st, thinking about my onboarding and what stuff needs to be done. I have a few bullets, which hopefully we can merge with what you had in mind so I can hit the ground next monday with some clarity.
- Regarding people:
- I'm tempted to say Galoy is small enough that I should probably just try to grab a coffee with everyone... if you have a different vision and think I should go for a short-list of colleagues instead, please let me know.
- Do we have a list of the timezones for each person?
- Jose already reached out offering himself to give me a tour around the data side of things. I'll book that on Monday unless you think we should use that time for other things first.
- Regarding accesses and tooling:
- Do you have any list of apps/systems/etc I should get access for?
- Same for whatever tooling you consider a must for our work.
- Regarding docs, do we have any specific place for documentation outside of whatever can be found in the Github repos?
- About next monday... should we go ahead and block some time to chat and get started?
- Anything else you thing we should cover before the 21st?
I have a gazillion more detailed questions... but I don't want to bombard you already if we will just chat next monday (unless you would prefer the wall of questions).
BTW, I don't know if we already have some kind of onboarding page/checklist. If not, I'll take the chance that I'm seeing everything with fresh eyes so that we can use that with the next person who comes around. If there's, I'll just update whatever is missing outdated.
Thanks
### Call with Justin
- Access to galoy-devs on github
- There's an onboarding repo
- Just call on monday
## Equipment
| Item | Price | Rationale |
|------------------------------- |---------: |-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 2 Yubikeys (already bought) | 156.68€ | Required for MFA. |
| 4TB HDD + SATA to USB adapter | ~100.00€ | For laptop full disk backups. I want to avoid having to set everything from scratch in case of loss or failure. |
| 16Gb SODIM RAM stick | ~50.00€ | To upgrade laptop from 16gb to 32gb. When doing the technical test, compiling the project put my 16gb under pressure. I think an upgrade will payback nicely in terms of experience. |
| Decent USB Mic | ~50.00€ | For my coworking space, which might get a bit noisy at times. |
| Extra HDMI Port for laptop | ~32.00€ | I have everything I need for dual external monitors, except for an extra HDMI port in my laptop. |

View file

@ -0,0 +1,31 @@
# Ubuntu reinstall
Things I need to move from one device to another.
- [X] ssh keys
- [X] gpg keys
- gpg --export-secret-keys > secret-backup.gpg
- gpg --import secret-backup.gpg
- [X] bisq data folder
- contents go in `.local/share/Bisq`
- [X] firefox data
- `.mozilla` folder in home
- [X] accounting files
-
- [X] Entire home dir? it's just ~250gb.
- [X] sparrow files
- [X] bitcoin wallet file
- [X] music
Stuff I'll need to install on the clean os:
- vscode
- bitwarden
- bisq
- gnucash
- drata agent
- inkscape
- element
- sparrow
- bitcoin knots
- telegram
- keybase

View file

@ -0,0 +1,29 @@
* I must make a list with all my positions from Indexa and Bankinter to understand which ones makes more sense to leave as collateral in Myinvestor so I minimize tax gains should I have to sell my free positions.
* Regarding where to place them once I move them into myinvestor, this fund seems good:
+ Fidelity MSCI World Index Fund P-ACC-EUR - IE00BYX5NX33 - https://newapp.myinvestor.es/app/explore/investments/funds/IE00BYX5NX33
* As to the loan itself, three options depending on risk appetite:
+ Low risk
- Principal: 20K€
- Collateral: 10K€
- APR: 5.38%
- Term: 8 years
- Installment: 255.59€
- Raises DE to: 11% to 15%
- Raises PI to: 18% to 24%
+ Medium risk
- Principal: 40K€
- Collateral: 20K€
- APR: 5.38%
- Term: 8 years
- Installment: 511.17€
- Raises DE to: 11% to 19%
- Raises PI to: 18% to 30%
+ High risk baller move
- Principal: 60K€
- Collateral: 30K€
- APR: 5.38%
- Term: 8 years
- Installment: 766.76€
- Raises DE to: 11% to 23%
- Raises PI to: 18% to 37%

1039
hojas/20250630.md Normal file

File diff suppressed because it is too large Load diff

View file

@ -129,6 +129,92 @@ First bits I'll explore before moving on:
* Getting the environment working.
* Run the tests.
* Get more familiar with the user events and how schemas are defined and used in the repo.
* Get more familair with how the tests are written.
* Get more familiar with how the tests are written.
I'll clear those first and then take it from there.
### First steps: getting env running and doing a bit of research
#### Run the env
* Installing nix and running the dev shell was smooth, no hiccups.
* Running the dev deployment and the tests that seed some data also worked fine. I can reach the pg from the host. I see there are three different postgres instances and I'm accessing the `core-pg` one.
* I can see events in the tables, so we're all set.
#### The existing data
* There are two relevant tables: `core_users` and `core_users_events`. The first one is the aggregate current state snapshot, the other one contains the individual events.
* About `core_user_events`:
+ The PK is the id (which is FK to the `core_users` id) and the sequence.
+ It shows the `event_type` in a column and has the event details in JSONB in `event`.
+ It only has one timestamp called `recorded_at`.
* About `core_users`:
+ The PK is the user id.
#### Make sense out of the repo
* The user entity is defined in `core/access/src/user/`.
* I deduced there can be four events:
+ `Initialized`
+ `AuthenticationIdUpdated`
+ `RoleGranted`
+ `RoleRevoked`
* There is a schema definition file at `lana/entity-rollups/schemas/user_event_schema.json`.
+ It holds definitions for all four events, including the fields, their data types and which fields are mandatory. It also specifies which value of the (event)`type` enum they can hold, which tells apart what is the event.
+ There's a common subobject to all four events called `AuditInfo`. This is defined separately and referenced in each event's schema.
+ Looking at other schemas beyond the `user` ones, it seems the `AuditInfo` bit is repeated in all of them. I'm wondering why there isn't a common definition across all of them? I would guess maybe nesting another level of file referencing is a hassle with the tooling we are using.
* I've managed to run unit and e2e tests using the readme instructions. I decided to not run the app tests since that seems quite outside my current scope.
* That was nice and magic, but how they work? I'm going to take a look at the make file.
* I couldn't make sense of unit tests, so I jumped into the e2e because I think they are more relevant for the task.
* I could easily find all the tests are defined in the `bats` folder as this collection of bash scripts with reference to some common bits on the `helpers.bash`. The one that seems to be dealing with users is called `superuser.bats`.
* The test basically interact with lana via `curl`-ing the graphql. It creates users and after checks that they have the right properties.
* I want to dig deeper and check whether the graphql API is reading from the rolledup aggregates (I'm assuming that's the case). If so, I guess my code could make a new aggregate and I could include in my PR extending the e2e tests to test I'm rolling up things properly.
+ Okay, there's this file in `lana/admin-server/src/graphql/schema.rs` that has a monster object called **`mutation`******
+ It uses a macro called `exec_mutation` defined in `lana/admin-server/src/graphql/macros.rs`. It seems to be a chokepoint for persistence.
+ The file `repo.rs` in `lana/core/access/src/user/` defines the `User` entity and its columns. Seems like a duplicate from the JSON schema I found earlier? Perhaps that JSON schema gets generated from this code?
- Right, I found this recent PR in `es_entity`: https://github.com/GaloyMoney/cala/pull/444/files
- It makes `es_entity` generate JSON Schema from the defined entities.
+ It all uses `es_entity`, Justin's own Event Sourcing framework (lol I'm so out of my league here) (https://github.com/GaloyMoney/cala/tree/17060a3157b879a40676dc381cdba30e7b5a0010/lib/es-entity).
+ I can't make sense of how the entity table gets filled in.
* `lana/admin-server/entity-rollups/src/main.rs` is a script that updates the json schema files.
+ It looks for breaking changes in the schemas when it runs and cancels the writting of the schemas if a breaking change is detected.
+ The script can be executed by calling the `update-schemas` command defined in the Makefile.
* It's funky because there is one migration file that defines all aggregate and event tables. And it definetely doesn't look auto-generated. Could there be all of these house of cards in Rust, and then you need to manually make things match on Postgres by rolling the table definition yourself? I'm going to look at the git blame of the file to check past PRs and confirm.
* ChatGPT told me whenever one of the aggregates/entities gets mutated, the current code updates atomically the snapshot and the events table. So the app is kind of playing event sourcing and traditional normalized CRUD model at the same time. Now I'm kind of getting a hunch on why Justin is interested in doing the rollups in Postgres.
### Action time
Okay, I've fucked around a decent bit around the repo. Time to shoot a bit or I'll go crazy.
High level overview of milestones:
* Build the naive rolling up of the user events
+ Add the target table in a migration
+ Add the trigger and function
+ Piggy ride the bats test to check that my rollup works as intended
* Generate the `CREATE TABLE` statement for the rollup dynamically from the existing definitions in the repo instead of hardcoding it.
* Generate the trigger function dynamically from the event definitions.
* Think on how this could be generalized to other events.
* Think on how to deal with the evolution of aggregates and events
+ New event to modify initially immutable property
+ New fields
+ Breaking changes?
Issues:
* No strict definition of the entity itself. Fields must be derived from events and what they perform.
* I see you guys don't have a `role` column in `core_users` because the code itself doesn't do stuff
A few notes during execution:
* I'm assuming a user can only have one role. Would do things differently if roles where stackable.
* I'm also assuming that revoking a role leaves the user with no role and also that it doesn't require specifying the role to be revoked, as I see in `lana/app/tests/user.rs/` `bank_manager_lifecycle`.
+ Which is kind of confirmed in the tests in `core/access/src/user/entity.rs`.
+ Even though the definition of the `UserEvent` enum in the same file does mention that `RoleRevoked` does require a `RoleId`. So does the `user_event_schema.json` entry for the event (which makes sense since that JSON is derived from `UserEvent` in the first place).
+ This seems to confirm you don't want to have to specify an ID when revoking, even though what I find in the code is sort of contradictory: https://github.com/GaloyMoney/lana-bank/pull/2094
### Later / to-dos
* It would be worth looking at the staging layer of the dbt project to understand how these event aggregates are being integrated right now into Bigquery.
+ Sometimes they get the events, sometimes they get the aggregate, sometimes they get both.

View file

@ -0,0 +1,41 @@
On 2025-06-21 I received the following offer from Justin:
> $80k annual cash salary
> 16000 shares of stock options
> * vested over 4 years
> * 1 year cliff
> * at current evaluation that is ~$27k/year in equity
> * ~0.3% of the co (5m shares)
> starting as soon as possible.
Now I want to clarify and negotiate.
---
Hi Justin,
As promised, find below my questions:
* Regarding formalizing things, I was wondering if you guys are planning on setting up a contract to define the business relationship. I'm really not experienced on this, so happy to review any proposal you guys might have and take it from there.
* Regarding the stock options, could you send me a copy of the paperwork? Doesn't need to be the final one to sign if that's any trouble, the generic template should be fine since I just want to understand it.
* Regarding IT equipment, would you guys expect me to bring my own stuff or do you supply that?
* About payments:
- Do you guys do BTC? USD? Mix?
- Do you do monthly frequency or work differently?
* In my first conversation with Nicolas he mentioned that it would probably be useful for me to get involved in some of the projects with the Salvadorian regulators and that could entail some travelling to ES. I told him I wouldn't mind (actually, I would love!) to drop by there, but I would like to discuss on the total time/length of the trips to make sure we manage expectations. So... what are your expectations on this?
* What are your policies on vacation days, pat. leave, sick leave, etc.
On the offer itself, I would like to give you some feedback after (1) some of the points above get clarified and (2) I get some replies regarding the legal setup I would need to do here in Spain to set myself up as a contractor. As I mentioned I'm not currently registered as such, so I want to get specifics on the costs it would put on my side. I should get this estimated soon.
Regarding starting time:
* As I mentioned, my strict notice period is two weeks. Although I would appreciate leaving some more room to make a clean handover to my team. Having said that, I don't want this to get in the way so... Let me know your thoughts and we will work it out.
* Also some boring bureaucracy: I have 5 weeks of paid paternity leave pending to be spent around here. I don't really need the leave, but I might ask to delay the first invoice we make. (E.g., imagining we start work on Day D, I really start to work on Day D, but push the invoicing of days D to D+35 into the next invoicing cycle).
* Finally... I have a couple of family trips planned on two weeks of August. Wife will kill me if I cancel them. I was hoping we could fit them in, let me know what you think. Also, if you would rather just have me start once that's over (would be late August) so you don't have me come in and out at the start, I would fully understand.
---
Time to review the contract in detail.
I got a copy from them and I also got a template from Pau. I'll read both and get ideas.
* Termination notice period?

Binary file not shown.

BIN
laconversacion.mp3.gpg Normal file

Binary file not shown.

Binary file not shown.

BIN
motoko.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8 MiB