text:
ESP32-S3 - Combination Secure boot+Flash Encryption Failed on IDF 4.4.8/5.1.4 (IDFGH-13237)

Answers checklist.

[X] I have read the documentation ESP-IDF Programming Guide and the issue is not addressed there.
[X] I have updated my IDF branch (master or release) to the latest version and checked that the issue is present there.
[X] I have searched the issue tracker for a similar issue and not found a similar issue.

General issue report
I have a project success enable Secure boot+Flash Encryption for ESP32, but when I change to ESP32-S3 it failed,
After I flash the boot loader and the application image, it show in the log:
ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0x15 (USB_UART_CHIP_RESET),boot:0x8 (SPI_FAST_FLASH_BOOT)
Saved PC:0x40048d46
invalid header: 0x20a36bad
invalid header: 0x20a36bad
invalid header: 0x20a36bad
invalid header: 0x20a36bad
invalid header: 0x20a36bad
invalid header: 0x20a36bad
invalid header: 0x20a36bad

Steps I use to enable both Secure boot and Flash encryption at the same time:
1, Flash Encryption, follow the official guide: Flash encryption Release-mode.
2, Secure boot v2, follow the official guide: How To Enable Secure Boot V2
3, Erase the flash and build the boot loader with command: idf.py bootloader and flash follow the output result.
4, Flash the remain part of the project with command: idf.py flash
This is the part of sdkconfig to enable flash encryption and secure boot:

#
# Security features
#
CONFIG_SECURE_SIGNED_ON_BOOT=y
CONFIG_SECURE_SIGNED_ON_UPDATE=y
CONFIG_SECURE_SIGNED_APPS=y
CONFIG_SECURE_BOOT_SUPPORTS_RSA=y
CONFIG_SECURE_TARGET_HAS_SECURE_ROM_DL_MODE=y
CONFIG_SECURE_SIGNED_APPS_RSA_SCHEME=y
CONFIG_SECURE_BOOT=y
CONFIG_SECURE_BOOT_V2_ENABLED=y
CONFIG_SECURE_BOOT_BUILD_SIGNED_BINARIES=y
CONFIG_SECURE_BOOT_SIGNING_KEY="sbv2_private.pem"
# CONFIG_SECURE_BOOT_ENABLE_AGGRESSIVE_KEY_REVOKE is not set
# CONFIG_SECURE_BOOT_INSECURE is not set
CONFIG_SECURE_FLASH_ENC_ENABLED=y
CONFIG_SECURE_FLASH_ENCRYPTION_AES128=y
# CONFIG_SECURE_FLASH_ENCRYPTION_AES256 is not set
# CONFIG_SECURE_FLASH_ENCRYPTION_MODE_DEVELOPMENT is not set
CONFIG_SECURE_FLASH_ENCRYPTION_MODE_RELEASE=y
CONFIG_SECURE_FLASH_CHECK_ENC_EN_IN_APP=y
# CONFIG_SECURE_DISABLE_ROM_DL_MODE is not set
CONFIG_SECURE_ENABLE_SECURE_ROM_DL_MODE=y
# CONFIG_SECURE_INSECURE_ALLOW_DL_MODE is not set
# end of Security features

The modules I use is official ESP32-S3-WROOM-1 N8R2 and N8, I also try IDF 5.1.4
Output by the command: esptool.py --chip esp32s3 --no-stub get_security_info
esptool.py --chip esp32s3 --no-stub get_security_info
esptool.py v3.3.4-dev
Found 2 serial ports
Serial port /dev/cu.usbmodem101
Connecting...
Chip is ESP32-S3 in Secure Download Mode
Enabling default SPI flash mode...
Flags: 0x000006f5 (0b11011110101)
Flash_Crypt_Cnt: 0x0
Key_Purposes: (9, 4, 0, 0, 0, 0, 12)
Chip_ID: 9
Api_Version: 0
Hard resetting via RTS pin...

I does not manual burn any efuse key, just let it does automatically by the chip. I flash the boot loader first then flash all later. The guide too complex and I have bricked many ESP32 chip before it work, this time occur with the S3 too, QEMU not working with the S3, so I have some esp32s3 to try, but before try the second one, I need some more clear guide.

Updated: After check buy esptool.py --chip esp32s3 --no-stub get_security_info   I see the the flash encryption is not enable, it may failed on the second stage boot so the bootloader still keep it disable.
I try multiple way to make the chip back, and finally disable flash encryption and re-flash all the parts exclude boot loader with idf.py flash and it working with secure boot enable, logs:
ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0x1 (POWERON),boot:0x8 (SPI_FAST_FLASH_BOOT)
SPIWP:0xee
Octal Flash Mode Enabled
For OPI Flash, Use Default Flash Boot Mode
mode:SLOW_RD, clock div:1
Valid secure boot key blocks: 0
secure boot verification succeeded
load:0x3fce3980,len:0x2618
load:0x403c9700,len:0x4
load:0x403c9704,len:0xa48
load:0x403cc700,len:0x47e8
entry 0x403c9894
I (435) cpu_start: Multicore app
I (436) cpu_start: Pro cpu up.
I (436) cpu_start: Starting app cpu, entry

After that I retry enable flash encryption again and reflash (because I choose secure download mode), this time it show meaning log here:
ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0x1 (POWERON),boot:0x8 (SPI_FAST_FLASH_BOOT)
SPIWP:0xee
Octal Flash Mode Enabled
For OPI Flash, Use Default Flash Boot Mode
mode:SLOW_RD, clock div:1
Valid secure boot key blocks: 0
secure boot verification succeeded
load:0x3fce3970,len:0x3850
load:0x403c9700,len:0xbc0
load:0x403cc700,len:0x53a4
entry 0x403c9950
I (82) boot: ESP-IDF v4.4.8-dirty 2nd stage bootloader
I (82) boot: compile time 00:57:30
I (82) boot: Multicore bootloader
I (85) boot: chip revision: v0.2
I (89) boot.esp32s3: Boot SPI Speed : 80MHz
I (93) boot.esp32s3: SPI Mode       : SLOW READ
I (99) boot.esp32s3: SPI Flash Size : 8MB
I (103) boot: Enabling RNG early entropy source...
I (109) boot: Partition Table:
I (113) boot: ## Label            Usage          Type ST Offset   Length
I (120) boot:  0 nvs              WiFi data        01 02 00011000 0000c000
I (127) boot:  1 otadata          OTA data         01 00 0001d000 00002000
I (135) boot:  2 phy_init         RF data          01 01 0001f000 00001000
I (143) boot:  3 app0             OTA app          00 10 00020000 001e0000
I (150) boot:  4 app1             OTA app          00 11 00200000 001e0000
I (158) boot:  5 spiffs           Unknown data     01 82 003e0000 00011000
I (165) boot:  6 coredump         Unknown data     01 03 003f1000 00008000
I (173) boot:  7 esp_secure_cert  WiFi data        01 02 003f9000 00002000
I (180) boot:  8 fctry            WiFi data        01 02 003fb000 00004000
I (188) boot:  9 nvs_keys         NVS keys         01 04 003ff000 00001000
I (195) boot: End of partition table
I (200) esp_image: segment 0: paddr=00200020 vaddr=3c100020 size=3f61ch (259612) map
I (269) esp_image: segment 1: paddr=0023f644 vaddr=3fc9bd10 size=009d4h (  2516) load
I (270) esp_image: segment 2: paddr=00240020 vaddr=42000020 size=f01c8h (983496) map
I (506) esp_image: segment 3: paddr=003301f0 vaddr=3fc9c6e4 size=03c08h ( 15368) load
I (511) esp_image: segment 4: paddr=00333e00 vaddr=40374000 size=17d08h ( 97544) load
I (539) esp_image: segment 5: paddr=0034bb10 vaddr=00000000 size=044c0h ( 17600)
I (543) esp_image: Verifying image signature...
I (543) secure_boot_v2: Verifying with RSA-PSS...
I (549) secure_boot_v2: Signature verified successfully!
I (561) boot: Loaded app from partition at offset 0x200000
I (562) secure_boot_v2: enabling secure boot v2...
I (564) secure_boot_v2: secure boot v2 is already enabled, continuing..
I (571) boot: Checking flash encryption...
I (576) efuse: Batch mode of writing fields is enabled
E (582) flash_encrypt: Invalid key state, check read&write protection for key and keypurpose(if exists)
I (592) efuse: Batch mode of writing fields is cancelled
E (598) boot: Flash encryption check failed (259).
E (603) boot: OTA app partition slot 1 is not bootable
I (609) esp_image: segment 0: paddr=00020020 vaddr=3c0f0020 size=3c424h (246820) map
I (675) esp_image: segment 1: paddr=0005c44c vaddr=3fc9bc60 size=03bcch ( 15308) load
I (680) esp_image: segment 2: paddr=00060020 vaddr=42000020 size=ee2f8h (975608) map
I (911) esp_image: segment 3: paddr=0014e320 vaddr=3fc9f82c size=00a10h (  2576) load
I (912) esp_image: segment 4: paddr=0014ed38 vaddr=40374000 size=17c60h ( 97376) load
I (943) esp_image: segment 5: paddr=001669a0 vaddr=00000000 size=09630h ( 38448)
I (953) esp_image: Verifying image signature...
I (953) secure_boot_v2: Verifying with RSA-PSS...
I (956) secure_boot_v2: Signature verified successfully!
I (967) boot: Loaded app from partition at offset 0x20000
I (967) secure_boot_v2: enabling secure boot v2...
I (969) secure_boot_v2: secure boot v2 is already enabled, continuing..
I (977) boot: Checking flash encryption...
I (982) efuse: Batch mode of writing fields is enabled
E (987) flash_encrypt: Invalid key state, check read&write protection for key and keypurpose(if exists)
I (998) efuse: Batch mode of writing fields is cancelled
E (1003) boot: Flash encryption check failed (259).
E (1009) boot: OTA aESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0x3 (RTC_SW_SYS_RST),boot:0x8 (SPI_FAST_FLASH_BOOT)
Saved PC:0x403cde82
SPIWP:0xee
Octal Flash Mode Enabled
For OPI Flash, Use Default Flash Boot Mode
mode:SLOW_RD, clock div:1
Valid secure boot key blocks: 0
secure boot verification succeeded
load:0x3fce3970,len:0x3850
load:0x403c9700,len:0xbc0
load:0x403cc700,len:0x53a4
entry 0x403c9950
I (86) boot: ESP-IDF v4.4.8-dirty 2nd stage bootloader
I (87) boot: compile time 00:57:30
I (87) boot: Multicore bootloader
I (89) boot: chip revision: v0.2
I (93) boot.esp32s3: Boot SPI Speed : 80MHz
I (98) boot.esp32s3: SPI Mode       : SLOW READ
I (103) boot.esp32s3: SPI Flash Size : 8MB
I (108) boot: Enabling RNG early entropy source...
I (114) boot: Partition Table:
I (117) boot: ## Label            Usage          Type ST Off

I see the red mark with:

I (561) boot: Loaded app from partition at offset 0x200000

And

E (987) flash_encrypt: Invalid key state, check read&write protection for key and keypurpose(if exists)
I (998) efuse: Batch mode of writing fields is cancelled
E (1003) boot: Flash encryption check failed (259).

Oh, why the boot-loader load app at offset 0x200000? Because my app partition at the 0x20000?
This is the partition table:
# Name,   Type, SubType, Offset,  Size, Flags
nvs, data, nvs, 0x11000, 0xC000
otadata, data, ota, 0x1D000, 0x2000
phy_init, data, phy, 0x1F000, 0x1000
app0, app, ota_0, 0x20000, 0x1E0000
app1, app, ota_1, 0x200000, 0x1E0000
spiffs, data, spiffs, 0x3E0000, 0x11000
coredump, data, coredump, 0x3F1000, 0x8000
esp_secure_cert, data, nvs, 0x3F9000, 0x2000
fctry, data, nvs, 0x3FB000, 0x4000
nvs_keys, data, nvs_keys, 0x3FF000, 0x1000

@dzungpv
Please see the docs guide here for enabling the secure boot and flash-encryption features in step-by-step manner.
The order for enabling these features must be flash encryption first and then secure boot, the reason is specified in the doc guide pointer above.
For your case, since the secure boot is enabled first, read protection of the flash-encryption key is no more possible and hence the error that you are getting here.

@dzungpv
Please see the docs guide here for enabling the secure boot and flash-encryption features in step-by-step manner.
The order for enabling these features must be flash encryption first and then secure boot, the reason is specified in the doc guide pointer above.
For your case, since the secure boot is enabled first, read protection of the flash-encryption key is no more possible and hence the error that you are getting here.

I solved problem myself, the key is the order of the flash.
The secure boot loader bin must be flash LAST.
Or a better way is merged all the binary include boot loader then flash only 1 time.
Please add to the document.

Hi, how did you solve this ? I have enabled only the secure boot, ran the command idf.py bootloader and then idf.py flash but the output looks like this after running idf.py monitor :
ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0x1 (POWERON),boot:0x8 (SPI_FAST_FLASH_BOOT)
invalid header: 0x020150aa
invalid header: 0x020150aa
invalid header: 0x020150aa
invalid header: 0x020150aa
invalid header: 0x020150aa
invalid header: 0x020150aa
invalid header: 0x020150aa
invalid header: 0x020150aa
invalid header: 0x020150aa

authors: aygh4266 dzungpv mahavirj


text:
Ability to disable make monitor 0x4xxx xxxx address decoding

I'm a big fan of ESP-IDF "make monitor".  I also appreciate the decode of executable addresses to source statements when an address in the range 0x4xxx xxxx is detected.  This issue/request asks that we have an option to disable this decoding at execution time.  For example:
export MONITOR_DECODE=0
make monitor

... or some other definition.  In the work I am doing, I am actively debugging MMU and ESP32 address processing and in my "make monitor" output, I am seeing decoded addresses everywhere when I actually don't want to see any (at this time).

Its a really cool option but would be nice to see something where we can ignore the false positive results during normal messages whenever printing any other standard hex value.  I haven't looked, but for example maybe all actual LOG messages can be modified to be prefixed with 0x whereas the stack dump isn't (or vice-versa).

Quick and dirty comment https://github.com/espressif/esp-idf/blob/master/tools/idf_monitor.py#L425

source: gharchive/issue

authors: FHFS jkhax0r nkolban

repo: espressif/esp-idf

license_type: permissive

license_source: github-api


text:
Problem with uart example

Hello!
I have problems with lost data in the uart example.
In the sample app I have disabled the uart_echo_test and reconfigured the uart_evt_test to use UART0, configured RTS and CTS to suit my design and enabled uart flow control (.flow_ctrl = UART_HW_FLOWCTRL_CTS_RTS).
Log tracing is redirected to UART1.
When I run the example data is lost and never echoed. However, if I uncomment the the log tracing in the uart_task all data is echoed and it seems to work ok.
In my real application I see the same kind of problem with lost data when there are active tasks with higher priorities than the task reading the uart. This is my original problem and and very similar to what I see when testing the example.
I test by sending a file to the ESP32 using tera term in a windows environment and comparing the received echo with the original file.
I have verified that RTS/CTS signalling works using an oscilloscope.
I have tried to reproduce the problem on the WROOM board but do not get flow control working on UART0.  In this setup I set RTS to IO15 and CTS to I013 which I got from the esp-wroom datasheet.
How can RTS/CTS flow control be tested on the WROOM board?
Do I use the wrong pin configuration?

Update!
I missed that the uart is flushed on the BUFFER_FULL event. However if I remove the call to uart_flush() I still loose data and additionally get a crash.

Did you get flow control working? I am also trying to use this functionality.
Specifically I am tying to talk to a MODBUS device through a transceiver.
RX 15, TX 22, DriveEnable 5. In this case does it make sense to set one pin (5) for both RTS and CTS? These are physically tied together on the hardware side.

I never got RTS/CTS working on WROOM. I found a configuration that worked for my project. With less trace logs and txbuffer disabled the example worked well in my test setup.

authors: forthlightning ubxola


text:
Sink connect works no more (IDFGH-440)

Since last week commits esp_a2d_sink_connect() does not connect to BT source.
On cold boot of esp, calling esp_a2d_sink_connect() immediately returns this:
I (5343) BTDM_INIT: BT controller compile version [7c8c9b8]
I (5343) system_api: Base MAC address is not set, read default base MAC address
from BLK0 of EFUSE
I (5503) phy: phy_version: 4000, b6198fa, Sep  3 2018, 15:11:06, 0, 2
E (5843) BT_APPL: reset flags
W (5843) BT_SDP: SDP - Rcvd conn cnf with error: 0x9  CID 0x40
I (5843) BT_AV: A2DP connection state: Connecting, [08:21:ef:a4:97:eb]
W (5853) BT_BTC: BTA_AV_OPEN_EVT::FAILED status: 2
I (5853) BT_AV: A2DP connection state: Disconnected, [08:21:ef:a4:97:eb]

however if I connect and disconnect from my phone (or whatever device) then sink_connect starts to work with such log:
E (61133) BT_APPL: reset flags
I (61133) BT_AV: A2DP connection state: Connecting, [08:21:ef:a4:97:eb]
E (61183) BT_APPL: bta_av_rc_create ACP handle exist for shdl:0
W (61263) BT_APPL: new conn_srvc id:19, app_id:0
I (61263) BT_AV: A2DP connection state: Connected, [08:21:ef:a4:97:eb]

Code used for test in main.c:
esp_bd_addr_t what_to_connect = { 0x08, 0x21, 0xef, 0xa4, 0x97, 0xeb};
esp_a2d_sink_connect(what_to_connect);

@Elektrik1 According to your log, the reason for the connection failure is beyond max ACL connections.
Please run  make menuconfig , Component config --->, Bluetooth --->, Bluetooth controller -->,  set BR/EDR ACL Max Connections to 2 or more. (You may set it to 1, before).  Because page scan should use one.

@blueMoodBHD Thank you, that was the issue, however now BT connects but disconnects after ~ seconds with such error:

E (6913) BT_APPL: reset flags
I (6913) BT_AV: A2DP connection state: Connecting, [08:21:ef:a4:97:eb]
E (8373) BT_APPL: bta_av_rc_create ACP handle exist for shdl:0
E (11703) BT_APPL: bta_dm_pm_btm_status hci_status=12
W (41763) BT_AVCT: ccb 1 not allocated
I (41763) BT_AV: A2DP connection state: Disconnected, [08:21:ef:a4:97:eb]

sometimes those as well:

E (880753) BT_APPL: reset flags
I (880763) BT_AV: A2DP connection state: Connecting, [08:21:ef:a4:97:eb]
E (881683) BT_APPL: bta_av_rc_create ACP handle exist for shdl:0
E (885033) BT_APPL: bta_dm_pm_btm_status hci_status=12
W (900383) BT_APPL: new conn_srvc id:19, app_id:1
I (900383) BT_AV: A2DP audio state: Started
E (915103) BT_APPL: bta_av_str_stopped:audio_open_cnt=1, p_data 0x0
W (915103) BT_L2CAP: L2CAP - no LCB for L2CA_SetAclPriority
W (915103) BT_L2CAP: WARNING L2CA_SetFlushTimeout No lcb for bd_addr [...;a497eb]
E (915113) BT_APPL: bta_dm_pm_sniff BTM_SetPowerMode() returns ERROR status=7
W (915123) BT_AVCT: ccb 1 not allocated
I (915123) BT_AV: A2DP audio state: Stopped
I (915133) BT_AV: A2DP connection state: Disconnected, [08:21:ef:a4:97:eb]

Hi,@Elektrik1,  I tried to reproduce the  new issue but failed. So could you please tell me the commit id of ESP-IDF and your code.
Thanks.

@Elektrik1 Hi, would you help provide the commit ID of ESP-IDF and your code? Thanks.

Hello, can't tell the commit ID, but it is still broken, tested with latest pull, just added in main.c:
/* set discoverable and connectable mode, wait to be connected */
esp_bt_gap_set_scan_mode(ESP_BT_CONNECTABLE, ESP_BT_GENERAL_DISCOVERABLE);

esp_bd_addr_t what_to_connect = { 0x08, 0x21, 0xef, 0xa4, 0x97, 0xeb};
esp_a2d_sink_connect(what_to_connect);

break;

and occasionally results in log: https://pastebin.com/RJ08m2EN
Tested with Samsung S7 (android 8.0) and Samsung S6 (Android 7.0). Mostly occurs in cold start (power on). Issue goes away after connecting manually from phone to ESP, and then perform proper disconnect. Wonder if that's phone firmware denying connection after no proper BT disconnect procedure done, but a year ago that feature worked like charm with same hardware and code...

@Elektrik1,  commit 791209d0eb3548b53bddf333f3cc6b5ab58a04e0 may fix this problems,  Please update esp-idf and test again. Thanks.

@Elektrik1 Hi, would you help try commit 791209d which may fix this problems and share the updates? Thanks.

Hello, sorry for the delay, been abroad.
I have just fetched last commits, and after recompile, couldn't get disconnects (without application of libcoexist.a file manually).
Not sure if this fix was applied in main branch already, and it fixed the issue, or some other commit caused the fix ?

@blueMoodBHD @Alvin1Zhang  I can confirm this is still an issue after applying 791209d. If the phone initiates the connection it works fine, however if the ESP is the initiator (through esp_a2d_sink_connect(...)), the connection is lost at some point. The logs differ depending on the IDF version, but overall they point at the same files:
E (312326) BT_APPL: bta_av_str_stopped:audio_open_cnt=1, p_data 0x0
W (312326) BT_L2CAP: L2CAP - no LCB for L2CA_SetAclPriority
W (312326) BT_L2CAP: WARNING L2CA_SetFlushTimeout No lcb for bd_addr [...;ebecb8]
E (312336) BT_APPL: bta_dm_pm_sniff BTM_SetPowerMode() returns ERROR status=7
W (312346) BT_AVCT: ccb 1 not allocated
I (312356) BT_AV: A2DP audio state: Stopped
I (312356) BT_AV: A2DP conn state: Disconnected, c8:1e:e7:eb:ec:b8

Hi, I have test is with Huawei P10 and Iphone 7, it works well. What is the phone did you use? And is there other tips to reproduce it?

@Elektrik1 Sorry for the very slow turnaround. Would you please help share the phone you used? And are there other tips to reproduce it? Thanks.

@Alvin1Zhang I have tested with Samsung S7 (android 8.0) and Samsung S6 (Android 7.0). Wonder what phone did @crespum used since he confirmed the issue as well.

It's working for me now. It's been a while, but I think the problem was the ESP was initiating the connection while there was still another Bluetooth operation running (e.g. a disconnection).

I have exactly the same problem with a Samsung Galaxy S9 (Android 9).
If I connect with the phone there is no problem, but when I connect with "esp_a2d_sink_connect" to the phone it disconnects after a few seconds:
I (55597) BT_APP: Connect to device E (55607) BT_APPL: reset flags I (55607) BT_A2DP: A2DP connection state: Connecting E (56737) BT_APPL: bta_av_rc_create ACP handle exist for shdl:0 D (56807) BT_A2DP: A2DP audio stream configuration; codec type 0 W (56887) BT_APPL: new conn_srvc id:19, app_id:0 I (56887) BT_A2DP: A2DP connection state: Connected E (60087) BT_APPL: bta_dm_pm_btm_status hci_status=12 W (90147) BT_AVCT: ccb 1 not allocated I (90147) BT_A2DP: A2DP connection state: Disconnected, reason 1

Steps to reproduce:
Take a2dp_sink from examples, in main.c after

/* set discoverable and connectable mode, wait to be connected */
esp_bt_gap_set_scan_mode(ESP_BT_CONNECTABLE, ESP_BT_GENERAL_DISCOVERABLE);

on line 197, before

break;

add:
esp_bd_addr_t what_to_connect = { 0x08, 0x21, 0xef, 0xa4, 0x97, 0xeb}; //your bt address here
esp_a2d_sink_connect(what_to_connect);

Flash to ESP32, pair and connect from the phone. Log:
ets Jun  8 2016 00:22:57����8�&���0�'&&��SH�HH����Ő    �]I�N���UQ�,b����3�i�%�F�*�e1�SH��ꊕjflash��V�Aerr,�LCQ��main.c��S�

rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0018,len:4
load:0x3fff001c,len:6848
ho 0 tail 12 room 4
load:0x40078000,len:14204
load:0x40080400,len:4292
entry 0x400806e4
I (75) boot: Chip Revision: 1
I (75) boot_comm: mismatch chip revision, expect 1, found 0
I (40) boot: ESP-IDF v4.1-dev-437-gd2ad0f077 2nd stage bootloader
I (40) boot: compile time 23:15:21
I (40) boot: Enabling RNG early entropy source...
I (46) boot: SPI Speed      : 40MHz
I (50) boot: SPI Mode       : DIO
I (54) boot: SPI Flash Size : 2MB
I (58) boot: Partition Table:
I (62) boot: ## Label            Usage          Type ST Offset   Length
I (69) boot:  0 nvs              WiFi data        01 02 00009000 00006000
I (77) boot:  1 phy_init         RF data          01 01 0000f000 00001000
I (84) boot:  2 factory          factory app      00 00 00010000 00100000
I (92) boot: End of partition table
I (96) boot_comm: mismatch chip revision, expect 1, found 0
I (102) esp_image: segment 0: paddr=0x00010020 vaddr=0x3f400020 size=0x1bb10 (113424) map
I (152) esp_image: segment 1: paddr=0x0002bb38 vaddr=0x3ffbdb60 size=0x02c30 ( 11312) load
I (157) esp_image: segment 2: paddr=0x0002e770 vaddr=0x40080000 size=0x00400 (  1024) load
0x40080000: _WindowOverflow4 at D:/Espressif/esp-idf/components/freertos/xtensa_vectors.S:1778

I (159) esp_image: segment 3: paddr=0x0002eb78 vaddr=0x40080400 size=0x01498 (  5272) load
I (170) esp_image: segment 4: paddr=0x00030018 vaddr=0x400d0018 size=0x708c4 (460996) map
0x400d0018: _stext at ??:?

I (343) esp_image: segment 5: paddr=0x000a08e4 vaddr=0x40081898 size=0x11b94 ( 72596) load
0x40081898: coex_bt_request_wrapper at D:/Espressif/esp-idf/components/esp32/esp_adapter.c:475

I (386) boot: Loaded app from partition at offset 0x10000
I (386) boot: Disabling RNG early entropy source...
I (386) cpu_start: Pro cpu up.
I (390) cpu_start: Application information:
I (395) cpu_start: Project name:     a2dp_sink
I (400) cpu_start: App version:      1
I (404) cpu_start: Compile time:     Oct 16 2019 23:14:59
I (410) cpu_start: ELF file SHA256:  81bd31d94a408369...
I (416) cpu_start: ESP-IDF:          v4.1-dev-437-gd2ad0f077
I (423) cpu_start: Starting app cpu, entry point is 0x400812b0
0x400812b0: call_start_cpu1 at D:/Espressif/esp-idf/components/esp32/cpu_start.c:276

I (0) cpu_start: App cpu up.
I (433) heap_init: Initializing. RAM available for dynamic allocation:
I (440) heap_init: At 3FFAFF10 len 000000F0 (0 KiB): DRAM
I (446) heap_init: At 3FFB6388 len 00001C78 (7 KiB): DRAM
I (452) heap_init: At 3FFB9A20 len 00004108 (16 KiB): DRAM
I (458) heap_init: At 3FFBDB5C len 00000004 (0 KiB): DRAM
I (464) heap_init: At 3FFCC2D8 len 00013D28 (79 KiB): DRAM
I (470) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM
I (477) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
I (483) heap_init: At 4009342C len 0000CBD4 (50 KiB): IRAM
I (489) cpu_start: Pro cpu start user code
I (508) spi_flash: detected chip: generic
I (508) spi_flash: flash io: dio
W (508) spi_flash: Detected size(4096k) larger than the size in the binary image header(2048k). Using the size in the binary image header.
I (519) cpu_start: Starting scheduler on PRO CPU.
I (0) cpu_start: Starting scheduler on APP CPU.
I (592) I2S: DMA Malloc info, datalen=blocksize=240, dma_buf_count=6
I (592) I2S: PLL_D2: Req RATE: 44100, real rate: 44642.000, BITS: 16, CLKM: 14, BCK: 8, MCLK: 11289966.924, SCLK: 1428544.000000, diva: 64, divb: 11
I (602) BTDM_INIT: BT controller compile version [d6bb204]
I (612) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE
I (712) phy: phy_version: 4102, 2fa7a43, Jul 15 2019, 13:06:06, 0, 0
I (1242) BT_AV: event: 10
I (1242) BT_AV: event: 10
I (1242) BT_AV: event: 10
I (1252) BT_AV: event: 10
E (1252) BT_APPL: reset flags
I (1252) BT_AV: A2DP connection state: Connecting, [08:21:ef:a4:97:eb]
I (1822) BT_AV: ESP_BT_GAP_CFM_REQ_EVT Please compare the numeric value: 692787
I (7722) BT_AV: authentication success: Samsung Galaxy S7
I (7722) BT_AV: 08 21 ef a4 97 eb
E (7772) BT_APPL: bta_av_rc_create ACP handle exist for shdl:0
I (7902) BT_AV: A2DP audio stream configuration, codec type 0
I (7902) I2S: PLL_D2: Req RATE: 44100, real rate: 44642.000, BITS: 16, CLKM: 14, BCK: 8, MCLK: 11289966.924, SCLK: 1428544.000000, diva: 64, divb: 11
I (7912) BT_AV: Configure audio player 21-15-2-35
I (7912) BT_AV: Audio player configured, sample rate=44100
W (7952) BT_APPL: new conn_srvc id:19, app_id:0
I (7952) BT_AV: A2DP connection state: Connected, [08:21:ef:a4:97:eb]
I (8022) RCCT: AVRC conn_state evt: state 1, [08:21:ef:a4:97:eb]
I (8022) RCTG: AVRC conn_state evt: state 1, [08:21:ef:a4:97:eb]
I (8022) RCTG: start volume change simulation
I (8032) RCCT: AVRC remote features 25b, TG features 51
I (8032) RCTG: AVRC remote features 25b, CT features 2
I (8042) RCCT: remote rn_cap: count 7, bitmask 0xf26
I (8112) RCTG: AVRC register event notification: 13, param: 0x0
I (8172) RCCT: AVRC metadata rsp: attribute id 0x1,
I (8172) RCCT: AVRC metadata rsp: attribute id 0x2,
I (8172) RCCT: AVRC metadata rsp: attribute id 0x4,
I (8182) RCCT: AVRC metadata rsp: attribute id 0x20,
I (9562) RCCT: AVRC event notification: 5
I (9562) BT_AV: Play position changed: 0-ms
I (18032) RCTG: Volume is set locally to: 3%
I (18682) RCTG: AVRC register event notification: 13, param: 0x0
I (28032) RCTG: Volume is set locally to: 7%
I (28682) RCTG: AVRC register event notification: 13, param: 0x0

now disconnect BT from your phone. Restart (repower, or reset button, doesn't matter) the ESP32 and wait for it to connect. After some time that error appears and the phone is disconnected. Log:
flash��V�Aerr,�L#�׽m�Z�iA371�C�ets Jun  8 2016 00:22:57

rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0018,len:4
load:0x3fff001c,len:6848
ho 0 tail 12 room 4
load:0x40078000,len:14204
load:0x40080400,len:4292
entry 0x400806e4
I (75) boot: Chip Revision: 1
I (75) boot_comm: mismatch chip revision, expect 1, found 0
I (40) boot: ESP-IDF v4.1-dev-437-gd2ad0f077 2nd stage bootloader
I (40) boot: compile time 23:15:21
I (40) boot: Enabling RNG early entropy source...
I (46) boot: SPI Speed      : 40MHz
I (50) boot: SPI Mode       : DIO
I (54) boot: SPI Flash Size : 2MB
I (58) boot: Partition Table:
I (62) boot: ## Label            Usage          Type ST Offset   Length
I (69) boot:  0 nvs              WiFi data        01 02 00009000 00006000
I (77) boot:  1 phy_init         RF data          01 01 0000f000 00001000
I (84) boot:  2 factory          factory app      00 00 00010000 00100000
I (92) boot: End of partition table
I (96) boot_comm: mismatch chip revision, expect 1, found 0
I (102) esp_image: segment 0: paddr=0x00010020 vaddr=0x3f400020 size=0x1bb10 (113424) map
I (152) esp_image: segment 1: paddr=0x0002bb38 vaddr=0x3ffbdb60 size=0x02c30 ( 11312) load
I (157) esp_image: segment 2: paddr=0x0002e770 vaddr=0x40080000 size=0x00400 (  1024) load
0x40080000: _WindowOverflow4 at D:/Espressif/esp-idf/components/freertos/xtensa_vectors.S:1778

I (159) esp_image: segment 3: paddr=0x0002eb78 vaddr=0x40080400 size=0x01498 (  5272) load
I (170) esp_image: segment 4: paddr=0x00030018 vaddr=0x400d0018 size=0x708c4 (460996) map
0x400d0018: _stext at ??:?

I (343) esp_image: segment 5: paddr=0x000a08e4 vaddr=0x40081898 size=0x11b94 ( 72596) load
0x40081898: coex_bt_request_wrapper at D:/Espressif/esp-idf/components/esp32/esp_adapter.c:475

I (386) boot: Loaded app from partition at offset 0x10000
I (386) boot: Disabling RNG early entropy source...
I (386) cpu_start: Pro cpu up.
I (390) cpu_start: Application information:
I (395) cpu_start: Project name:     a2dp_sink
I (400) cpu_start: App version:      1
I (404) cpu_start: Compile time:     Oct 16 2019 23:14:59
I (410) cpu_start: ELF file SHA256:  81bd31d94a408369...
I (416) cpu_start: ESP-IDF:          v4.1-dev-437-gd2ad0f077
I (423) cpu_start: Starting app cpu, entry point is 0x400812b0
0x400812b0: call_start_cpu1 at D:/Espressif/esp-idf/components/esp32/cpu_start.c:276

I (0) cpu_start: App cpu up.
I (433) heap_init: Initializing. RAM available for dynamic allocation:
I (440) heap_init: At 3FFAFF10 len 000000F0 (0 KiB): DRAM
I (446) heap_init: At 3FFB6388 len 00001C78 (7 KiB): DRAM
I (452) heap_init: At 3FFB9A20 len 00004108 (16 KiB): DRAM
I (458) heap_init: At 3FFBDB5C len 00000004 (0 KiB): DRAM
I (464) heap_init: At 3FFCC2D8 len 00013D28 (79 KiB): DRAM
I (470) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM
I (477) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
I (483) heap_init: At 4009342C len 0000CBD4 (50 KiB): IRAM
I (489) cpu_start: Pro cpu start user code
I (508) spi_flash: detected chip: generic
I (508) spi_flash: flash io: dio
W (508) spi_flash: Detected size(4096k) larger than the size in the binary image header(2048k). Using the size in the binary image header.
I (519) cpu_start: Starting scheduler on PRO CPU.
I (0) cpu_start: Starting scheduler on APP CPU.
I (592) I2S: DMA Malloc info, datalen=blocksize=240, dma_buf_count=6
I (592) I2S: PLL_D2: Req RATE: 44100, real rate: 44642.000, BITS: 16, CLKM: 14, BCK: 8, MCLK: 11289966.924, SCLK: 1428544.000000, diva: 64, divb: 11
I (602) BTDM_INIT: BT controller compile version [d6bb204]
I (612) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE
I (712) phy: phy_version: 4102, 2fa7a43, Jul 15 2019, 13:06:06, 0, 0
I (1262) BT_AV: event: 10
I (1262) BT_AV: event: 10
I (1262) BT_AV: event: 10
I (1262) BT_AV: event: 10
E (1262) BT_APPL: reset flags
I (1272) BT_AV: A2DP connection state: Connecting, [08:21:ef:a4:97:eb]
E (2702) BT_APPL: bta_av_rc_create ACP handle exist for shdl:0
I (2812) BT_AV: A2DP audio stream configuration, codec type 0
I (2812) I2S: PLL_D2: Req RATE: 44100, real rate: 44642.000, BITS: 16, CLKM: 14, BCK: 8, MCLK: 11289966.924, SCLK: 1428544.000000, diva: 64, divb: 11
I (2822) BT_AV: Configure audio player 21-15-2-35
I (2822) BT_AV: Audio player configured, sample rate=44100
W (3132) BT_APPL: new conn_srvc id:19, app_id:0
I (3132) BT_AV: A2DP connection state: Connected, [08:21:ef:a4:97:eb]
I (3262) RCCT: AVRC conn_state evt: state 1, [08:21:ef:a4:97:eb]
I (3262) RCTG: AVRC conn_state evt: state 1, [08:21:ef:a4:97:eb]
I (3262) RCCT: AVRC remote features 25b, TG features 51
I (3262) RCTG: start volume change simulation
I (3272) RCTG: AVRC remote features 25b, CT features 2
I (3282) RCCT: remote rn_cap: count 7, bitmask 0xf26
I (3332) RCCT: AVRC metadata rsp: attribute id 0x1,
I (3342) RCCT: AVRC metadata rsp: attribute id 0x2,
I (3342) RCCT: AVRC metadata rsp: attribute id 0x4,
I (3342) RCCT: AVRC metadata rsp: attribute id 0x20,
I (3362) RCTG: AVRC register event notification: 13, param: 0x0
I (4582) RCCT: AVRC event notification: 5
I (4582) BT_AV: Play position changed: 0-ms
E (6342) BT_APPL: bta_dm_pm_btm_status hci_status=12
I (13282) RCTG: Volume is set locally to: 3%
I (23282) RCTG: Volume is set locally to: 7%
I (33282) RCTG: Volume is set locally to: 11%
W (36422) BT_AVCT: ccb 1 not allocated
I (36422) BT_AV: A2DP connection state: Disconnected, [08:21:ef:a4:97:eb]
I (36422) RCCT: AVRC conn_state evt: state 0, [00:00:00:00:00:00]
I (36432) RCTG: AVRC conn_state evt: state 0, [00:00:00:00:00:00]
I (36432) RCTG: Stop volume change simulation

Anyone has a working fix for that? I got the same problem at windows 10 (msi ge62 6qf apache pro laptop).

This log indicates that A2DP SRC profile has not been initialized when SNK is producing inquiry scan.
W (5853) BT_BTC: BTA_AV_OPEN_EVT::FAILED status: 2
Please refer to the a2dp demo of IDF to fix this issue in app layer.

Have same problem. I have board LyraT-V4.3 and BeatsSolo Wireless headphones. I use ESP board as BLUETOOTH_A2DP_SOURCE. At first day Headphones connect normally and I have no problems. But on next day I started to receive error -
`I (13829) BLUETOOTH_SERVICE: Discovery started.
I (14229) BLUETOOTH_SERVICE: Scanned device: 04:88:e2:6e:18:c5
I (14229) BLUETOOTH_SERVICE: --Class of Device: 0x240418
I (14229) BLUETOOTH_SERVICE: --RSSI: -46
I (14229) BLUETOOTH_SERVICE: --Name: BeatsSolo Wireless
I (14239) BLUETOOTH_SERVICE: Found a target device, address 04:88:e2:6e:18:c5, name BeatsSolo Wireless
I (14249) BLUETOOTH_SERVICE: Cancel device discovery ...
I (14259) BLUETOOTH_SERVICE: Device discovery stopped.
I (14259) BLUETOOTH_SERVICE: a2dp connecting to peer: BeatsSolo Wireless
W (14269) BT_SDP: SDP - Rcvd conn cnf with error: 0x9  CID 0x40
W (14279) BT_BTC: BTA_AV_OPEN_EVT::FAILED status: 2`
Nothing helps to fix this. I was thinking that the problem in ESP32 module. I change ESP32-WROVER-B on LyraT board and still have save Error.
Headphones connecting normally to different ESP board and to any phone.
Please help me

Have same problem. I have board LyraT-V4.3 and BeatsSolo Wireless headphones. I use ESP board as BLUETOOTH_A2DP_SOURCE. At first day Headphones connect normally and I have no problems. But on next day I started to receive error -
I (13829) BLUETOOTH_SERVICE: Discovery started.
I (14229) BLUETOOTH_SERVICE: Scanned device: 04:88:e2:6e:18:c5
I (14229) BLUETOOTH_SERVICE: --Class of Device: 0x240418
I (14229) BLUETOOTH_SERVICE: --RSSI: -46
I (14229) BLUETOOTH_SERVICE: --Name: BeatsSolo Wireless
I (14239) BLUETOOTH_SERVICE: Found a target device, address 04:88:e2:6e:18:c5, name BeatsSolo Wireless
I (14249) BLUETOOTH_SERVICE: Cancel device discovery ...
I (14259) BLUETOOTH_SERVICE: Device discovery stopped.
I (14259) BLUETOOTH_SERVICE: a2dp connecting to peer: BeatsSolo Wireless
W (14269) BT_SDP: SDP - Rcvd conn cnf with error: 0x9  CID 0x40

W (14279) BT_BTC: BTA_AV_OPEN_EVT::FAILED status: 2

Nothing helps to fix this. I was thinking that the problem in ESP32 module. I change ESP32-WROVER-B on LyraT board and still have save Error.
Headphones connecting normally to different ESP board and to any phone.
Please help me

From the log, the device discovery procedure (inquiry) is doing its work. But in the specific time duration, the A2DP SNK cannot be discovered. So first, please check the headphones inquiry open or not; second, please change the time duration parameter in esp_bt_gap_start_discovery() to a relatively long time to make sure the headphone can be discovered.

@Wth-Esp I fix the problem with full reinstall esp-idf esp-adf. Now headphones connecting with no problems

Thanks for sharing the updates, will close now, feel free to reopen.

authors: Alvin1Zhang Elektrik1 Wth-Esp blueMoodBHD crespum dordnung nikolindima wasmac


text:
Stack corruption calling btc_ble_gattc_get_attr_count uint16_t* assumed to be int* (IDFGH-2560)

#4100
''' Environment

Development Kit:      NA, but I'm using Hiletgo
Module or chip used:  ESP32-WROOM-32S
IDF version v4.1-dev-1795-gca8fac876
Build System:        idf.py
Compiler version: xtensa-esp32-elf-gcc.exe (crosstool-NG esp-2019r2) 8.2.0
Operating System:   Windows
(Windows only) environment type: PowerShell
Using an IDE?: VSCode
Power Supply:         USB

Problem Description
btc_ble_gattc_get_attr_count takes a uint16_t* for count.  It, in turn, calls BTA_GATTC_GetDBSizeByType and casts as an int*.  As an int is 32 bits and uint16 is 16, the result overwrites part of the stack by 16 bytes.
This code change in fixes the issue for me
diff --git a/components/bt/host/bluedroid/btc/profile/std/gatt/btc_gattc.c b/components/bt/host/bluedroid/btc/profile/std/gatt/btc_gattc.c
index 73214a67d..f3a412a9c 100644
--- a/components/bt/host/bluedroid/btc/profile/std/gatt/btc_gattc.c
+++ b/components/bt/host/bluedroid/btc/profile/std/gatt/btc_gattc.c
                                                uint16_t char_handle,
                                                uint16_t *count)
 {
+    int c = *count;
     if (type == ESP_GATT_DB_ALL) {
-        BTA_GATTC_GetDBSize(conn_id, start_handle, end_handle, (int *)count);
+        BTA_GATTC_GetDBSize(conn_id, start_handle, end_handle, (int *)&c);
     } else {
-        BTA_GATTC_GetDBSizeByType(conn_id, type, start_handle, end_handle, char_handle, (int *)count);
+        BTA_GATTC_GetDBSizeByType(conn_id, type, start_handle, end_handle, char_handle, (int *)&c);
     }

+    *count = c;
+
     return ESP_GATT_OK;
 }

Expected Behavior
A call to btc_ble_gattc_get_attr_count should not affect local variables.
Actual Behavior
When I called btc_ble_gattc_get_attr_count, it would overwrite a local variable on the stack.  Similar to the gattc_multi_connect example, I would set notify_en=1.  In some cases the value would be reset to 0 when btc_ble_gattc_get_attr_count is called.
Steps to reproduce
Debug gattc_multi_connect  into BTA_GATTC_GetDBSizeByType and see how the stack is overwritten.
Code to reproduce this issue
You can use gattc_multi_connect and debug into btc_ble_gattc_get_attr_count in the case ESP_GATTC_REG_FOR_NOTIFY_EVT.

@Alvin1Zhang  I have the similar problem but using Blufi, just open the issue today, its messing with all heap and malloc.

New issue tracked in https://github.com/espressif/esp-idf/issues/4715, will close this one, feel free to reopen if the issue in this ticket still happens. Thanks.

authors: Alvin1Zhang filzek paulelong


text:
ESP32-S3-WROOM-2 Octal Flash  (IDFGH-6334)

Environment

Development Kit: ESP32-S3-DevKitC-1
Kit version: ESP32-S3-DevKitC-1
Module or chip used: ESP32-S3-WROOM-2
IDF version: v4.4-dev-3703-gddc44956bf
Build System: idf.py
Compiler version: xtensa-esp32-elf-gcc (crosstool-NG esp-2021r2) 8.4.0
Operating System: macOS
Using an IDE?: No
Power Supply: USB

Problem Description
Tried to use one of the ESP-IDF example projects; Blink and flash it to the ESP32-S3-WROOM-2.
//Detailed problem description goes here.
Expected Behavior
Expected to see the onboard LED flash as per the usual Blink Project outcome.
Actual Behavior
SPIWP:0xee
Octal Flash Mode Enabled
For OPI Flash, Use Default Flash Boot Mode
mode:SLOW_RD, clock div:1
load:0x3fcd0108,len:0x1710
load:0x403b6000,len:0x8c8
load:0x403ba000,len:0x2ed8
entry 0x403b61c0
I (36) boot: ESP-IDF v4.4-dev-3703-gddc44956bf 2nd stage bootloader
I (36) boot: compile time 23:43:05
I (36) boot: chip revision: 0
I (40) boot.esp32s3: Boot SPI Speed : 80MHz
I (44) boot.esp32s3: SPI Mode       : SLOW READ
I (50) boot.esp32s3: SPI Flash Size : 2MB
I (54) boot: Enabling RNG early entropy source...
W (60) bootloader_random: RNG for ESP32-S3 not currently supported
I (67) boot: Partition Table:
I (70) boot: ## Label            Usage          Type ST Offset   Length
I (77) boot:  0 nvs              WiFi data        01 02 00009000 00006000
I (85) boot:  1 phy_init         RF data          01 01 0000f000 00001000
I (92) boot:  2 factory          factory app      00 00 00010000 00100000
I (100) boot: End of partition table
I (104) esp_image: segment 0: paddr=00010020 vaddr=3c020020 size=089b0h ( 35248) map
I (121) esp_image: segment 1: paddr=000189d8 vaddr=3fc91b70 size=02824h ( 10276) load
I (124) esp_image: segment 2: paddr=0001b204 vaddr=40374000 size=04e14h ( 19988) load
I (135) esp_image: segment 3: paddr=00020020 vaddr=42000020 size=18a00h (100864) map
I (162) esp_image: segment 4: paddr=00038a28 vaddr=40378e14 size=08d50h ( 36176) load
I (172) esp_image: segment 5: paddr=00041780 vaddr=50000000 size=00010h (    16) load
I (178) boot: Loaded app from partition at offset 0x10000
I (178) boot: Disabling RNG early entropy source...
W (181) bootloader_random: RNG for ESP32-S3 not currently supported
E (199) Octal Flash: Detected MXIC Flash, but memory type is not Octal
E (200) Octal Flash: No detected Flash chip, please check the menuconfig to see if the chip is supported
abort() was called at PC 0x40381785 on core 0
0x40381785: esp_opiflash_init at /Users/thomasgiles/esp-VS/esp-idf_011221/esp-idf/components/spi_flash/esp32s3/spi_flash_oct_flash_init.c:233 (discriminator 3)
Backtrace:0x40375af2:0x3fceb2100x4037a2a1:0x3fceb230 0x4037fd06:0x3fceb250 0x40381785:0x3fceb2c0 0x40378134:0x3fceb2f0 0x40375370:0x3fceb310 0x403bb02c:0x3fceb340 0x403bb495:0x3fceb380 0x403b6229:0x3fceb4b0 0x40045c01:0x3fceb570  |<-CORRUPTED
0x40375af2: panic_abort at /Users/thomasgiles/esp-VS/esp-idf_011221/esp-idf/components/esp_system/panic.c:402
0x4037a2a1: esp_system_abort at /Users/thomasgiles/esp-VS/esp-idf_011221/esp-idf/components/esp_system/esp_system.c:121
0x4037fd06: abort at /Users/thomasgiles/esp-VS/esp-idf_011221/esp-idf/components/newlib/abort.c:46
0x40381785: esp_opiflash_init at /Users/thomasgiles/esp-VS/esp-idf_011221/esp-idf/components/spi_flash/esp32s3/spi_flash_oct_flash_init.c:233 (discriminator 3)
0x40378134: spi_flash_init_chip_state at /Users/thomasgiles/esp-VS/esp-idf_011221/esp-idf/components/spi_flash/flash_ops.c:176
0x40375370: call_start_cpu0 at /Users/thomasgiles/esp-VS/esp-idf_011221/esp-idf/components/esp_system/port/cpu_start.c:386
Steps to reproduce

cd esp-idf
. export.sh
cd /esp-idf/examples/get-started/blink
idf.py set-target esp32s3
idf.py menuconfig
[*] Enable Octal Flash
idf.py -p /dev/cu.SLAB_USBtoUART flash monitor

// If possible, attach a picture of your setup/wiring here.

Code to reproduce this issue
/* Blink Example
This example code is in the Public Domain (or CC0 licensed, at your option.)
Unless required by applicable law or agreed to in writing, this
software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
CONDITIONS OF ANY KIND, either express or implied.
*/
#include <stdio.h>
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "driver/gpio.h"
#include "esp_log.h"
#include "led_strip.h"
#include "sdkconfig.h"
static const char *TAG = "example";
/* Use project configuration menu (idf.py menuconfig) to choose the GPIO to blink,
or you can edit the following line and set a number here.
*/
#define BLINK_GPIO CONFIG_BLINK_GPIO
static uint8_t s_led_state = 0;
#ifdef CONFIG_BLINK_LED_RMT
static led_strip_t *pStrip_a;
static void blink_led(void)
{
/* If the addressable LED is enabled /
if (s_led_state) {
/ Set the LED pixel using RGB from 0 (0%) to 255 (100%) for each color /
pStrip_a->set_pixel(pStrip_a, 0, 16, 16, 16);
/ Refresh the strip to send data /
pStrip_a->refresh(pStrip_a, 100);
} else {
/ Set all LED off to clear all pixels */
pStrip_a->clear(pStrip_a, 50);
}
}
static void configure_led(void)
{
ESP_LOGI(TAG, "Example configured to blink addressable LED!");
/* LED strip initialization with the GPIO and pixels number*/
pStrip_a = led_strip_init(CONFIG_BLINK_LED_RMT_CHANNEL, BLINK_GPIO, 1);
/* Set all LED off to clear all pixels */
pStrip_a->clear(pStrip_a, 50);
}
#elif CONFIG_BLINK_LED_GPIO
static void blink_led(void)
{
/* Set the GPIO level according to the state (LOW or HIGH)*/
gpio_set_level(BLINK_GPIO, s_led_state);
}
static void configure_led(void)
{
ESP_LOGI(TAG, "Example configured to blink GPIO LED!");
gpio_reset_pin(BLINK_GPIO);
/* Set the GPIO as a push/pull output */
gpio_set_direction(BLINK_GPIO, GPIO_MODE_OUTPUT);
}
#endif
void app_main(void)
{
/* Configure the peripheral according to the LED type */
configure_led();

while (1) {
    ESP_LOGI(TAG, "Turning the LED %s!", s_led_state == true ? "ON" : "OFF");
    blink_led();
    /* Toggle the LED state */
    s_led_state = !s_led_state;
    vTaskDelay(CONFIG_BLINK_PERIOD / portTICK_PERIOD_MS);
}

}
Debug Logs
SPIWP:0xee
Octal Flash Mode Enabled
For OPI Flash, Use Default Flash Boot Mode
mode:SLOW_RD, clock div:1
load:0x3fcd0108,len:0x1710
load:0x403b6000,len:0x8c8
load:0x403ba000,len:0x2ed8
entry 0x403b61c0
I (36) boot: ESP-IDF v4.4-dev-3703-gddc44956bf 2nd stage bootloader
I (36) boot: compile time 23:43:05
I (36) boot: chip revision: 0
I (40) boot.esp32s3: Boot SPI Speed : 80MHz
I (44) boot.esp32s3: SPI Mode       : SLOW READ
I (50) boot.esp32s3: SPI Flash Size : 2MB
I (54) boot: Enabling RNG early entropy source...
W (60) bootloader_random: RNG for ESP32-S3 not currently supported
I (67) boot: Partition Table:
I (70) boot: ## Label            Usage          Type ST Offset   Length
I (77) boot:  0 nvs              WiFi data        01 02 00009000 00006000
I (85) boot:  1 phy_init         RF data          01 01 0000f000 00001000
I (92) boot:  2 factory          factory app      00 00 00010000 00100000
I (100) boot: End of partition table
I (104) esp_image: segment 0: paddr=00010020 vaddr=3c020020 size=089b0h ( 35248) map
I (121) esp_image: segment 1: paddr=000189d8 vaddr=3fc91b70 size=02824h ( 10276) load
I (124) esp_image: segment 2: paddr=0001b204 vaddr=40374000 size=04e14h ( 19988) load
I (135) esp_image: segment 3: paddr=00020020 vaddr=42000020 size=18a00h (100864) map
I (162) esp_image: segment 4: paddr=00038a28 vaddr=40378e14 size=08d50h ( 36176) load
I (172) esp_image: segment 5: paddr=00041780 vaddr=50000000 size=00010h (    16) load
I (178) boot: Loaded app from partition at offset 0x10000
I (178) boot: Disabling RNG early entropy source...
W (181) bootloader_random: RNG for ESP32-S3 not currently supported
E (199) Octal Flash: Detected MXIC Flash, but memory type is not Octal
E (200) Octal Flash: No detected Flash chip, please check the menuconfig to see if the chip is supported
abort() was called at PC 0x40381785 on core 0
0x40381785: esp_opiflash_init at /Users/thomasgiles/esp-VS/esp-idf_011221/esp-idf/components/spi_flash/esp32s3/spi_flash_oct_flash_init.c:233 (discriminator 3)
Backtrace:0x40375af2:0x3fceb2100x4037a2a1:0x3fceb230 0x4037fd06:0x3fceb250 0x40381785:0x3fceb2c0 0x40378134:0x3fceb2f0 0x40375370:0x3fceb310 0x403bb02c:0x3fceb340 0x403bb495:0x3fceb380 0x403b6229:0x3fceb4b0 0x40045c01:0x3fceb570  |<-CORRUPTED
0x40375af2: panic_abort at /Users/thomasgiles/esp-VS/esp-idf_011221/esp-idf/components/esp_system/panic.c:402
0x4037a2a1: esp_system_abort at /Users/thomasgiles/esp-VS/esp-idf_011221/esp-idf/components/esp_system/esp_system.c:121
0x4037fd06: abort at /Users/thomasgiles/esp-VS/esp-idf_011221/esp-idf/components/newlib/abort.c:46
0x40381785: esp_opiflash_init at /Users/thomasgiles/esp-VS/esp-idf_011221/esp-idf/components/spi_flash/esp32s3/spi_flash_oct_flash_init.c:233 (discriminator 3)
0x40378134: spi_flash_init_chip_state at /Users/thomasgiles/esp-VS/esp-idf_011221/esp-idf/components/spi_flash/flash_ops.c:176
0x40375370: call_start_cpu0 at /Users/thomasgiles/esp-VS/esp-idf_011221/esp-idf/components/esp_system/port/cpu_start.c:386

@TGiles1998 HI, thanks for your report. I almost know the issue why. But I have a question that is this flash comes with the module when you bought or you once changed the flash by yourself?

Hi, It is the flash that came with the module I bought,
Thank you for your reply,

@TGiles1998  Sorry for any inconvenience caused. The patch will solve this problem. T和samples are provided in a small limited quantity at the moment. So, IDF support will release then it comes into mass production. If any more questions, please let me know.
opi_flash_MX25UW12345G.txt

@TGiles1998  If this patch solves your issue, this task will be closed soon. Thanks!

Hi, thank you very much for the patch, where should i place this in the idf repository? Thanks again!

@TGiles1998  1. You can change the name to ***.patch, and apply the patch with git directly.  2. You can also manually modify with the information in patch, in file spi_flash_oct_flash_init.c

The current 4.4 which seems to have that patch still gives me a reboot when I activate octal SPI flash (WROOM D3N8R8). Workd normally otherwise with SPIRAM set to octal


text:
Fatal error: Indefinite abort() was called when updating the model

Steps to reproduce the issue:

Take latest master (commit df6497e)
Update the model (model.cc) with the pre-trained one from google.
Build and run on ESP-EYE

Result:
The console show this error:
`W (348) i2s(legacy): legacy i2s driver is deprecated, please migrate to use driver/i2s_std.h, driver/i2s_pdm.h or driver/i2s_tdm.h
I (361) cpu_start: Starting scheduler on PRO CPU.
I (0) cpu_start: Starting scheduler on APP CPU.
abort() was called at PC 0x400dd395 on core 1
Backtrace: 0x40081b66:0x3ffc3340 0x40085cf5:0x3ffc3360 0x4008a78a:0x3ffc3380 0x400dd395:0x3ffc33f0 0x400d8f82:0x3ffc3430 0x400dcb65:0x3ffc3470 0x400d7484:0x3ffc34a0 0x400d63a0:0x3ffc34d0 0x400d605b:0x3ffc3520
ELF file SHA256: 1ed82b9f08a48053
Rebooting...
ets Jun  8 2016 00:22:57
rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0030,len:7312
load:0x40078000,len:16484
ho 0 tail 12 room 4
load:0x40080400,len:4260
entry 0x40080668
I (29) boot: ESP-IDF v5.0.1-464-gef4b1b7704-dirty 2nd stage bootloader
I (29) boot: compile time 15:50:04
I (30) boot: chip revision: v1.0
I (34) qio_mode: Enabling default flash chip QIO
I (39) boot.esp32: SPI Speed      : 80MHz
I (44) boot.esp32: SPI Mode       : QIO
I (48) boot.esp32: SPI Flash Size : 2MB
I (53) boot: Enabling RNG early entropy source...
I (58) boot: Partition Table:
I (62) boot: ## Label            Usage          Type ST Offset   Length
I (69) boot:  0 nvs              WiFi data        01 02 00009000 00006000
I (77) boot:  1 phy_init         RF data          01 01 0000f000 00001000
I (84) boot:  2 factory          factory app      00 00 00010000 00100000
I (92) boot: End of partition table
I (96) esp_image: segment 0: paddr=00010020 vaddr=3f400020 size=11f94h ( 73620) map
I (125) esp_image: segment 1: paddr=00021fbc vaddr=3ffb0000 size=01dfch (  7676) load
I (127) esp_image: segment 2: paddr=00023dc0 vaddr=40080000 size=0bb7ch ( 47996) load
I (146) esp_image: segment 3: paddr=0002f944 vaddr=00000000 size=006d4h (  1748)
I (147) esp_image: segment 4: paddr=00030020 vaddr=400d0020 size=291cch (168396) map
I (203) boot: Loaded app from partition at offset 0x10000
I (204) boot: Disabling RNG early entropy source...
I (215) cpu_start: Pro cpu up.
I (215) cpu_start: Starting app cpu, entry point is 0x400810a4
I (201) cpu_start: App cpu up.
I (232) cpu_start: Pro cpu start user code
I (232) cpu_start: cpu freq: 160000000 Hz
I (232) cpu_start: Application information:
I (237) cpu_start: Project name:     micro_speech
I (242) cpu_start: App version:      df6497e
I (247) cpu_start: Compile time:     Aug 14 2023 15:12:57
I (253) cpu_start: ELF file SHA256:  1ed82b9f08a48053...
I (259) cpu_start: ESP-IDF:          v5.0.1-464-gef4b1b7704-dirty
I (266) cpu_start: Min chip rev:     v0.0
I (270) cpu_start: Max chip rev:     v3.99
I (275) cpu_start: Chip rev:         v1.0
I (280) heap_init: Initializing. RAM available for dynamic allocation:
I (287) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM
I (293) heap_init: At 3FFBE490 len 00021B70 (134 KiB): DRAM
I (300) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM
I (306) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
I (312) heap_init: At 4008BB7C len 00014484 (81 KiB): IRAM
I (319) spi_flash: detected chip: generic
I (323) spi_flash: flash io: qio
W (327) spi_flash: Detected size(4096k) larger than the size in the binary image header(2048k). Using the size in the binary image header.
W (340) ADC: legacy driver is deprecated, please migrate to esp_adc/adc_oneshot.h
W (348) i2s(legacy): legacy i2s driver is deprecated, please migrate to use driver/i2s_std.h, driver/i2s_pdm.h or driver/i2s_tdm.h
I (361) cpu_start: Starting scheduler on PRO CPU.
I (0) cpu_start: Starting scheduler on APP CPU.
abort() was called at PC 0x400dd395 on core 1
Backtrace: 0x40081b66:0x3ffc3340 0x40085cf5:0x3ffc3360 0x4008a78a:0x3ffc3380 0x400dd395:0x3ffc33f0 0x400d8f82:0x3ffc3430 0x400dcb65:0x3ffc3470 0x400d7484:0x3ffc34a0 0x400d63a0:0x3ffc34d0 0x400d605b:0x3ffc3520
ELF file SHA256: 1ed82b9f08a48053
Rebooting...
ets Jun  8 2016 00:22:57`

@misterb0407
Thanks for reporting the issue.
I would like to highlight a point: The model you're using is older one. The newer models(especially from the quantisation perspective) are int8_t, however the model you've shared is uint8 optimised. The esp-nn optimisations will not work for this. The model however, should still work.
Other than that, the input and output sizes are same as expected by the model. Hence, there should not be any additional requirements.
Can you please

Use stable IDF branch (e.g., release/v5.1)
enable gdb_stub from the menuconfig (backtrace will be enable when crash happens)

And share the observations here?

@vikramdattu , for step to enable gdb_stub, I open menuconfig GUI, but nothing happen when I enter it, when i open the file sdkconfig, this is all I see:

GDB Stub                                                                                #                                                                                # end of GDB Stub

@vikramdattu , for step to enable gdb_stub, I open menuconfig GUI, but nothing happen when I enter it, when i open the file sdkconfig, this is all I see..

You can enable gdbstub with following steps:
idf.py menuconfig > Component config > ESP System Settings > Panic Handler Behaviour > Select GDBStub on panic

@misterb0407 I found the issue.
Filter zero point expected is 0, and hence your model aborts at the following line:
    // Filter weights will always be symmetric quantized since we only support
    // int8 quantization. See
    // https://github.com/tensorflow/tensorflow/issues/44912 for additional
    // context.
    TFLITE_DCHECK(filter->params.zero_point == 0);

Please use int8 quantisation to ensure the above condition holds. Looks like, uint8 support is now broken intentionally by tflite!

Hi @vikramdattu , thanks, got it.
So I tried as you suggested, to redo using idf version release/v5.1 with gdstub, but it seems can't find the .elf file
following is the snippet of log. I am using WSL2 + docker

I (379) main_task: Calling app_main()
abort() was called at PC 0x400dd559 on core 0
Backtrace: 0x40081786:0x3ffbc1f0 0x40085aad:0x3ffbc210 0x4008aa4a:0x3ffbc230 0x400dd559:0x3ffbc2a0 0x400d9344:0x3ffbc2e0 0x400dcd45:0x3ffbc320 0x400d77d0:0x3ffbc350 0x400d66fc:0x3ffbc380 0x400d636b:0x3ffbc3e0 0x4008812d:0x3ffbc400
ELF file SHA256: 4235189bef783505
Entering gdb stub now.
$T0b#e6xtensa-esp32-elf-gdb -ex set serial baud 115200 -ex target remote \.\COM3 \wsl$\Ubuntu-22.04/home/misterb/repo/tflite-micro-esp-examples/examples/micro_speech/build/micro_speech.elf: [WinError 2] The system cannot find the file specified
ets Jun  8 2016 00:22:57
rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0030,len:7448
load:0x40078000,len:16476
ho 0 tail 12 room 4
load:0x40080400,len:4
load:0x40080404,len:4284
entry 0x40080668

@misterb0407 not sure why this is not working for you. BTW, you don't need to enter anything manually to trigger the gdb when gdb_stub enabled. It will invoke gdb and load the .elf file for you on crash.
I have attached output from my terminal:
micro_speech_uint8_model_crash.txt
Please find the solution here: https://github.com/espressif/tflite-micro-esp-examples/issues/61#issuecomment-1680178579

@misterb0407 no problem. I am using MacBook for my development. I have not tried with wsl. However, I will provide a link for your reference. Hope it adds some value: https://gist.github.com/abobija/2f11d1b2c7cb079bec4df6e2348d969f
You may refer this training guide to train the micro_speech model.

repo: espressif/tflite-micro-esp-examples


text:
TypeError: Cannot perform Construct on a detached ArrayBuffer

When I open the PDF document, go back and then return again with forward arrow to the previously opened document, I receive an error:
TypeError: Cannot perform Construct on a detached ArrayBuffer
../pdfjs-dist/build/pdf.min.js 22:21357 getDataProp
../pdfjs-dist/build/pdf.min.js 22:17057 getDocument
../dart-sdk/lib_external/js_shared/lib/js_util_patch.dart 110:66 callMethod$
../packages/pdfrx/src/web/pdf.js.dart  71:5 pdfjsGetDocumentFromData
../packages/pdfrx/src/web/pdfrx_web.dart 70:21
../packages/pdfrx/src/web/pdfrx_web  _openByFunc
../dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart  45:50
./dart-sdk/lib/async/zone.dart  1661:54    runUnary
./dart-sdk/lib/async/future_impl.dart  162:18   handleValue
./dart-sdk/lib/async/future_impl.dart  838:44  handleValueCallback
./dart-sdk/lib/async/future_impl.dart 867:13    _propagateToListeners
./dart-sdk/lib/async/future_impl.dart  643:3     [_completeToListeners]
./dart-sdk/lib/async/future_impl.dart  713:6    callback
./dart-sdk/lib/async/schedule_microtask.dart 40:11     _microtaskLoop
./dart-sdk/lib/async/schedule_microtask.dart  49:5      _startMicrotaskLoop
./dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart  181:7
Any ideas?

Please show your code that calls pdfrx.

Unfortunately, I can't. It is a private code. I retrieve the PDFs via PdfViewer and PdfDocumentRefData, Also, what I have noticed, seems that my Layout is faster then my controller - e.g I can't retrieve at the beginning the number of pages, I need to check first if(controller.isReady ? ) then I can get my data - or to make some interaction with the page(scroll, next page etc.), then the controller is ready. Not sure what can cause these problems

I'm not interested in your actual code. Without you providing any kind of code fragments or something that reproduces the issue, I can't do anything.

Is it really OK for you? If you create some repro code (completely new code that reproduces the same issue), it's very helpful to understand your situation.

The problem was when I want to open the document, so I am checking the type of the file. Needed to pack my raw data inside of Uint8List.fromList(rawData). It is done. Tnx anyway

license: MIT


text:
Bulk Delete DoS

Original PR was here.
Description
This module will try to delete all pages, posts and users from a WordPress website vulnerable to a Privilege Escalation exploit found in Bulk Delete plugin.
The vulnerability is fully described here.
Example Output
msf > use auxiliary/admin/http/wp_bulk_delete_privilege_escalation
msf auxiliary(wp_bulk_delete_privilege_escalation) > set RHOST vuln.vln
RHOST => vuln.vln
msf auxiliary(wp_bulk_delete_privilege_escalation) > set USERNAME subscriber
USERNAME => subscriber
msf auxiliary(wp_bulk_delete_privilege_escalation) > set PASSWORD password
PASSWORD => password
msf auxiliary(wp_bulk_delete_privilege_escalation) > check
[*] The target appears to be vulnerable.
msf auxiliary(wp_bulk_delete_privilege_escalation) > run

[*] Authenticating with WordPress using subscriber:password...
[+] Authenticated with WordPress
[*] Deleting all pages
[*] Deleting all posts from all default post types
[*] Deleting all users
[*] Exploitation complete, please check output for details
[*] Auxiliary module execution completed

Tks @panvagenas :+1:

source: gharchive/pull-request

authors: espreto panvagenas

repo: espreto/wpsploit

license: mit

license_source: bigquery


text:
Allow more than one multicast group in live DLT reception configuration

In some projects DLT is sent via same link over different multicast groups
affected version:
make sure to check this before filing an issue:

[x] I checked the documentation and found no answer
[x] I checked to make sure that this issue has not already been filed

Describe what you would like to have
Specify more than one multicast group for DLT live reception.
Potential Workaround
Allowing multiple live streams -- this comes with higher resource consumption.
More Information
here you can supply screenshots or just add more details

Asking once again to prioritize this issue.
It is important to catch up with live measurements for users to be able to use many handy features live (and help improve robustness and performance)!

https://github.com/esrlabs/chipmunk/releases/tag/2.13.0

authors: DmitryAstafyev vladirupanov

repo: esrlabs/chipmunk


text:
How to pass extra auth_token in the params.url() function?

In my project, I need to pass an extra auth param, is there is anyway to append a new param?

Got the solution, here is a way how I can do it.
new NgTableParams({                 'test' : 'test'             }

repo: esvit/ng-table


text:
Create nouvelles definitions - Bodacc & TVA intracommunautaire

Création d'une nouvelle page "Définitions" : Bodacc

@XavierJp : il faudrait faire un redirect 301 de l'ancienne page TVA vers la nouvelle. Je ne retrouve pas l'endroit où c'est géré dans l'app. Est-ce une conf nginx ?

repo: etalab/annuaire-entreprises-site


text:
Any way to change default port?

I mean, how i can use it twice in one vps? One for me and another for my mate?

Change these two lines
https://github.com/etechd/L3MON/blob/acbc29be4db0bd2cf297dcbf61086fa6829c9e37/server/includes/const.js#L5-L6


text:
Video tutorial (FPGA programming)

Pogledati video na sljedećem linku:
https://youtu.be/D-kIoQWeO_E
Kriterijumi prihvatanja:

Prezentovani koncepti su potpuno razumljivi
Dati primjeri su reprodukovani u lokalnom okruženju

Done.

Done.

Done.

Done.

Done


text:
Implement the challenger & defender agents

The challenger agent is started by a verifier when he computes different output roots than the one the sequencer posted to L1. It is reponsible for playing the challenge game and proving that the output root is faulty.
The defender agent is run by the sequencer and monitors the L1 chain for new challenges, and plays the challenge game to deny the assertion that the output root is faulty.

See implementation sketch and additional comments below.

Sketching an MVP for both of these agents.
Some background / context:

Assumption: The defender is the sequencer, the challenger is a verifier.
The sequencer runs an L2 node (which is op-node aka rollup-node aka rollup-driver ++ l2geth aka reference-optimistic-geth). The L2 node is configured in sequencing mode.
The challenger also runs an L2 node, configured in verifier mode.
The sequencer also runs the defender agent, the challenger runs the challenger agent.
In the future, the challenger will trigger its challenger agent whenever it detects a discrepancy between its "safe" output roots (derived entirely from L1 data) and the output roots the sequencer posted to L1.

This is not implemented yet, and will need to be implemented in the op-node.
This is not part of this work.

When triggered, the only "variable" input to the challenger agent is the block number corresponding of the output root to challenge. This must be a block number recorded in the L2 Output Oracle (currently using timestamps, to be modified to use block numbers by this PR).

Challenger agent:

The challenger agent need to be configured with a few parameters. We usually use CLI/env variable for this, see here for an example of this approach. These parameters correspond to the various environment variables that can be set in the demo scripts in the demo/ directory.

The main input is block number.
The challenger agent must also be configured with a JSON-RPC node that it will use to pull preimages when running minigeth in prefetch mode.
It should also be configured with a directory to store fetched preimages and other data to be written to disk. This can default to /tmp/cannon.
We need a parameter for an optional step number at which to trigger a fault. This is called a "register faut" right now, but I'm in the process of changing the implementation to not change a register but memory instead.
Maybe a boolean option to trigger an "output fault" which changes the final output root being written by minigeth. I think this can be subsumed by the above fault at step number mechanism however. Ignore for now or check in with me.

Once triggered, the challenger agent needs to basically follow the "challenger" part of our demo script.

The big difference is that the demo script runs the challenger and the defender synchronously in lockstep: during the challenge game loop, the challenger posts to the chain, then the defender posts, to the chain, etc...
Now, the challenger and defender agents will run concurrently, and will monitor the chain to see if the other party answered. The best way to do this will be to add a event to the respondState function and listen to that event.
So to recap what the challenger agent needs to do:

Upon being started

run minigeth in prefetch mode to prefetch all preimages
run minigeth in MIPS mode to get the initial checkpoint
call initiateChallenge in the Challenge contract
run minigeth in MIPS mode to geth the midpoint step memory hash, and call proposeState in the Challenge contract with that hash

each time the defender answers

if isSearching returns false, call confirmStateTransition to finalize the proof.

handle the case where that doesn't work (because of fault injection, or a bug) gracefully!

otherwise, run minigeth in MIPS mode to geth the midpoint step memory hash (for the remaining range of possible disagreement steps, which shrinks by half at every round), and call proposeState in the Challenge contract with that hash

- exit

The defender agent is mostly a mirror of the challenger agent, but whereas the challenger agent is meant to be started by the l2 node as verifier, the defender agent should alway be running.

CLI parameters: initially only the RPC endpoint, and the preimage directory. Longer-term we'll want to support the fault injection ones too.
The defender agent should listen to the ChallengeCreated event and enter the challenge loop upon seeing it.

For the MVP, I think it's fair to assume a single concurrent challenge. But we should write the code in a way that multiple challenges can be easily defended in the future (mostly, this means not messing with global state).

Then, just like above, it's a matter of following the defender part of the demo script.
To recap, the defender agent needs to:

upon detecting a a challenge

run minigeth in prefetch mode to prefetch all preimages
run minigeth in MIPS mode to get the initial checkpoint
call initiateChallenge in the Challenge contract
run minigeth in MIPS mode to geth the midpoint step memory hash (as proposed by the challenger !!), and call respondState in the Challenge contract with that hash

if the midpoint exceeds what the defender thinks is the length of the execution trace, submit the final memory hash instead (valid below as well)

each time the challenger answers

run minigeth in MIPS mode to geth the midpoint step memory hash (for the remaining range of possible disagreement steps, as previously proposed by the challenger), and call proposeState in the Challenge contract with that hash
if isSearching returns false after doing that, call denyStateTransition to finalize the proof.

handle two possible failure case gracefully

transaction succeeds, but ChallengerLosesByDefault was emitted, we can't prove we were right, but neither can the challenger, and the defender wins by default unless the challenger can assert his claim

okay to just print this in the MVP ... longer term we need to spin a background thread to monitor this

transaction fails (because of a bug, or later, because of fault injection)

return to listening to challenges

Closing this, out of scope for Cannon as FP-VM. We are reducing scope, and the program, VM and dispute-game projects are all separate smaller projects now. The challenger is part of the dispute-game, but may be split out further too. Cannon will just have a simple CLI to use the core functionality of generating proof data.

authors: norswap protolambda

repo: ethereum-optimism/cannon


text:
🧪 Mad Science Project Idea: Onchain Gaming Achievement System

What is an Mad Science Project Idea?
A Mad Science Project Idea is an idea for a project within the Optimism ecosystem that may not have clear value but is generally cool as heck. Mad Science Project Ideas make great hackathon projects and tend to be a great way to explore Optimism, OP Mainnet, and the OP Stack.

Summary
Create a decentralized achievement system as a public good that other games can build with.
Possible Features

Traditional achievement system that activates an achievement-attestation when you accomplish something in-game.
“Props” system that you can say a teammate was good at healing, DPS, etc, to help with finding pickup groups in other games.
Onchain multi-game achievement rewards for being good at multiple titles.
User-created achievements and voting system.
API for parsing achievement data to display in-game.

Interesting

Hey. We started working on it. We’ll share our ideas asap.

authors: 0xjunger XtheWiz smartcontracts


text:
Environment dropdown

Move Environment dropdown in Contract tab on top

perhaps some possible improvement:

select exe env and the dropdown list on the same line.
Transaction gas limit on the left.
Value 'e.g' ....  on the left.
make padding/margin uniform.

Perhaps: Value [.......] (e.g. .7 ether ...), i.e. the input box in between.

@chriseth @yann300 I will create a new pull request, so we can close this one

authors: chriseth ninabreznik yann300

repo: ethereum/browser-solidity


text:
Instrumenting project for unit testing

Addressing #8.

This is just a small commit to get feedback from @axic and @chriseth on whether it makes sense to continue this approach to unit testing the app modules.

Not sure what you mean here. Yes, we should have unit tests. Although I think that this unit test in particular is not a very good example. The actual name used in storage should be internal information.

I mean, are you ok with using mocha and the way that this is setup? (Agreed that the test is weak.)
Any ideas for how to hook it into travis?

Pulled out the utils-test example. Committed an example of "testing" compiler.js. It's really just a smoke test for now, and more importantly, a way to expose dependencies and help decoupling efforts.

I personally like mocha, but since solc-js uses tape, perhaps we should follow?

I used tape for solc-js because ethereumjs seems to use it and there is a general trend towards lightweight stuff in npm-world. We have a much stronge requirement for the testing framework to be able to work with karma. If that works equally well with tape and there are no other objections, I would propose to use tape.

As far as travis is concerned: Just copy the .travis.yml file from solc-js and it will work.

ethereumjs is undergoing a move to tape and I think one of them has karma with tape (others have karma with mocha)

@chriseth:

Just copy the .travis.yml file from solc-js and it will work.

I'm not sure what you mean. Currently, travis runs the build, right? I assume we want to continue running that build, and then also run the tests. I need some guidance on how to hook the tests into current travis process.

Oh I am sorry, I somehow looked at the wrong repository. .travis.yml currently has
script: npm run lint && npm run build

and I think changing that to
script: npm run lint && npm run test && npm run build

will do the trick.

Wow, trying to get these modules under test via node.js is proving difficult due to tight coupling to the browser. I'm going to spend some time seeing if I can decouple, but it might be more practical to start with browser-based tests.

@axic @chriseth Feedback requested. You can see the test output in the travis results. I tested query-params.js by allowing the tests to provide a fake window object.

Looks good, although I agree - it is probably better to start with a browser test first, just as a quick check if some basic functions work of if a tiny comma error broke everything.

For now, I think I'll keep going down this unit testing road, since it does help expose dependencies between modules. Let me know if you think I should revert and focus on browser-testing.

We should do both unit and integration tests, I think

@chriseth Understood re: two kinds of testing. For this PR, I'm focused on unit testing.

Please rebase.

@chriseth rebased

authors: axic chriseth redsquirrel


text:
SSZ: explicit ordering vs sorted-by-field

ebc136a
When hashing containers using SSZTreeHash, it is currently specified that fields short be sorted lexicographically.
There are advantages:

generic solution
no mental overhead to decide where fields go, can focus on "logical" ordering in spec

There are a few downsides of this approach however:

Variable-length fields make offsets non-predictable even for fixed-length fields
Reduced possibility to group similar fields together, for example by data type, to exploit bulk operations

Alternative approaches:

Manual ordering - enforce that hashing is done in same order as in spec, and control a good ordering manually

Often coupled with a restriction that new fields are added at end for upgrades, to maintain soft compatibility with previous versions

Data-type based ordering - generally, these kinds of orderings group data by type, putting fixed-length fields before variable-length fields - this gives each field a fixed relative offset making it easy to look up. This kind of ordering also helps keep aliasing issues at a minimum.

+1 for manual ordering

closed via #339

authors: JustinDrake arnetheduck djrtwo


text:
Package the pyspec

Branched of my remerkleable PR, with the phase1 PR merged in.
Changes:

Integration things to make remerkleable work for test generation etc.
Organize config loading code better
Do away with the spec build code, move in the core logic to setup.py, as a dist-utils command, and integrated into default build + dev command.
Updated build/makefile things, read the readme pyspec doc in the tests/core/pyspec dir for usage instructions.

With this PR, it becomes super easy to install the spec as dependency, and write python tools to toy around with the spec.
Example set up:
#!/bin/bash

mkdir spec-experiment
cd spec-experiment

python3 -m venv venv
. venv/bin/activate

# Or use your branch of choice
pip install "git+https://github.com/ethereum/eth2.0-specs@pkg-the-pyspec"

# Or editable mode (make sure to run pyspecdev to get editable spec files, instead of relying on re-building the spec):
# pip install -e /path/to/spec
# cd /path/to/spec && python setup.py pyspecdev

echo "
from eth2spec.phase0 import spec
print(spec.BeaconState)
" >> experiment_code.py

python3 experiment_code.py

Or in steps:

create your venv (as with any project)
one command to install spec from git (whatever branch you need, or locally) with pip
from eth2spec.phase0 import spec (phase 1 works too)
write some fun python!

It's that easy now :tada:

Yeah, agreed. stub fine.
Let's figure out a flow to integrate version before next release

excellent job!

authors: djrtwo protolambda


text:
[testgen] turn off phase 1, turn on HF1, and refactoring

Address #2191

Turn off phase 1 test generators
Turn on lightclient_patch (HF1) test generators

Refactor the generators

Rewrite helper functions in tests/core/gen_helpers/gen_from_tests/gen.py and reduce the code in generator main.py.

TODO

[x] run testgen with mainnet config locally.
[x] update README.md files

Thanks @protolambda!

I checked the outputs and fixed the missing shuffling requirements.txt update.
Update the docs.

nice refactor!

authors: djrtwo hwwhww


text:
bug: Linux missing font

Logged out: Fontconfig warning: "/etc/fonts/fonts.conf", line 86: unknown element "blank"

might help: https://github.com/electron/electron/issues/15625#issuecomment-480997929

authors: evertonfraga marcgarreau

repo: ethereum/grid

license: ISC


text:
Add get_transaction_receipt method to Chain API

What was wrong?
Currently, if we want to implement the getTransactionReceipt JSON RPC functionality, then we would have to go all the way to the ChainDB part of the Chain API. This PR aims to make this functionality available as part of the Chain API, so that the convention of JSON RPC implementations using only the Chain API and not the chaindb part of the Chain, is followed.
How was it fixed?
The get_receipt_by_index of chaindb was used in the Chain API, so as to abstract the usage.
Cute Animal Picture

@cburgdorf could you please review this? This is a part of the PR https://github.com/ethereum/trinity/pull/122

@pipermerriam review please. Thankyou.

@Bhargavasomu went ahead and merged it in preparation of a new release being cut within the next few days.

authors: Bhargavasomu cburgdorf

repo: ethereum/py-evm


text:
wip: redesign receipt/tx trie generation on block imports

We used to generate the tries for all block's transactions/receipts
after applying every transaction, but that is way too expensive. Now the
trie data is only generated once, after we've applied all transactions

The second thoughts of this PR:
[Previously]

The transaction and receipt roots are calculated in State.add_transaction().
Each time VM.apply_transaction() is called, the vm.block.header is updated with the latest transaction_root and receipt_root.

[Now]

State.add_transaction() returns receipt.
The transaction and receipt roots are calculated in VM.import_block(self, block).
Each time VM.apply_transaction() is called, the vm.block.header isn't updated with the latest transaction_root and receipt_root.

I took a look at vm.mine_block() which hasn't been changed in this PR:
https://github.com/gsalgado/py-evm/blob/bceb324d7f33b4d41aa1cead97229414021906b7/evm/vm/base.py#L164-L176
I think now the vm.mine_block and chain.mine_block() don't work as what it used to be: return a mined block,  because the current block (vm.block) hasn't been updated with correct transaction_root and receipt_root.
The fastest way to solve it may be calculating the roots in vm.mine_block() instead of in vm.import_block(), and we lost the propoerty of "having vm.block always has the latest roots info".

#573 has an optimization to make_trie_root_and_nodes() that we could do instead of what's suggested here. I'd need to profile it more thoroughly to make sure it's good enough but I'd be happy to go with that if you guys think that's preferable

Oooooh, correct my own words: for the witness, we don't need trie_data_dict, only need the state trie branches, the main difference between is do we expect state.apply_transaction() returns the block with latest header or not.
If #573 doesn't work well, may be we could redesign the APIs to be "for importing a block (only generating the root once per block)" and "for creating a block (generating the root per transaction?)". Maybe divide state.apply_transaction into multiple functions.

authors: gsalgado hwwhww


text:
Process onchain application

including approval

superseeded by #50

repo: etherisc/flightdelay-ui


text:
how to handle underwriting if referral is no longer valid

the current implementation is to revert in this case.

will stay as is for now. policy needs to be closed and a new application made.

repo: etherisc/gif-next


text:
-X PUT /stewardship adds to batch utilization

Context
bee 1.17.3
Summary
When using the new -X PUT /stewardship with the swarm-postage-batch-id header, the specified batch's bucket utilization is being incremented even though the reference being re-pushed was originally stamped by the same batch.
Expected behavior
Pre 1.17, a -X PUT /stewardship did not increment the batch bucket utilization, but re-pushed the chunks to the swarm using the original stamp.
Actual behavior
The /batch/{batchID}/buckets output shows that individual buckets are being incremented when the batch is used in a -X PUT /stewardship invocation, even though all chunks being re-pushed were originally uploaded on the same stamp.
Steps to reproduce
Upload a file on a stamp, pull the /batch/{batchID}/buckets to a file.  Then do a -X PUT /stewardship on the same reference with the same batch.   Pull another copy of /batch/{batchID}/buckets and compare the two.
Possible solution
If a chunk is being re-pushed to the swarm by -X PUT /stewardship, and the chunk is stamped by the same batch, re-upload the original chunk and stamp (bucket/index) rather than double-dinging the batch for another stamp for a chunk that should already be in the swarm.
After inspecting the source code, I suspect that if "the file was uploaded on the same node before, it will re-use the same batch." (from the API docs), then that batch's buckets will also be re-incremented by the /stewardship call since the whole thing only grabs the batch and not the full stamp (bucket/index) but instead goes back through a stamper/putter/uploader.  I have tried not specifying the header, but all I get are errors even though /debugstore plainly shows millions of uploaded chunks since the migration to 1.17.

I have not been able to simulate this error. To reproduce it, the following steps were performed:

A new fresh node was started from the current master 84b6eaad and funded with 0.5 GETH and 1 GBZZ
A new stamp was purchased: curl -XPOST http://localhost:1635/stamps/1000000/30 {"batchID":"c66db1a27e84e3fab4e0d932011d4faf2bfd3450b8199d0c393a92cd4303bff3","txHash":"0x76b6a337e355d8e5ab5c38c24531693c12fd72b74ec31088f31e1813031ca46b"}
A ~5MB file was uploaded: curl -H "Swarm-Postage-Batch-Id: c66db1a27e84e3fab4e0d932011d4faf2bfd3450b8199d0c393a92cd4303bff3" -H "Content-Type: video/mp4" -H "Swarm-Encrypt: false" -H "Swarm-Deferred-Upload: true" -H "Swarm-Pin: true" --data-binary @file.mp4 http://localhost:1633/bzz {"reference":"23fadbc7be705b79e18c041fd839566747d66fc27215fd40650fed2ad7956aae"}
A snapshot of stamp buckets was taken after the successful file upload: curl http://localhost:1635/stamps/c66db1a27e84e3fab4e0d932011d4faf2bfd3450b8199d0c393a92cd4303bff3/buckets | jq > old
Stewardship endpoint was invoked: curl -XPUT -H "Swarm-Postage-Batch-Id: c66db1a27e84e3fab4e0d932011d4faf2bfd3450b8199d0c393a92cd4303bff3" http://localhost:1633/stewardship/23fadbc7be705b79e18c041fd839566747d66fc27215fd40650fed2ad7956aae {"code":200,"message":"OK"}
A second snapshot of stamp buckets was taken after the successful stewardship invocation: curl http://localhost:1635/stamps/c66db1a27e84e3fab4e0d932011d4faf2bfd3450b8199d0c393a92cd4303bff3/buckets | jq > new
No difference was found by executing: diff old new

@ldeffenb if this is still an issue with the latest master 84b6eaad, can you provide step-by-step instructions (similar to the above) on how to reproduce it?

@ldeffenb if this is still an issue with the latest master 84b6eaad, can you provide step-by-step instructions (similar to the above) on how to reproduce it?

I'm a bit hesitant to put 1.17.4-rc3 onto my OSM uploader node which is my only node with a stamp to test this.   I can test it with 1.17.3 if you think that would help.
I believe it may only happen for chunks that were stamped and uploaded before the localstore migration.  Chunks uploaded after the migration are recorded in a table that might actually be able to recall the bucket index information from the batch.
I have a /stewarship checker running right now, but unfortunately it is running against the latest OSM upload version which was done after the localstore migration.

I would add a log to the stamper/putter that is invoked by -X PUT /stewardship, but I've got 6 or 7 multi-day pinner passes running against this node that I really don't want to have to restart right now.   But I might go ahead and add that hack to my build so that it's ready when I do have an opportunity to put it in place.

And it is definitely an ongoing thing with -X PUT /stewardship.   Here's the same stamp's buckets at 10:16.  Even more incremented buckets since 10:10.
Uploading 20230919-1016-buckets.txt…

@ldeffenb if this is still an issue with the latest master 84b6eaad, can you provide step-by-step instructions (similar to the above) on how to reproduce it?

I'm a bit hesitant to put 1.17.4-rc3 onto my OSM uploader node which is my only node with a stamp to test this. I can test it with 1.17.3 if you think that would help.
I believe it may only happen for chunks that were stamped and uploaded before the localstore migration. Chunks uploaded after the migration are recorded in a table that might actually be able to recall the bucket index information from the batch.
I have a /stewarship checker running right now, but unfortunately it is running against the latest OSM upload version which was done after the localstore migration.

Unfortunately, that's the case for chunks uploaded before the localstore migration. If you want to fix this, you'll have to upload them again. I'm closing this issue for now. Feel free to reopen it if the problems persist after you re-upload the chunks.

Or I'll write my own migration for all of the pinned chunks that hopefully still have stamps attached to them somewhere...

authors: ldeffenb mrekucci

repo: ethersphere/bee


text:
perf: change leveldb block size to 1mb

Checklist

[x] I have read the coding guide.
[ ] My change requires a documentation update, and I have done it.
[ ] I have added tests to cover my changes.
[x] I have filled out the description and linked the related issues.

Description
Changes LevelDB block size to 1mb.

We will revisit this during the hardening phase.

authors: aloknerurkar mrekucci


text:
chore(master): release 0.19.1

:robot: I have created a release beep boop
0.19.1 (2023-02-27)
Features

upgrade to bee 1.12.0 (#321) (969feeb)

This PR was generated with Release Please. See documentation.

:robot: Release is at https://github.com/ethersphere/swarm-desktop/releases/tag/untagged-4b9e1634c4a9c4628704 :sunflower:

repo: ethersphere/swarm-desktop


text:
Update PrivacyExperience API calls to use ExperienceLanguage endpoints instead

Is your feature request related to a specific problem?
After https://github.com/ethyca/fides/issues/3252 goes in, we will need to swap out the FE endpoints to call the new endpoints that will be on ExperienceLanguage instead
Describe the solution you'd like
Should just be a matter of swapping out the API URLs, and maybe some parameters
Describe alternatives you've considered, if any
A description of any alternative solutions or features you've considered.
Additional context
Blocked by https://github.com/ethyca/fides/issues/3252

Closed by https://github.com/ethyca/fides/pull/3313

moving to done

authors: Roger-Ethyca allisonking

repo: ethyca/fides


text:
Add configure-python step to run_infrastructure.py Make jobs

Purpose
@adriaaaa and @conceptualshark both ran into an issue earlier when running make quickstart where virtualenv was not installed (see: https://ethyca.slack.com/archives/C029HFVSC8L/p1646935020342749). We need to be sure that the Python environment is consistent for any Make commands that will invoke run_infrastructure.py
Changes

Adds configure-python PHONY dep. to be called before any Make jobs that use run_infrastructure.py so that we can be sure the Python environment includes virtualenv

Closing this to change tack here.

repo: ethyca/fidesops


text:
Minor - Use norm instead of squared norm for features_distance_threshold?

see here:
https://github.com/ethz-asl/segmatch/blob/d7f3da4ae40f9b24f6de38c800537ad989a4cb4a/segmatch/src/opencv_random_forest.cpp#L217

.norm() requires one square root operation more for each comparison which is why I kept it as .squaredNorm(). We can always specify the the squared norm threshold. What do you think?

This sounds like over optimization too me. When you trade of simplicity, especially for the meaning of a parameter (with which a human has to operate efficiently and safely), and runtime performance go for simplicity unless it really matters. In that case I don't see it really mattering.
Furthermore in this case you don't need to decide. Because as a compromise you can square the parameter into into a temporary (before the loop) and then compare that temporary with the squaredNorm.
This also goes much better in line with another rule:
keep optimization local if ever possible. This is because optimization creates complex and or surprising code. And this type of code must be small or it is going to be wrong :) and possibly wrong many time through the lifetime of the project.
Another thing concerning these lines:
If normalize_eigen_for_hard_threshold is a true parameter (it use used both ways) then I would change this loop. Otherwise of course remove it. The problem is that the current design makes its false-case much more inefficient than it should be. Mostly because it enforces an extra malloc and free per iteration!
Dynamic memory allocation quite often is a evil bottleneck. So you don't won't that per one of MANY iterations. And I assume it is MANY because of this issue.
So first: move the Eigen::MatrixXd f1 and f2 out of the for loop. (saves all mallocs except the two). Second: if it is interesting to save the extra copy as well in the false-case do the following:
      auto feature_distance_threshold_squared = std::pow(params_.feature_distance_threshold , 2);
      if (params_.normalize_eigen_for_hard_threshold) {
        Eigen::MatrixXd f1 = candidate.features1_;
        Eigen::MatrixXd f2 = candidate.features2_;
        for (const auto & candidate: candidates_after_first_stage) {
            f1 = candidate.features1_;
            f2 = candidate.features2_;
            normalizeEigenFeatures(&f1);
            normalizeEigenFeatures(&f2);
            if ((f1 - f2).squaredNorm() < feature_distance_threshold_squared) {
              candidates.push_back(candidate);
            }
          }
      } else {
        for (const auto & candidate: candidates_after_first_stage) {
          if ((candidate.features1_ - candidate.features2_).squaredNorm() < feature_distance_threshold_squared) {
            candidates.push_back(candidate);
          }
        }
      }

I know it contains some ugly duplication but it is very local but should be quite rewarding optimization wise. To make it a bit cleaner and the duplication more local: convert the bodies of the two for loops to a inlineable function.

As always Hannes, fantastic in-depth advice! I appreciate it.
@rdube, i'm fine with either solution. I was just pointing out this small discrepancy, so that the interface is as consistent with the underlying as possible ;)

Also, the following parameters originally left me confused every time I forgot about them, requiring that I peek at the code:
  A: n_nearest_neighbours
  B: enable_two_stage_retrieval
  C: apply_hard_threshold_on_feature_distance

A | B | C
T   T   T        -> knn then hard threshold
T   T   F        -> knn then RF
T   F   *         -> knn ?
F   *    *         -> RF
I feel like a solution would be:
knn yes/no
--- with-hard-threshold  yes/no
RF yes/no
which leaves the two main algorithms uncoupled. knn without RF works, RF without knn works. knn+RF works.
@rdube, what's your opinion? If you're interested I can work on this when I have a few minutes :)

Thanks for your input! @HannesSommer that looks good, I'll try to change this in the near future.
@exodaniel yes this is indeed a bit confusing. I would recommend opening a separate issue if we need to discuss further. Your solution looks good. Feel free to propose a modification in that sense. We should also check to catch impossible combinations and exit. Thanks for pointing this out!

authors: HannesSommer exodaniel rdube

repo: ethz-asl/segmatch


text:
Can you please add some example code of receving snmp V3 Traps and Notifications

Can you please add some example code of receving snmp V3 Traps and Notifications

How about these examples?

Thanks lot. It's useful.
And how can the manager deal with the received OIDs usually ? (how to interpret the OIDs)
And how can I store the received data into ElasticSearch or forward to Kafka ?

In pysnmp, OID acts like a tuple of integer sub-OIDs. Or as a human-friendly string of dot-separated integers. So manager can use either of these two representations.
Take a look at how people deal with pysnmp and MongoDB for inspiration. ;)

@etingof it seems that snmplabs.com is down

authors: Asalle etingof zhaohangbo

repo: etingof/pysnmp


text:
fix clang cfi

Addresses #8

Thanks for the contribution!


text:
Add dataset integrity check using hash for internal datasets

🚀 Feature Request
We want to add dataset integrity check for two reasons:

Catch a dataset change in a data source.
Help users understand that their local version of the dataset is different from the version in the library.

Proposal

Add hash to dataset_dict for every part of dataset, like:

{
"ETTh2": {
      "get_dataset_function": partial(get_ett_dataset, dataset_type="ETTh2"),
      "freq": "H",
      "parts": ("train", "test", "full"),
      "hash": (
            "837e3b8d9f06ec245f55c90dc5b8b324",
            "837e3b8d9f06ec245f55c90dc5b8b325",
            "837e3b8d9f06ec245f55c90dc5b8b326"
        )
  }
}

Add read_dataset function. It will unzip local version of dataset, build hash and load dataset in pd.DataFrame :

def read_dataset(dataset_path: Path) -> Tuple(pd.DataFrame, str):
    ...

We use hashlib.md5 as the hash algorithm.
Use read_dataset  function in load_dataset to load dataset. Compare local hash with hash from dataset_dict. Add a warning if they are different.

Test cases

Check that the library hashes match the hashes from the data source.

Additional context
No response

Closed by https://github.com/etna-team/etna/pull/151.

repo: etna-team/etna


text:
Update Node.php

$columns was not applicable in all() function...

"voidal"? Why? It should be "void", shouldn't it?

@atorscho voidal is Finnish for void.

authors: atorscho bbashy hamrahpay

repo: etrepat/baum


text:
Improve the onboarding in the readme.

Guide for setting the database up.
Guide for checking that the system is running.

@ryanbnl thank you!
@f11h can you have a look at the changes?

Thanks for the detailed description @ryanbnl !

authors: daniel-eder f11h ryanbnl


text:
Performance problems at first call to DynamoDb

I have created a lambda function in Java for Cognito. When the Lambda function is started for the first time (coldstart) it takes about 100ms for startup. As soon as I try to access a dynamodb database the coldstart time increases to 6 seconds!
This also occurs if the table does not have any rows in it. The dynamoDb and the lambda-function are of course in the same region.
The question is if you also experience such bad coldstarttimes with DynamoDB access and if you have any suggestions how to get rid of it.
The core function I am currently using is:
public class PostAuthentication implements RequestHandler<CognitoEvent, CognitoEvent> {

protected DynamoDB dynamoDb;

private DynamoDB getDynamoDbClient() {
	if (dynamoDb != null)
		return dynamoDb;
	AmazonDynamoDBClient client = (AmazonDynamoDBClient) AmazonDynamoDBClientBuilder.standard()
			.withRegion(Regions.EU_CENTRAL_1).build();
	this.dynamoDb = new DynamoDB(client);// new AmazonDynamoDB(client);
	return dynamoDb;
}

@Override
public CognitoEvent handleRequest(CognitoEvent event, Context context) {
	context.getLogger().log("Input for cognito: " + event);
            // the following line makes the difference between 100ms and 6 secs coldstart-time
	Item item = getDynamoDbClient().getTable(CustomerDbo.TABLENAME).getItem("id", "test");
    }
}

Hey @mikes222  - that's very interesting, but I'm a bit confused - what is this in relation to? Is this an "issue" with any of the modules here?
Cheers,
Eugen.

I haven't heard back from you @mikes222 - closing this one.

repo: eugenp/tutorials


text:
50035 Invalid Form Body upon basically anything register-related

Hi all, hope all is well and you are safe.
I'm attempting to test my bot with discord-py-slash-command, but I'm getting a RequestFailure: Request failed with resp: 400 | {"code": 50035, "errors": {"application_id": {"_errors": [{"code": "NUMBER_TYPE_COERCE", "message": "Value \"<built-in function id>\" is not snowflake."}]}}, "message": "Invalid Form Body"} when I try to discord_slash.utils.manage_commands.get_all_commands, or when I try to manage_commands.add_slash_command.
I'm only using example code from the docs and in the issues while troubleshooting, so I'm really confused about what's happening!
I'm running this:
    def __init__(self, bot):
        if not hasattr(bot, "slash"):
            # Creates new SlashCommand instance to bot if bot doesn't have.
            bot.slash = SlashCommand(bot, override_type=True, auto_register=True)
        self.bot = bot
        self.bot.slash.get_cog_commands(self)

    def cog_unload(self):
        self.bot.slash.remove_cog_commands(self)

    @cog_ext.cog_slash(name="ping")
    async def ping(self, ctx: SlashContext):
        await ctx.send(content="Pong!")

def setup(bot):
    bot.add_cog(Slash(bot))

Any help would be extremely appreciated!
Thanks,
-Dan
Edit: It's almost definitely my own incompetence and stupidly causing something!

... when I try to discord_slash.utils.manage_commands.get_all_commands, or when I try to manage_commands.add_slash_command.

I think it might be the problem of passed args at those functions, can I see how did you use that? (Hide the token when you post it of course.)

... when I try to discord_slash.utils.manage_commands.get_all_commands, or when I try to manage_commands.add_slash_command.

I think it might be the problem of passed args at those functions, can I see how did you use that? (Hide the token when you post it of course.)

I'm pretty sure you are not passing bot.user.id to the functions.

I'm pretty sure you are not passing bot.user.id to the functions.

authors: MrSpinne eunwoo1104 pixelflowxyz