diff --git a/.github/workflows/horizon.yml b/.github/workflows/horizon.yml index df314900d2..677a60b835 100644 --- a/.github/workflows/horizon.yml +++ b/.github/workflows/horizon.yml @@ -33,9 +33,9 @@ jobs: env: HORIZON_INTEGRATION_TESTS_ENABLED: true HORIZON_INTEGRATION_TESTS_CORE_MAX_SUPPORTED_PROTOCOL: ${{ matrix.protocol-version }} - PROTOCOL_20_CORE_DEBIAN_PKG_VERSION: 20.1.0-1656.114b833e7.focal - PROTOCOL_20_CORE_DOCKER_IMG: stellar/unsafe-stellar-core:20.1.0-1656.114b833e7.focal - PROTOCOL_20_SOROBAN_RPC_DOCKER_IMG: stellar/soroban-rpc:20.2.0 + PROTOCOL_20_CORE_DEBIAN_PKG_VERSION: 20.2.0-1716.rc3.34d82fc00.focal + PROTOCOL_20_CORE_DOCKER_IMG: stellar/unsafe-stellar-core:20.2.0-1716.rc3.34d82fc00.focal + PROTOCOL_20_SOROBAN_RPC_DOCKER_IMG: stellar/soroban-rpc:20.3.0-rc1-52 PROTOCOL_19_CORE_DEBIAN_PKG_VERSION: 19.14.0-1500.5664eff4e.focal PROTOCOL_19_CORE_DOCKER_IMG: stellar/stellar-core:19.14.0-1500.5664eff4e.focal PGHOST: localhost diff --git a/Makefile b/Makefile index e07da4d9b8..abacb05dd8 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ # Docker build targets use an optional "TAG" environment # variable can be set to use custom tag name. For example: # TAG=my-registry.example.com/keystore:dev make keystore -XDRS = xdr/Stellar-SCP.x \ +DOWNLOADABLE_XDRS = xdr/Stellar-SCP.x \ xdr/Stellar-ledger-entries.x \ xdr/Stellar-ledger.x \ xdr/Stellar-overlay.x \ @@ -12,11 +12,14 @@ xdr/Stellar-contract-meta.x \ xdr/Stellar-contract-spec.x \ xdr/Stellar-contract.x \ xdr/Stellar-internal.x \ -xdr/Stellar-contract-config-setting.x \ -xdr/Stellar-lighthorizon.x +xdr/Stellar-contract-config-setting.x + +XDRS = $(DOWNLOADABLE_XDRS) xdr/Stellar-lighthorizon.x + + XDRGEN_COMMIT=e2cac557162d99b12ae73b846cf3d5bfe16636de -XDR_COMMIT=bb54e505f814386a3f45172e0b7e95b7badbe969 +XDR_COMMIT=b96148cd4acc372cc9af17b909ffe4b12c43ecb6 .PHONY: xdr xdr-clean xdr-update @@ -41,7 +44,7 @@ recoverysigner: regulated-assets-approval-server: $(MAKE) -C services/regulated-assets-approval-server/ docker-build -gxdr/xdr_generated.go: $(XDRS) +gxdr/xdr_generated.go: $(DOWNLOADABLE_XDRS) go run github.com/xdrpp/goxdr/cmd/goxdr -p gxdr -enum-comments -o $@ $(XDRS) gofmt -s -w $@ @@ -49,7 +52,7 @@ xdr/%.x: printf "%s" ${XDR_COMMIT} > xdr/xdr_commit_generated.txt curl -Lsf -o $@ https://raw.githubusercontent.com/stellar/stellar-xdr/$(XDR_COMMIT)/$(@F) -xdr/xdr_generated.go: $(XDRS) +xdr/xdr_generated.go: $(DOWNLOADABLE_XDRS) docker run -it --rm -v $$PWD:/wd -w /wd ruby /bin/bash -c '\ gem install specific_install -v 0.3.8 && \ gem specific_install https://github.com/stellar/xdrgen.git -b $(XDRGEN_COMMIT) && \ @@ -65,6 +68,6 @@ xdr/xdr_generated.go: $(XDRS) xdr: gxdr/xdr_generated.go xdr/xdr_generated.go xdr-clean: - rm xdr/*.x || true + rm $(DOWNLOADABLE_XDRS) || true xdr-update: xdr-clean xdr diff --git a/gxdr/xdr_generated.go b/gxdr/xdr_generated.go index b66e0a2c7c..9d9ab290bb 100644 --- a/gxdr/xdr_generated.go +++ b/gxdr/xdr_generated.go @@ -4341,8 +4341,10 @@ type StateArchivalSettings struct { MaxEntriesToArchive Uint32 // Number of snapshots to use when calculating average BucketList size BucketListSizeWindowSampleSize Uint32 + // How often to sample the BucketList size for the average, in ledgers + BucketListWindowSamplePeriod Uint32 // Maximum number of bytes that we scan for eviction per ledger - EvictionScanSize Uint64 + EvictionScanSize Uint32 // Lowest BucketList level to be scanned to evict entries StartingEvictionScanLevel Uint32 } @@ -28604,7 +28606,8 @@ func (v *StateArchivalSettings) XdrRecurse(x XDR, name string) { x.Marshal(x.Sprintf("%stempRentRateDenominator", name), XDR_Int64(&v.TempRentRateDenominator)) x.Marshal(x.Sprintf("%smaxEntriesToArchive", name), XDR_Uint32(&v.MaxEntriesToArchive)) x.Marshal(x.Sprintf("%sbucketListSizeWindowSampleSize", name), XDR_Uint32(&v.BucketListSizeWindowSampleSize)) - x.Marshal(x.Sprintf("%sevictionScanSize", name), XDR_Uint64(&v.EvictionScanSize)) + x.Marshal(x.Sprintf("%sbucketListWindowSamplePeriod", name), XDR_Uint32(&v.BucketListWindowSamplePeriod)) + x.Marshal(x.Sprintf("%sevictionScanSize", name), XDR_Uint32(&v.EvictionScanSize)) x.Marshal(x.Sprintf("%sstartingEvictionScanLevel", name), XDR_Uint32(&v.StartingEvictionScanLevel)) } func XDR_StateArchivalSettings(v *StateArchivalSettings) *StateArchivalSettings { return v } diff --git a/xdr/Stellar-contract-config-setting.x b/xdr/Stellar-contract-config-setting.x index b187a18c5a..6b5074735d 100644 --- a/xdr/Stellar-contract-config-setting.x +++ b/xdr/Stellar-contract-config-setting.x @@ -165,8 +165,11 @@ struct StateArchivalSettings { // Number of snapshots to use when calculating average BucketList size uint32 bucketListSizeWindowSampleSize; + // How often to sample the BucketList size for the average, in ledgers + uint32 bucketListWindowSamplePeriod; + // Maximum number of bytes that we scan for eviction per ledger - uint64 evictionScanSize; + uint32 evictionScanSize; // Lowest BucketList level to be scanned to evict entries uint32 startingEvictionScanLevel; diff --git a/xdr/xdr_commit_generated.txt b/xdr/xdr_commit_generated.txt index 9746cc5569..b7c3979571 100644 --- a/xdr/xdr_commit_generated.txt +++ b/xdr/xdr_commit_generated.txt @@ -1 +1 @@ -bb54e505f814386a3f45172e0b7e95b7badbe969 \ No newline at end of file +b96148cd4acc372cc9af17b909ffe4b12c43ecb6 \ No newline at end of file diff --git a/xdr/xdr_generated.go b/xdr/xdr_generated.go index e8ea1dc525..ac19618f61 100644 --- a/xdr/xdr_generated.go +++ b/xdr/xdr_generated.go @@ -33,7 +33,7 @@ import ( // XdrFilesSHA256 is the SHA256 hashes of source files. var XdrFilesSHA256 = map[string]string{ "xdr/Stellar-SCP.x": "8f32b04d008f8bc33b8843d075e69837231a673691ee41d8b821ca229a6e802a", - "xdr/Stellar-contract-config-setting.x": "e466c4dfae1d5d181afbd990b91f26c5d8ed84a7fa987875f8d643cf97e34a77", + "xdr/Stellar-contract-config-setting.x": "fc42980e8710514679477f767ecad6f9348c38d24b1e4476fdd7e73e8e672ea8", "xdr/Stellar-contract-env-meta.x": "928a30de814ee589bc1d2aadd8dd81c39f71b7e6f430f56974505ccb1f49654b", "xdr/Stellar-contract-meta.x": "f01532c11ca044e19d9f9f16fe373e9af64835da473be556b9a807ee3319ae0d", "xdr/Stellar-contract-spec.x": "c7ffa21d2e91afb8e666b33524d307955426ff553a486d670c29217ed9888d49", @@ -55300,8 +55300,11 @@ var _ xdrType = (*ContractCostParamEntry)(nil) // // Number of snapshots to use when calculating average BucketList size // uint32 bucketListSizeWindowSampleSize; // +// // How often to sample the BucketList size for the average, in ledgers +// uint32 bucketListWindowSamplePeriod; +// // // Maximum number of bytes that we scan for eviction per ledger -// uint64 evictionScanSize; +// uint32 evictionScanSize; // // // Lowest BucketList level to be scanned to evict entries // uint32 startingEvictionScanLevel; @@ -55314,7 +55317,8 @@ type StateArchivalSettings struct { TempRentRateDenominator Int64 MaxEntriesToArchive Uint32 BucketListSizeWindowSampleSize Uint32 - EvictionScanSize Uint64 + BucketListWindowSamplePeriod Uint32 + EvictionScanSize Uint32 StartingEvictionScanLevel Uint32 } @@ -55342,6 +55346,9 @@ func (s *StateArchivalSettings) EncodeTo(e *xdr.Encoder) error { if err = s.BucketListSizeWindowSampleSize.EncodeTo(e); err != nil { return err } + if err = s.BucketListWindowSamplePeriod.EncodeTo(e); err != nil { + return err + } if err = s.EvictionScanSize.EncodeTo(e); err != nil { return err } @@ -55396,10 +55403,15 @@ func (s *StateArchivalSettings) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, if err != nil { return n, fmt.Errorf("decoding Uint32: %w", err) } + nTmp, err = s.BucketListWindowSamplePeriod.DecodeFrom(d, maxDepth) + n += nTmp + if err != nil { + return n, fmt.Errorf("decoding Uint32: %w", err) + } nTmp, err = s.EvictionScanSize.DecodeFrom(d, maxDepth) n += nTmp if err != nil { - return n, fmt.Errorf("decoding Uint64: %w", err) + return n, fmt.Errorf("decoding Uint32: %w", err) } nTmp, err = s.StartingEvictionScanLevel.DecodeFrom(d, maxDepth) n += nTmp